diff --git a/.github/workflows/apfelkern-update-contract.yml b/.github/workflows/apfelkern-update-contract.yml deleted file mode 100644 index a15c9ed..0000000 --- a/.github/workflows/apfelkern-update-contract.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Update contract -on: - schedule: - - cron: '31 7 * * 1' - workflow_dispatch: -permissions: - contents: read -defaults: - run: - working-directory: apfelkern -concurrency: - group: update-contract - cancel-in-progress: false -jobs: - update: - runs-on: macos-26 - permissions: - contents: write - pull-requests: write - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v4 - with: - path: apfelkern/.build/openapi-generator-1.14.2 - key: generator-${{ runner.os }}-${{ hashFiles('apfelkern/Generation/tools.json', 'apfelkern/Generation/generator-Package.resolved') }} - - id: release - env: - GH_TOKEN: ${{ github.token }} - run: python3 scripts/latest-contract.py - - if: steps.release.outputs.tag != '' - env: - CONTRACT_TAG: ${{ steps.release.outputs.tag }} - run: python3 scripts/contract.py --update "$CONTRACT_TAG" - - if: steps.release.outputs.tag != '' - run: python3 scripts/contract.py --check - - if: steps.release.outputs.tag != '' - run: swift build - - if: steps.release.outputs.tag != '' - run: swift test - - if: steps.release.outputs.tag != '' - run: brew install swiftlint - - if: steps.release.outputs.tag != '' - run: swiftlint lint - - if: steps.release.outputs.tag != '' - run: xcodebuild -scheme BotAvatar -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO build - - if: steps.release.outputs.tag != '' - uses: peter-evans/create-pull-request@v7 - with: - token: ${{ github.token }} - branch: automation/update-contract - commit-message: 'build(api): update pinned bot contract' - title: 'build(api): update to ${{ steps.release.outputs.tag }}' - body-path: apfelkern/Generation/update-pr.md - add-paths: | - apfelkern/Contract - apfelkern/Sources/apfelkern/Generated - apfelkern/Package.resolved diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 086df97..12f9117 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -20,7 +20,7 @@ defaults: jobs: build: runs-on: macos-26 - timeout-minutes: 5 + timeout-minutes: 10 steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 @@ -29,7 +29,9 @@ jobs: ios/.packages ios/build !ios/build/Index.noindex - key: build-${{ runner.os }}-${{ hashFiles('ios/Crumble.xcodeproj/project.pbxproj', 'ios/Crumble.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }} + # apfelkern is in the key so a contract update saves a fresh build instead of recompiling it on every run. + key: build-${{ runner.os }}-${{ hashFiles('ios/Crumble.xcodeproj/project.pbxproj', 'ios/Crumble.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'apfelkern/Package.swift', 'apfelkern/Package.resolved', 'apfelkern/Sources/**') }} + restore-keys: build-${{ runner.os }}- - run: ./scripts/build.sh lint: runs-on: macos-26 diff --git a/README.md b/README.md index 6bb4db5..2cee1c6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Native macOS and iOS clients for Crumble and the Swift package they share. ```mermaid flowchart LR - Contract["bot contract-vX.Y.Z\n(apfelkern/Contract)"] --> Apfelkern["apfelkern\nGenerated client, models, delivery & BotAvatar"] + Contract["bot contract\n(apfelkern/Contract)"] --> Apfelkern["apfelkern\nGenerated client, models, delivery & BotAvatar"] Apfelkern --> macOS["macos\nCrumble for macOS"] Apfelkern --> iOS["ios\nCrumble for iOS & iPadOS"] ``` @@ -24,7 +24,6 @@ Workflows in `.github/workflows` run only when their directory or `apfelkern` ch - `apfelkern.yml`: verifies the generated client, builds, tests, and lints `apfelkern`. - `macos.yml`: runs `swift test` and `swiftlint` for the macOS app. - `ios.yml`: builds the unsigned iOS app and test targets and runs `swiftlint` (simulator tests run locally). -- `apfelkern-update-contract.yml`: checks weekly for a new `bot` contract release and opens a verified pull request. The canonical glossary is [`bot/GLOSSARY.md`](https://github.com/crumble-project/bot/blob/main/GLOSSARY.md). diff --git a/apfelkern/CHANGELOG.md b/apfelkern/CHANGELOG.md index e91ac02..ef17b32 100644 --- a/apfelkern/CHANGELOG.md +++ b/apfelkern/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +- Add outside calls: `CallRequest` (a bot's proposal to call someone other than the owner, read from a `request_call` result or `APIClient.callRequests(_:)`), `approveCallRequest`, `declineCallRequest`, and `callRequestTranscript`, and `CallRequestBoard`, whose decisions show pending until the server confirms and whose refused approval exposes the server's text. `CallEvent` gains `callee`, and `shownInChat(_:)` hides the `call-started` event of an outside call and shows a call request card. Add `CallRequest.stateLabel`, `callRequest(for:in:)`, `callNoticeDetail(_:request:)`, and `callTranscriptLines(_:)`. `noticeTitle(_:)` names a `call_request` notice **Call request**. +- Update the contract copy for the voice gateway. `Message` gains `call`, a `CallEvent` with the call's ID and direction. Add `CallMarker`, which reads a `call-started` or `call-ended` event and the `call` notice whose end woke the bot, and `gatewayOrigin(_:)`, which reads "Spoken on a call" for a spoken message. `noticeTitle(_:)` names a `call` notice **Call**. `BotAvatar` gains `CallMarkerView`, and `GatewayOriginLabel` shows a phone for a spoken message. +- `scripts/contract.py --update DIRECTORY` copies the contract files from a directory such as `bot/openapi/`. `Contract/` no longer carries `pin.json`, `SHA256SUMS`, `CHANGELOG.md`, or `source-commit.txt`, and the weekly contract update workflow is gone. - Add `BotAvatarPicker`: the portrait opens `BotAvatarEditor` in a popover. - Add `ComposerDrafts`, unsent text by conversation, and `GroupChatHost.composerDrafts`, which replaces `groupComposerDrafts`. - Add `ThinkingLevel.available(for:in:)` and `ActivityEntry.failed`. `BotAvatar` gains `ReasoningField`, `DesktopModelField`, and `ActivityErrorBadge`. diff --git a/apfelkern/Contract/CHANGELOG.md b/apfelkern/Contract/CHANGELOG.md deleted file mode 100644 index 7c9c9f4..0000000 --- a/apfelkern/Contract/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -# Contract 6.0.0 - -- Local export from the bot checkout. The bot repository no longer publishes contract releases. diff --git a/apfelkern/Contract/SHA256SUMS b/apfelkern/Contract/SHA256SUMS deleted file mode 100644 index 36628ee..0000000 --- a/apfelkern/Contract/SHA256SUMS +++ /dev/null @@ -1,8 +0,0 @@ -4fa4a524cf635a837b53a322f2bdcbcccba75bc24b33260863ea8124f96ee21e activity-event.schema.json -f1b51f5a2371989fb0a961e8d2097879a0fb90fc4d44a7554e32555ade38da32 CHANGELOG.md -eb4fc4fea61127a93e78b09eb7223a1ed730b49bc7a9a3dedfbf0fa70c3932c6 chat-snapshot.schema.json -d056a6914bb219d64634eeb701d8e9bae19bbd7bce3dc88bafe538429642070f desktop-control.schema.json -58efc1a9112e6f868468663db7d52be716740444a189b24620a886d7a34ea9e0 group-chat-snapshot.schema.json -e1fc21c5ca3e658bfbfbb5005a0d1dfec2be6e720b5a1ff86f699a13cc5db221 heartbeat.schema.json -3f389004678290cd63833233a48f17b321bb1157ae62956f72ae882b034a0c84 openapi.json -139de61622a3ef9a8c0112ca42971afcc5b5da9613f6604b2c64a37166a623e3 source-commit.txt diff --git a/apfelkern/Contract/chat-snapshot.schema.json b/apfelkern/Contract/chat-snapshot.schema.json index 7374638..16275c4 100644 --- a/apfelkern/Contract/chat-snapshot.schema.json +++ b/apfelkern/Contract/chat-snapshot.schema.json @@ -145,6 +145,29 @@ ], "additionalProperties": true }, + "call": { + "type": "object", + "properties": { + "callId": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ + "inbound", + "outbound" + ] + }, + "callee": { + "type": "string" + } + }, + "required": [ + "callId", + "direction" + ], + "additionalProperties": true + }, "attachments": { "type": "array", "items": { diff --git a/apfelkern/Contract/group-chat-snapshot.schema.json b/apfelkern/Contract/group-chat-snapshot.schema.json index bccd25c..cdcdd9a 100644 --- a/apfelkern/Contract/group-chat-snapshot.schema.json +++ b/apfelkern/Contract/group-chat-snapshot.schema.json @@ -145,6 +145,29 @@ ], "additionalProperties": true }, + "call": { + "type": "object", + "properties": { + "callId": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ + "inbound", + "outbound" + ] + }, + "callee": { + "type": "string" + } + }, + "required": [ + "callId", + "direction" + ], + "additionalProperties": true + }, "attachments": { "type": "array", "items": { diff --git a/apfelkern/Contract/openapi.json b/apfelkern/Contract/openapi.json index 7d57ba5..34532a2 100644 --- a/apfelkern/Contract/openapi.json +++ b/apfelkern/Contract/openapi.json @@ -12,6 +12,11 @@ "scheme": "bearer", "description": "Better Auth session token from /api/auth/sign-in/email. The legacy server token is not accepted." }, + "VoiceGatewayToken": { + "type": "http", + "scheme": "bearer", + "description": "The voice gateway token the owner issues in settings. It reaches only /v1/voice/ routes, which accept nothing else." + }, "SessionCookie": { "type": "apiKey", "in": "cookie", @@ -78,7 +83,7 @@ "credential", "login" ], - "description": "Set when the bot waits for the owner's answer: approval (a desktop job action held by an intent check), credential, or login (a request the owner saves or declines). Clients may receive other values later." + "description": "Set when the bot waits for the owner's answer: approval (a desktop job action held by an intent check, or a call request), credential, or login (a request the owner saves or declines). Clients may receive other values later." } }, "required": [ @@ -208,6 +213,113 @@ ], "description": "A bot's review of one of its turns changed its skills or memory, sent as the `learned` event on /v1/events. Clients show a short notice in the bot chat and link to the change record." }, + "VoiceGatewayConfigEvent": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "ownerNumbers": { + "type": "array", + "items": { + "type": "string" + } + }, + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "botId": { + "type": "string" + }, + "botName": { + "type": "string" + }, + "displayName": { + "type": "string", + "description": "The line's display name, or the bot's name." + }, + "callsOwner": { + "type": "boolean" + } + }, + "required": [ + "username", + "botId", + "botName", + "displayName", + "callsOwner" + ] + }, + "description": "Lines whose bot is enabled; empty while the voice gateway is disabled." + } + }, + "required": [ + "enabled", + "ownerNumbers", + "lines" + ] + }, + "VoiceCallEvent": { + "type": "object", + "properties": { + "callId": { + "type": "string", + "format": "uuid" + }, + "username": { + "type": "string", + "description": "The line the call is placed from." + }, + "to": { + "type": "string", + "description": "The number to dial: for a call to the owner, the first in the owner's list; for an outside call, the number the owner approved, digits with an optional leading +." + }, + "greeting": { + "type": "string", + "minLength": 1, + "maxLength": 1000, + "description": "What the bot says when the call is answered: for an outside call, the opening the owner approved, to be spoken verbatim." + }, + "party": { + "type": "string", + "enum": [ + "owner", + "outside" + ], + "description": "Who is called: owner, or outside, someone other than the owner after the owner approved the bot's call request. Absent means owner. Dial an outside call only when the voice gateway's own config allows it, else report it failed." + } + }, + "required": [ + "callId", + "username", + "to", + "greeting" + ], + "description": "A bot asks to call the owner, or someone else after the owner approved it. Sent only to a stream opened with calls=true, and sent again after a reconnect until the call is acknowledged; ignore a callId you already dial." + }, + "VoiceCallCancelEvent": { + "type": "object", + "properties": { + "callId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "callId" + ], + "description": "The call's turn was aborted or its wait ran out: hang up if it still rings." + }, + "VoiceGatewayReplacedEvent": { + "type": "object", + "properties": {}, + "description": "Another connection with the same voice gateway token took over; sent before this stream closes." + }, "Health": { "type": "object", "properties": { @@ -443,6 +555,171 @@ "questionGraceMinutes" ] }, + "Execution": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "agentId": { + "type": "string" + }, + "conversationId": { + "type": "string" + }, + "scheduleId": { + "type": [ + "string", + "null" + ] + }, + "submissionId": { + "type": [ + "string", + "null" + ] + }, + "requestId": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "replyTo": { + "type": [ + "string", + "null" + ] + }, + "attachmentsDigest": { + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "done", + "failed", + "cancelled" + ] + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "agentId", + "conversationId", + "scheduleId", + "submissionId", + "requestId", + "prompt", + "status", + "error", + "createdAt", + "updatedAt" + ] + }, + "SpokenExecution": { + "type": "object", + "properties": { + "execution": { + "$ref": "#/components/schemas/Execution" + }, + "reply": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + }, + "description": "The bot's reply, read by the message's submission; null unless the execution's status is done. A failed or cancelled execution never gets one." + }, + "hangUp": { + "type": "boolean", + "description": "True when the bot asked to end the call: hang up once the reply was read aloud, then report the end with reason hungUp." + } + }, + "required": [ + "execution", + "reply", + "hangUp" + ] + }, + "VoiceCallReport": { + "oneOf": [ + { + "type": "object", + "properties": { + "outcome": { + "type": "string", + "enum": [ + "ringing", + "answered", + "unanswered", + "busy", + "failed" + ], + "description": "For a call a bot placed: ringing acknowledges it as soon as dialing starts; the others settle it." + }, + "error": { + "type": "string", + "maxLength": 500 + } + }, + "required": [ + "outcome" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outcome": { + "type": "string", + "enum": [ + "ended" + ], + "description": "A started call ended. Accepted for an active, ended, or unknown call; an unknown one can't be started afterwards." + }, + "reason": { + "type": "string", + "enum": [ + "hungUp", + "maxDuration", + "failed", + "stopping" + ], + "description": "hungUp: the media ended or the dialog closed. maxDuration: the call reached its maximum length. failed: any other error. stopping: the voice gateway shut down." + }, + "error": { + "type": "string", + "maxLength": 500 + } + }, + "required": [ + "outcome", + "reason" + ], + "additionalProperties": false + } + ] + }, "GitHubApp": { "type": "object", "properties": { @@ -1017,7 +1294,8 @@ "description": "Pi Durable live progress state. In-flight assistant message content is omitted." }, "partial": { - "type": "string" + "type": "string", + "description": "Text of the reply the bot is writing now. Empty unless the event stream was opened with partial=true." }, "usage": { "description": "Pi Durable usage document." @@ -1080,7 +1358,8 @@ "type": "number" }, "kind": { - "type": "string" + "type": "string", + "description": "The entry's kind. Events include bot-message, job-question, held-action, job-failure, reset, compaction, call-started (content: the greeting of a call the bot placed, or Call started), and call-ended (content: how the call ended, when it woke no bot turn). Clients may receive other values later." }, "replyTo": { "type": "string" @@ -1139,6 +1418,31 @@ ], "description": "On a `held-action` event: the desktop job action waiting for the owner. Its state is under `/v1/agents/{id}/held-actions`." }, + "call": { + "type": "object", + "properties": { + "callId": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ + "inbound", + "outbound" + ], + "description": "outbound: the bot called the owner, or the callee of an outside call." + }, + "callee": { + "type": "string", + "description": "Set on an outside call, which the bot placed to someone other than the owner: who it called. A call-started event then reads as the bot calling the callee, its content the opening." + } + }, + "required": [ + "callId", + "direction" + ], + "description": "On a `call-started` or `call-ended` event: the call." + }, "attachments": { "type": "array", "items": { @@ -1189,7 +1493,7 @@ "properties": { "kind": { "type": "string", - "description": "Where the message came from: owner, task, event (an event automation's prompt), script (a script task's result), credential, bot, or group. Clients may receive other values later." + "description": "Where the message came from: owner, task, event (an event automation's prompt), script (a script task's result), credential, bot, group, call (a voice gateway call ended, which starts a bot turn), call_request (the owner declined a call request), or callee (what the callee of an outside call said, in that call's conversation only). Clients may receive other values later." }, "name": { "type": "string" @@ -1199,7 +1503,7 @@ }, "via": { "type": "string", - "description": "On an owner message sent through a message gateway: the gateway's ID, such as `discord`." + "description": "On an owner message sent through a message gateway: the gateway's ID, such as `discord`. On a spoken message from a voice gateway call: `voice`." }, "source": { "type": "string", @@ -1558,113 +1862,34 @@ "expiresAt" ] }, - "Execution": { + "Compaction": { "type": "object", "properties": { - "id": { + "taskId": { "type": "string" - }, - "agentId": { + } + }, + "required": [ + "taskId" + ] + }, + "GroupChat": { + "type": "object", + "properties": { + "id": { "type": "string" }, - "conversationId": { + "name": { "type": "string" }, - "scheduleId": { - "type": [ - "string", - "null" - ] - }, - "submissionId": { - "type": [ - "string", - "null" - ] + "memberIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Member bots in the order they joined." }, - "requestId": { - "type": "string" - }, - "prompt": { - "type": "string" - }, - "replyTo": { - "type": [ - "string", - "null" - ] - }, - "attachmentsDigest": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "done", - "failed", - "cancelled" - ] - }, - "error": { - "type": [ - "string", - "null" - ] - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - }, - "required": [ - "id", - "agentId", - "conversationId", - "scheduleId", - "submissionId", - "requestId", - "prompt", - "status", - "error", - "createdAt", - "updatedAt" - ] - }, - "Compaction": { - "type": "object", - "properties": { - "taskId": { - "type": "string" - } - }, - "required": [ - "taskId" - ] - }, - "GroupChat": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "memberIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Member bots in the order they joined." - }, - "createdAt": { + "createdAt": { "type": "string" }, "updatedAt": { @@ -2228,6 +2453,106 @@ "decidedAt" ] }, + "CallRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "agentId": { + "type": "string" + }, + "number": { + "type": "string", + "description": "The number to dial, normalized: digits with an optional leading +." + }, + "callee": { + "type": "string", + "description": "Who the bot calls." + }, + "goal": { + "type": "string" + }, + "opening": { + "type": "string", + "description": "What the bot says first when the callee answers." + }, + "status": { + "type": "string", + "enum": [ + "pending", + "declined", + "calling", + "ended" + ], + "description": "pending: waiting for the owner. calling: approved, and the call rings or runs. ended: see outcome." + }, + "callId": { + "type": [ + "string", + "null" + ] + }, + "conversationId": { + "type": [ + "string", + "null" + ] + }, + "outcome": { + "type": [ + "string", + "null" + ], + "enum": [ + "answered", + "unanswered", + "busy", + "failed", + null + ], + "description": "Set once the status is ended." + }, + "error": { + "type": [ + "string", + "null" + ], + "description": "Why a failed call failed." + }, + "requestedAt": { + "type": "string" + }, + "decidedAt": { + "type": [ + "string", + "null" + ] + }, + "endedAt": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "agentId", + "number", + "callee", + "goal", + "opening", + "status", + "callId", + "conversationId", + "outcome", + "error", + "requestedAt", + "decidedAt", + "endedAt" + ] + }, "CredentialUse": { "type": "object", "properties": { @@ -4168,6 +4493,34 @@ } } }, + "/openapi.json": { + "get": { + "operationId": "getOpenAPI", + "description": "This document, generated by the running server.", + "security": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "openapi": { + "type": "string" + } + }, + "required": [ + "openapi" + ], + "additionalProperties": {} + } + } + } + } + } + } + }, "/v1/capabilities": { "get": { "operationId": "getCapabilities", @@ -6704,10 +7057,10 @@ } } }, - "/v1/github-apps": { + "/v1/voice-gateway": { "get": { - "operationId": "listGithubApps", - "description": "The account's GitHub Apps, each the GitHub identity its bots act through in one GitHub account's repositories.", + "operationId": "getVoiceGateway", + "description": "The account's voice gateway: its lines and the owner's numbers, when its token was issued, and the connection status.", "security": [ { "BearerAuth": [] @@ -6724,22 +7077,162 @@ "schema": { "type": "object", "properties": { - "apps": { + "config": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "ownerNumbers": { + "type": "array", + "items": { + "type": "string", + "pattern": "^\\+?[0-9*#]{1,32}$/u" + }, + "maxItems": 20, + "description": "The owner's phone numbers. A call from one of them reaches the line's bot as the owner; a bot calling the owner dials the first." + }, + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "username": { + "type": "string", + "pattern": "^[A-Za-z0-9._~+-]{1,64}$/u" + }, + "botId": { + "type": "string", + "format": "uuid" + }, + "displayName": { + "type": [ + "string", + "null" + ], + "maxLength": 64, + "description": "The name callers hear; null uses the bot's name." + }, + "callsOwner": { + "type": "boolean" + }, + "callsOthers": { + "type": "boolean", + "description": "Whether the line's bot may ask to call people other than the owner, each call after the owner approved it. Absent means false." + } + }, + "required": [ + "username", + "botId", + "displayName", + "callsOwner", + "callsOthers" + ], + "additionalProperties": false + }, + "maxItems": 64 + } + }, + "required": [ + "enabled", + "ownerNumbers", + "lines" + ], + "additionalProperties": false + }, + "token": { + "type": [ + "object", + "null" + ], + "properties": { + "issuedAt": { + "type": "string" + } + }, + "required": [ + "issuedAt" + ] + }, + "status": { + "type": "string", + "enum": [ + "disconnected", + "connecting", + "connected", + "error" + ] + }, + "connectedAt": { + "type": [ + "string", + "null" + ] + }, + "lines": { "type": "array", "items": { - "$ref": "#/components/schemas/GitHubApp" - } - } - }, - "required": [ - "apps" - ] - } - } - } - }, - "400": { - "description": "Invalid request or operation", + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "registered": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "username", + "registered", + "error" + ] + }, + "description": "Line registration as the connected voice gateway last reported it; empty until it reports and after it disconnects." + }, + "unavailableLines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "reason": { + "type": "string", + "enum": [ + "botDeleted", + "botDisabled" + ] + } + }, + "required": [ + "username", + "reason" + ] + }, + "description": "Configured lines whose bot was deleted or is disabled. The voice gateway does not receive them; a line comes back when its bot is enabled again." + } + }, + "required": [ + "config", + "token", + "status", + "connectedAt", + "lines", + "unavailableLines" + ] + } + } + } + }, + "400": { + "description": "Invalid request or operation", "content": { "application/json": { "schema": { @@ -6819,12 +7312,10 @@ } } } - } - }, - "/v1/github-apps/manifest": { - "post": { - "operationId": "createGithubAppManifest", - "description": "Starts creating a private GitHub App. The client posts `manifest` as a form field to `url`; GitHub then sends the owner to `{origin}/github-app/callback` with a code and state.", + }, + "put": { + "operationId": "updateVoiceGateway", + "description": "Saves the voice gateway's lines and the owner's numbers. 400 for an unknown bot.", "security": [ { "BearerAuth": [] @@ -6840,24 +7331,63 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 34 + "enabled": { + "type": "boolean" }, - "origin": { - "type": "string", - "maxLength": 2000, - "format": "uri" + "ownerNumbers": { + "type": "array", + "items": { + "type": "string", + "pattern": "^\\+?[0-9*#]{1,32}$/u" + }, + "maxItems": 20, + "description": "The owner's phone numbers. A call from one of them reaches the line's bot as the owner; a bot calling the owner dials the first." }, - "organization": { - "type": "string", - "pattern": "^[A-Za-z0-9-]{1,39}$" + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "username": { + "type": "string", + "pattern": "^[A-Za-z0-9._~+-]{1,64}$/u" + }, + "botId": { + "type": "string", + "format": "uuid" + }, + "displayName": { + "type": [ + "string", + "null" + ], + "maxLength": 64, + "description": "The name callers hear; null uses the bot's name." + }, + "callsOwner": { + "type": "boolean" + }, + "callsOthers": { + "type": "boolean", + "description": "Whether the line's bot may ask to call people other than the owner, each call after the owner approved it. Absent means false." + } + }, + "required": [ + "username", + "botId", + "displayName", + "callsOwner", + "callsOthers" + ], + "additionalProperties": false + }, + "maxItems": 64 } }, "required": [ - "name", - "origin" + "enabled", + "ownerNumbers", + "lines" ], "additionalProperties": false } @@ -6872,16 +7402,155 @@ "schema": { "type": "object", "properties": { - "url": { - "type": "string" + "config": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "ownerNumbers": { + "type": "array", + "items": { + "type": "string", + "pattern": "^\\+?[0-9*#]{1,32}$/u" + }, + "maxItems": 20, + "description": "The owner's phone numbers. A call from one of them reaches the line's bot as the owner; a bot calling the owner dials the first." + }, + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "username": { + "type": "string", + "pattern": "^[A-Za-z0-9._~+-]{1,64}$/u" + }, + "botId": { + "type": "string", + "format": "uuid" + }, + "displayName": { + "type": [ + "string", + "null" + ], + "maxLength": 64, + "description": "The name callers hear; null uses the bot's name." + }, + "callsOwner": { + "type": "boolean" + }, + "callsOthers": { + "type": "boolean", + "description": "Whether the line's bot may ask to call people other than the owner, each call after the owner approved it. Absent means false." + } + }, + "required": [ + "username", + "botId", + "displayName", + "callsOwner", + "callsOthers" + ], + "additionalProperties": false + }, + "maxItems": 64 + } + }, + "required": [ + "enabled", + "ownerNumbers", + "lines" + ], + "additionalProperties": false }, - "manifest": { - "type": "string" + "token": { + "type": [ + "object", + "null" + ], + "properties": { + "issuedAt": { + "type": "string" + } + }, + "required": [ + "issuedAt" + ] + }, + "status": { + "type": "string", + "enum": [ + "disconnected", + "connecting", + "connected", + "error" + ] + }, + "connectedAt": { + "type": [ + "string", + "null" + ] + }, + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "registered": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "username", + "registered", + "error" + ] + }, + "description": "Line registration as the connected voice gateway last reported it; empty until it reports and after it disconnects." + }, + "unavailableLines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "reason": { + "type": "string", + "enum": [ + "botDeleted", + "botDisabled" + ] + } + }, + "required": [ + "username", + "reason" + ] + }, + "description": "Configured lines whose bot was deleted or is disabled. The voice gateway does not receive them; a line comes back when its bot is enabled again." } }, "required": [ - "url", - "manifest" + "config", + "token", + "status", + "connectedAt", + "lines", + "unavailableLines" ] } } @@ -6970,10 +7639,10 @@ } } }, - "/v1/github-apps/complete": { + "/v1/voice-gateway/token": { "post": { - "operationId": "completeGithubApp", - "description": "Exchanges the code GitHub redirected back with for the App's keys, within an hour of starting. 400 for a stale or reused state.", + "operationId": "issueVoiceGatewayToken", + "description": "Issues the voice gateway token, returned only once. An earlier token stops working at once.", "security": [ { "BearerAuth": [] @@ -6982,40 +7651,25 @@ "SessionCookie": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "state": { - "type": "string", - "minLength": 1, - "maxLength": 200 - } - }, - "required": [ - "code", - "state" - ], - "additionalProperties": false - } - } - } - }, "responses": { - "200": { + "201": { "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitHubApp" + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "issuedAt": { + "type": "string" + } + }, + "required": [ + "token", + "issuedAt" + ] } } } @@ -7101,12 +7755,10 @@ } } } - } - }, - "/v1/github-apps/{id}/connect": { - "post": { - "operationId": "connectGithubApp", - "description": "Finds the App's installation on its account and gives its bots the GH_TOKEN credential. 409 until the owner installs the App.", + }, + "delete": { + "operationId": "revokeVoiceGatewayToken", + "description": "Revokes the voice gateway token. 404 when none is issued.", "security": [ { "BearerAuth": [] @@ -7115,26 +7767,9 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" - } - ], "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GitHubApp" - } - } - } + "204": { + "description": "Success, no response body" }, "400": { "description": "Invalid request or operation", @@ -7219,59 +7854,51 @@ } } }, - "/v1/github-apps/{id}/bots": { - "put": { - "operationId": "setGithubAppBots", - "description": "Replaces the bots that act through the App. A bot uses at most one App per GitHub account; 409 when a bot already uses another App for this App's account.", - "security": [ - { - "BearerAuth": [] + "/v1/voice/events": { + "get": { + "operationId": "streamVoiceGatewayEvents", + "x-sse-events": { + "config": { + "$ref": "#/components/schemas/VoiceGatewayConfigEvent" + }, + "call": { + "$ref": "#/components/schemas/VoiceCallEvent" }, + "cancel": { + "$ref": "#/components/schemas/VoiceCallCancelEvent" + }, + "replaced": { + "$ref": "#/components/schemas/VoiceGatewayReplacedEvent" + }, + "heartbeat": { + "$ref": "#/components/schemas/HeartbeatEvent" + } + }, + "description": "Server-sent events for the voice gateway. A config event comes first and after every change to lines, owner numbers, or their bots. With calls=true, call and cancel events ask the gateway to place and hang up calls to the owner. One stream is live per account: a new connection sends replaced to the older one and closes it. Revoking or replacing the token closes the stream.", + "security": [ { - "SessionCookie": [] + "VoiceGatewayToken": [] } ], "parameters": [ { "schema": { - "type": "string" + "type": "string", + "description": "With calls=true, the voice gateway declares it can place calls: bots with a line that may call the owner are offered the call_owner tool, approved call requests can dial, and call events arrive on this stream." }, - "required": true, - "name": "id", - "in": "path" + "required": false, + "description": "With calls=true, the voice gateway declares it can place calls: bots with a line that may call the owner are offered the call_owner tool, approved call requests can dial, and call events arrive on this stream.", + "name": "calls", + "in": "query" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "botIds": { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "maxItems": 200 - } - }, - "required": [ - "botIds" - ], - "additionalProperties": false - } - } - } - }, "responses": { "200": { - "description": "Success", + "description": "SSE stream, not a JSON array", "content": { - "application/json": { + "text/event-stream": { "schema": { - "$ref": "#/components/schemas/GitHubApp" + "type": "string" } } } @@ -7287,11 +7914,11 @@ } }, "401": { - "description": "Missing, expired, or invalid account session", + "description": "Missing, revoked, or replaced voice gateway token", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Error" } } } @@ -7359,31 +7986,69 @@ } } }, - "/v1/github-apps/{id}": { - "delete": { - "operationId": "deleteGithubApp", - "description": "Forgets the App, signs the owner out of it, and takes GH_TOKEN from bots left without an installed App. The App stays on GitHub until the owner deletes it there.", + "/v1/voice/lines/{username}/messages": { + "post": { + "operationId": "sendSpokenMessage", + "description": "Sends what the owner said on a call to the line's bot. On the line's active outside call, what the callee said goes to that call's conversation instead, never the bot chat, under requestId outside-call:{callId}:{requestId}. The same IDs with other content answer 409, and so do a callId whose call ended and an outside call's ID that is not the line's active call: hang up. A callId the server doesn't know is accepted.", "security": [ { - "BearerAuth": [] - }, - { - "SessionCookie": [] + "VoiceGatewayToken": [] } ], "parameters": [ { "schema": { - "type": "string" + "type": "string", + "description": "A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404." }, "required": true, - "name": "id", + "description": "A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404.", + "name": "username", "in": "path" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "callId": { + "type": "string", + "format": "uuid", + "description": "The call the message was spoken on." + }, + "requestId": { + "type": "string", + "format": "uuid", + "description": "The message's ID within the call. Retrying with the same IDs and content returns the same execution." + }, + "content": { + "type": "string", + "minLength": 1, + "maxLength": 32000 + } + }, + "required": [ + "callId", + "requestId", + "content" + ] + } + } + } + }, "responses": { - "204": { - "description": "Success, no response body" + "202": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Execution" + } + } + } }, "400": { "description": "Invalid request or operation", @@ -7396,11 +8061,11 @@ } }, "401": { - "description": "Missing, expired, or invalid account session", + "description": "Missing, revoked, or replaced voice gateway token", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Error" } } } @@ -7468,64 +8133,73 @@ } } }, - "/v1/github-apps/{id}/sign-in": { - "post": { - "operationId": "signInGithubApp", - "description": "Starts signing the owner in to GitHub through the App, so its bots act as the owner. The client opens `url`; GitHub sends the owner to the App's callback URL, `{origin}/github-app/authorized`, or `{origin}/ui/github-app/authorized` for Apps created before the web UI moved to `/`, with a code and state. `origin` is no longer used. 409 without a client secret.", - "security": [ - { - "BearerAuth": [] + "/v1/voice/lines/{username}/events": { + "get": { + "operationId": "streamVoiceLineEvents", + "x-sse-events": { + "snapshot": { + "$ref": "#/components/schemas/ChatSnapshot" }, + "heartbeat": { + "$ref": "#/components/schemas/HeartbeatEvent" + } + }, + "description": "The line's bot chat as server-sent events, the same as /v1/agents/{id}/events. While the line's active call is an outside call, the snapshots are that call's conversation instead. The stream closes when the line gets another bot, is removed, or its bot is deleted or disabled.", + "security": [ { - "SessionCookie": [] + "VoiceGatewayToken": [] } ], "parameters": [ { "schema": { - "type": "string" + "type": "string", + "description": "A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404." }, "required": true, - "name": "id", + "description": "A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404.", + "name": "username", "in": "path" + }, + { + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200 + }, + "required": false, + "name": "limit", + "in": "query" + }, + { + "schema": { + "type": "string", + "description": "With partial=true, each snapshot's partial carries the reply text the bot is writing, updated about every 100 ms. Without it, partial stays empty and replies appear only when the turn ends." + }, + "required": false, + "description": "With partial=true, each snapshot's partial carries the reply text the bot is writing, updated about every 100 ms. Without it, partial stays empty and replies appear only when the turn ends.", + "name": "partial", + "in": "query" + }, + { + "schema": { + "type": "string", + "format": "uuid", + "description": "The call the turn belongs to. For the line's active outside call, the stream sends that call's conversation; for another outside call's ID it answers 409: hang up. Without it, the stream follows the line's active call." + }, + "required": false, + "description": "The call the turn belongs to. For the line's active outside call, the stream sends that call's conversation; for another outside call's ID it answers 409: hang up. Without it, the stream follows the line's active call.", + "name": "callId", + "in": "query" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "origin": { - "type": "string", - "maxLength": 2000, - "format": "uri" - } - }, - "required": [ - "origin" - ], - "additionalProperties": false - } - } - } - }, "responses": { "200": { - "description": "Success", + "description": "SSE stream, not a JSON array", "content": { - "application/json": { + "text/event-stream": { "schema": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "required": [ - "url" - ] + "type": "string" } } } @@ -7541,11 +8215,11 @@ } }, "401": { - "description": "Missing, expired, or invalid account session", + "description": "Missing, revoked, or replaced voice gateway token", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Error" } } } @@ -7613,52 +8287,42 @@ } } }, - "/v1/github-apps/sign-in/complete": { - "post": { - "operationId": "completeGithubAppSignIn", - "description": "Exchanges the code GitHub sent the owner back with for the owner's tokens, within ten minutes of starting. 400 for a stale or reused state or a refused sign-in.", + "/v1/voice/lines/{username}/executions/{executionId}": { + "get": { + "operationId": "getSpokenExecution", + "description": "A spoken message's execution, the bot's reply to it when its status is done, and whether the bot asked to hang up. Stop polling when the status is failed or cancelled: reply stays null. 404 unless the execution is a spoken message to the line's bot or a callee's message on its outside call; 409 for a callee's message whose outside call is not the line's active call.", "security": [ { - "BearerAuth": [] + "VoiceGatewayToken": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string", + "description": "A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404." + }, + "required": true, + "description": "A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404.", + "name": "username", + "in": "path" }, { - "SessionCookie": [] + "schema": { + "type": "string" + }, + "required": true, + "name": "executionId", + "in": "path" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "code": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "state": { - "type": "string", - "minLength": 1, - "maxLength": 200 - } - }, - "required": [ - "code", - "state" - ], - "additionalProperties": false - } - } - } - }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitHubApp" + "$ref": "#/components/schemas/SpokenExecution" } } } @@ -7674,11 +8338,11 @@ } }, "401": { - "description": "Missing, expired, or invalid account session", + "description": "Missing, revoked, or replaced voice gateway token", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Error" } } } @@ -7746,38 +8410,53 @@ } } }, - "/v1/github-apps/{id}/user": { - "delete": { - "operationId": "signOutGithubApp", - "description": "Revokes and forgets the owner's sign-in through the App; its bots act as the App again.", + "/v1/voice/lines/{username}/calls/{callId}": { + "put": { + "operationId": "startVoiceCall", + "description": "Reports that a call on the line started, before the greeting is spoken; send it again after every config event while the call runs. For a call a bot placed, it also settles the call as answered. A call nobody confirms within 15 seconds of a new events stream, or 60 seconds without one, ends. 409 when the call ended, another call is active on the line, or the callId is an outside call's that no longer rings: hang up.", "security": [ { - "BearerAuth": [] - }, - { - "SessionCookie": [] + "VoiceGatewayToken": [] } ], "parameters": [ { "schema": { - "type": "string" + "type": "string", + "description": "A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404." }, "required": true, - "name": "id", + "description": "A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404.", + "name": "username", + "in": "path" + }, + { + "schema": { + "type": "string", + "format": "uuid", + "description": "The call's ID, the callId its spoken messages carry: a call event's callId for a call a bot placed." + }, + "required": true, + "description": "The call's ID, the callId its spoken messages carry: a call event's callId for a call a bot placed.", + "name": "callId", "in": "path" } ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GitHubApp" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false } } + } + }, + "responses": { + "204": { + "description": "Success, no response body" }, "400": { "description": "Invalid request or operation", @@ -7790,11 +8469,11 @@ } }, "401": { - "description": "Missing, expired, or invalid account session", + "description": "Missing, revoked, or replaced voice gateway token", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Error" } } } @@ -7862,25 +8541,24 @@ } } }, - "/v1/github-apps/{id}/client-secret": { - "put": { - "operationId": "setGithubAppClientSecret", - "description": "Stores a client secret generated in the App's GitHub settings, for an App created before Crumble kept it.", + "/v1/voice/calls/{callId}": { + "post": { + "operationId": "reportVoiceCall", + "description": "Reports a call a bot placed: ringing as soon as dialing starts, then how it settled. A call not acknowledged within 15 seconds, or not settled within 3 minutes 30 seconds of its call event, is cancelled. 404 for a call that is neither waiting to settle nor active: hang up. ended reports that a started call ended, and answers 204 for any callId.", "security": [ { - "BearerAuth": [] - }, - { - "SessionCookie": [] + "VoiceGatewayToken": [] } ], "parameters": [ { "schema": { - "type": "string" + "type": "string", + "description": "The callId of a call event." }, "required": true, - "name": "id", + "description": "The callId of a call event.", + "name": "callId", "in": "path" } ], @@ -7889,50 +8567,14 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "value": { - "type": "string", - "minLength": 1, - "maxLength": 16000 - }, - "reference": { - "type": "object", - "properties": { - "passwordManager": { - "type": "string", - "enum": [ - "1password", - "bitwarden" - ] - }, - "reference": { - "type": "string", - "minLength": 1, - "maxLength": 1000 - } - }, - "required": [ - "passwordManager", - "reference" - ] - } - }, - "additionalProperties": false + "$ref": "#/components/schemas/VoiceCallReport" } } } }, "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GitHubApp" - } - } - } + "204": { + "description": "Success, no response body" }, "400": { "description": "Invalid request or operation", @@ -7945,11 +8587,11 @@ } }, "401": { - "description": "Missing, expired, or invalid account session", + "description": "Missing, revoked, or replaced voice gateway token", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Error" } } } @@ -8017,39 +8659,63 @@ } } }, - "/v1/github-accounts": { - "get": { - "operationId": "listGithubAccounts", - "description": "The account's machine accounts: GitHub users made for bots. A bot acts as its machine account wherever none of its GitHub Apps does.", + "/v1/voice/lines": { + "put": { + "operationId": "reportVoiceLines", + "description": "Reports which lines the voice gateway registered with the telephone system. Accepted only while this token's /v1/voice/events stream is live, 409 otherwise; the owner sees the report in settings until that stream closes.", "security": [ { - "BearerAuth": [] - }, - { - "SessionCookie": [] + "VoiceGatewayToken": [] } ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "accounts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GitHubAccount" - } - } - }, - "required": [ - "accounts" - ] - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "username": { + "type": "string", + "maxLength": 64 + }, + "registered": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + } + }, + "required": [ + "username", + "registered", + "error" + ], + "additionalProperties": false + }, + "maxItems": 64 + } + }, + "required": [ + "lines" + ], + "additionalProperties": false } } + } + }, + "responses": { + "204": { + "description": "Success, no response body" }, "400": { "description": "Invalid request or operation", @@ -8062,11 +8728,11 @@ } }, "401": { - "description": "Missing, expired, or invalid account session", + "description": "Missing, revoked, or replaced voice gateway token", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Error" } } } @@ -8132,10 +8798,12 @@ } } } - }, - "post": { - "operationId": "addGithubAccount", - "description": "Adds the GitHub user a personal access token signs in as. 400 when GitHub refuses the token; 409 when the user is already added.", + } + }, + "/v1/github-apps": { + "get": { + "operationId": "listGithubApps", + "description": "The account's GitHub Apps, each the GitHub identity its bots act through in one GitHub account's repositories.", "security": [ { "BearerAuth": [] @@ -8144,52 +8812,24 @@ "SessionCookie": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "string", - "minLength": 1, - "maxLength": 16000 - }, - "reference": { - "type": "object", - "properties": { - "passwordManager": { - "type": "string", - "enum": [ - "1password", - "bitwarden" - ] - }, - "reference": { - "type": "string", - "minLength": 1, - "maxLength": 1000 - } - }, - "required": [ - "passwordManager", - "reference" - ] - } - }, - "additionalProperties": false - } - } - } - }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitHubAccount" + "type": "object", + "properties": { + "apps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GitHubApp" + } + } + }, + "required": [ + "apps" + ] } } } @@ -8277,10 +8917,10 @@ } } }, - "/v1/github-accounts/{id}/token": { - "put": { - "operationId": "setGithubAccountToken", - "description": "Replaces the machine account's token. 400 when GitHub refuses it or it signs in as another user.", + "/v1/github-apps/manifest": { + "post": { + "operationId": "createGithubAppManifest", + "description": "Starts creating a private GitHub App. The client posts `manifest` as a form field to `url`; GitHub then sends the owner to `{origin}/github-app/callback` with a code and state.", "security": [ { "BearerAuth": [] @@ -8289,16 +8929,6 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" - } - ], "requestBody": { "required": true, "content": { @@ -8306,33 +8936,25 @@ "schema": { "type": "object", "properties": { - "value": { + "name": { "type": "string", "minLength": 1, - "maxLength": 16000 + "maxLength": 34 }, - "reference": { - "type": "object", - "properties": { - "passwordManager": { - "type": "string", - "enum": [ - "1password", - "bitwarden" - ] - }, - "reference": { - "type": "string", - "minLength": 1, - "maxLength": 1000 - } - }, - "required": [ - "passwordManager", - "reference" - ] + "origin": { + "type": "string", + "maxLength": 2000, + "format": "uri" + }, + "organization": { + "type": "string", + "pattern": "^[A-Za-z0-9-]{1,39}$" } }, + "required": [ + "name", + "origin" + ], "additionalProperties": false } } @@ -8344,7 +8966,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitHubAccount" + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "manifest": { + "type": "string" + } + }, + "required": [ + "url", + "manifest" + ] } } } @@ -8432,10 +9066,10 @@ } } }, - "/v1/github-accounts/{id}/bots": { - "put": { - "operationId": "setGithubAccountBots", - "description": "Replaces the bots that act as the machine account, giving them GH_TOKEN. A bot acts as at most one; 409 when a bot already acts as another.", + "/v1/github-apps/complete": { + "post": { + "operationId": "completeGithubApp", + "description": "Exchanges the code GitHub redirected back with for the App's keys, within an hour of starting. 400 for a stale or reused state.", "security": [ { "BearerAuth": [] @@ -8444,16 +9078,6 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" - } - ], "requestBody": { "required": true, "content": { @@ -8461,17 +9085,20 @@ "schema": { "type": "object", "properties": { - "botIds": { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "maxItems": 200 + "code": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "state": { + "type": "string", + "minLength": 1, + "maxLength": 200 } }, "required": [ - "botIds" + "code", + "state" ], "additionalProperties": false } @@ -8484,7 +9111,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GitHubAccount" + "$ref": "#/components/schemas/GitHubApp" } } } @@ -8572,10 +9199,10 @@ } } }, - "/v1/github-accounts/{id}": { - "delete": { - "operationId": "deleteGithubAccount", - "description": "Forgets the machine account and its token, and takes GH_TOKEN from bots left without an installed App. The user stays on GitHub.", + "/v1/github-apps/{id}/connect": { + "post": { + "operationId": "connectGithubApp", + "description": "Finds the App's installation on its account and gives its bots the GH_TOKEN credential. 409 until the owner installs the App.", "security": [ { "BearerAuth": [] @@ -8595,8 +9222,15 @@ } ], "responses": { - "204": { - "description": "Success, no response body" + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitHubApp" + } + } + } }, "400": { "description": "Invalid request or operation", @@ -8681,10 +9315,10 @@ } } }, - "/v1/event-sources": { - "get": { - "operationId": "listEventSources", - "description": "The account's event sources, each with the number of automations that use it.", + "/v1/github-apps/{id}/bots": { + "put": { + "operationId": "setGithubAppBots", + "description": "Replaces the bots that act through the App. A bot uses at most one App per GitHub account; 409 when a bot already uses another App for this App's account.", "security": [ { "BearerAuth": [] @@ -8693,45 +9327,47 @@ "SessionCookie": [] } ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "botIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "maxItems": 200 + } + }, + "required": [ + "botIds" + ], + "additionalProperties": false + } + } + } + }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "usedBy": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "id", - "name", - "createdAt", - "usedBy" - ] - } - } - }, - "required": [ - "sources" - ] + "$ref": "#/components/schemas/GitHubApp" } } } @@ -8817,10 +9453,12 @@ } } } - }, - "post": { - "operationId": "createEventSource", - "description": "Creates a source on the event relay. The response's `address` contains the source's secret and is returned only once. 400 when the relay URL or token is missing, or the relay can't be reached or rejects the token.", + } + }, + "/v1/github-apps/{id}": { + "delete": { + "operationId": "deleteGithubApp", + "description": "Forgets the App, signs the owner out of it, and takes GH_TOKEN from bots left without an installed App. The App stays on GitHub until the owner deletes it there.", "security": [ { "BearerAuth": [] @@ -8829,65 +9467,22 @@ "SessionCookie": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 200 - } - }, - "required": [ - "name" - ], - "additionalProperties": false - } - } + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" } - }, + ], "responses": { - "201": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "usedBy": { - "type": "integer", - "minimum": 0 - }, - "address": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "createdAt", - "usedBy", - "address" - ] - } - } - } - }, - "400": { - "description": "Invalid request or operation", + "204": { + "description": "Success, no response body" + }, + "400": { + "description": "Invalid request or operation", "content": { "application/json": { "schema": { @@ -8969,10 +9564,10 @@ } } }, - "/v1/event-sources/{id}": { - "delete": { - "operationId": "deleteEventSource", - "description": "Deletes the source on the event relay and in Crumble; its address stops working. 409 while an automation uses it.", + "/v1/github-apps/{id}/sign-in": { + "post": { + "operationId": "signInGithubApp", + "description": "Starts signing the owner in to GitHub through the App, so its bots act as the owner. The client opens `url`; GitHub sends the owner to the App's callback URL, `{origin}/github-app/authorized`, or `{origin}/ui/github-app/authorized` for Apps created before the web UI moved to `/`, with a code and state. `origin` is no longer used. 409 without a client secret.", "security": [ { "BearerAuth": [] @@ -8984,18 +9579,52 @@ "parameters": [ { "schema": { - "type": "string", - "minLength": 1, - "maxLength": 200 + "type": "string" }, "required": true, "name": "id", "in": "path" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "origin": { + "type": "string", + "maxLength": 2000, + "format": "uri" + } + }, + "required": [ + "origin" + ], + "additionalProperties": false + } + } + } + }, "responses": { - "204": { - "description": "Success, no response body" + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": [ + "url" + ] + } + } + } }, "400": { "description": "Invalid request or operation", @@ -9080,9 +9709,10 @@ } } }, - "/v1/web-search": { - "get": { - "operationId": "getWebSearch", + "/v1/github-apps/sign-in/complete": { + "post": { + "operationId": "completeGithubAppSignIn", + "description": "Exchanges the code GitHub sent the owner back with for the owner's tokens, within ten minutes of starting. 400 for a stale or reused state or a refused sign-in.", "security": [ { "BearerAuth": [] @@ -9091,29 +9721,40 @@ "SessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "state": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "code", + "state" + ], + "additionalProperties": false + } + } + } + }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "defaultProvider": { - "type": "string", - "enum": [ - "mixed", - "exa" - ] - }, - "exaKeyConfigured": { - "type": "boolean" - } - }, - "required": [ - "defaultProvider", - "exaKeyConfigured" - ] + "$ref": "#/components/schemas/GitHubApp" } } } @@ -9199,9 +9840,12 @@ } } } - }, - "put": { - "operationId": "updateWebSearch", + } + }, + "/v1/github-apps/{id}/user": { + "delete": { + "operationId": "signOutGithubApp", + "description": "Revokes and forgets the owner's sign-in through the App; its bots act as the App again.", "security": [ { "BearerAuth": [] @@ -9210,51 +9854,23 @@ "SessionCookie": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "defaultProvider": { - "type": "string", - "enum": [ - "mixed", - "exa" - ] - } - }, - "required": [ - "defaultProvider" - ] - } - } + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" } - }, + ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "defaultProvider": { - "type": "string", - "enum": [ - "mixed", - "exa" - ] - }, - "exaKeyConfigured": { - "type": "boolean" - } - }, - "required": [ - "defaultProvider", - "exaKeyConfigured" - ] + "$ref": "#/components/schemas/GitHubApp" } } } @@ -9342,10 +9958,10 @@ } } }, - "/v1/judge-model": { - "get": { - "operationId": "getJudgeModel", - "description": "The account's judge model for desktop jobs' intent checks, and the models the account's provider keys reach.", + "/v1/github-apps/{id}/client-secret": { + "put": { + "operationId": "setGithubAppClientSecret", + "description": "Stores a client secret generated in the App's GitHub settings, for an App created before Crumble kept it.", "security": [ { "BearerAuth": [] @@ -9354,13 +9970,62 @@ "SessionCookie": [] } ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 1, + "maxLength": 16000 + }, + "reference": { + "type": "object", + "properties": { + "passwordManager": { + "type": "string", + "enum": [ + "1password", + "bitwarden" + ] + }, + "reference": { + "type": "string", + "minLength": 1, + "maxLength": 1000 + } + }, + "required": [ + "passwordManager", + "reference" + ] + } + }, + "additionalProperties": false + } + } + } + }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JudgeModel" + "$ref": "#/components/schemas/GitHubApp" } } } @@ -9446,9 +10111,12 @@ } } } - }, - "put": { - "operationId": "updateJudgeModel", + } + }, + "/v1/github-accounts": { + "get": { + "operationId": "listGithubAccounts", + "description": "The account's machine accounts: GitHub users made for bots. A bot acts as its machine account wherever none of its GitHub Apps does.", "security": [ { "BearerAuth": [] @@ -9457,51 +10125,24 @@ "SessionCookie": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "judgeModel": { - "type": [ - "object", - "null" - ], - "properties": { - "provider": { - "type": "string", - "minLength": 1, - "maxLength": 80, - "pattern": "^[a-z0-9-]+$" - }, - "model": { - "type": "string", - "minLength": 1, - "maxLength": 200 - } - }, - "required": [ - "provider", - "model" - ] - } - }, - "required": [ - "judgeModel" - ] - } - } - } - }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JudgeModel" + "type": "object", + "properties": { + "accounts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GitHubAccount" + } + } + }, + "required": [ + "accounts" + ] } } } @@ -9587,12 +10228,10 @@ } } } - } - }, - "/v1/vision-model": { - "get": { - "operationId": "getVisionModel", - "description": "The account's vision model, which describes images for bots whose model can't read them, and the models that read images the account's provider keys reach.", + }, + "post": { + "operationId": "addGithubAccount", + "description": "Adds the GitHub user a personal access token signs in as. 400 when GitHub refuses the token; 409 when the user is already added.", "security": [ { "BearerAuth": [] @@ -9601,13 +10240,52 @@ "SessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 1, + "maxLength": 16000 + }, + "reference": { + "type": "object", + "properties": { + "passwordManager": { + "type": "string", + "enum": [ + "1password", + "bitwarden" + ] + }, + "reference": { + "type": "string", + "minLength": 1, + "maxLength": 1000 + } + }, + "required": [ + "passwordManager", + "reference" + ] + } + }, + "additionalProperties": false + } + } + } + }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VisionModel" + "$ref": "#/components/schemas/GitHubAccount" } } } @@ -9693,10 +10371,12 @@ } } } - }, + } + }, + "/v1/github-accounts/{id}/token": { "put": { - "operationId": "updateVisionModel", - "description": "Choose the account's vision model, or turn it off with null. It must be one of the choices `getVisionModel` lists.", + "operationId": "setGithubAccountToken", + "description": "Replaces the machine account's token. 400 when GitHub refuses it or it signs in as another user.", "security": [ { "BearerAuth": [] @@ -9705,6 +10385,16 @@ "SessionCookie": [] } ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], "requestBody": { "required": true, "content": { @@ -9712,33 +10402,34 @@ "schema": { "type": "object", "properties": { - "visionModel": { - "type": [ - "object", - "null" - ], + "value": { + "type": "string", + "minLength": 1, + "maxLength": 16000 + }, + "reference": { + "type": "object", "properties": { - "provider": { + "passwordManager": { "type": "string", - "minLength": 1, - "maxLength": 80, - "pattern": "^[a-z0-9-]+$" + "enum": [ + "1password", + "bitwarden" + ] }, - "model": { + "reference": { "type": "string", "minLength": 1, - "maxLength": 200 + "maxLength": 1000 } }, "required": [ - "provider", - "model" + "passwordManager", + "reference" ] } }, - "required": [ - "visionModel" - ] + "additionalProperties": false } } } @@ -9749,7 +10440,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VisionModel" + "$ref": "#/components/schemas/GitHubAccount" } } } @@ -9837,9 +10528,10 @@ } } }, - "/v1/agents": { - "get": { - "operationId": "listAgents", + "/v1/github-accounts/{id}/bots": { + "put": { + "operationId": "setGithubAccountBots", + "description": "Replaces the bots that act as the machine account, giving them GH_TOKEN. A bot acts as at most one; 409 when a bot already acts as another.", "security": [ { "BearerAuth": [] @@ -9848,16 +10540,47 @@ "SessionCookie": [] } ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "botIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "maxItems": 200 + } + }, + "required": [ + "botIds" + ], + "additionalProperties": false + } + } + } + }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentPreview" - } + "$ref": "#/components/schemas/GitHubAccount" } } } @@ -9943,9 +10666,12 @@ } } } - }, - "post": { - "operationId": "createAgent", + } + }, + "/v1/github-accounts/{id}": { + "delete": { + "operationId": "deleteGithubAccount", + "description": "Forgets the machine account and its token, and takes GH_TOKEN from bots left without an installed App. The user stays on GitHub.", "security": [ { "BearerAuth": [] @@ -9954,320 +10680,154 @@ "SessionCookie": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 80 - }, - "avatar": { - "type": "object", - "properties": { - "definition": { - "type": "object", - "properties": { - "version": { - "type": "number", - "enum": [ - 1 - ] - }, - "id": { - "type": "string", - "minLength": 1, - "maxLength": 40 - }, - "name": { - "type": "string", - "minLength": 1, - "maxLength": 40 - }, - "body": { - "type": "object", - "properties": { - "path": { - "type": "string", - "minLength": 1, - "maxLength": 6000 - } - }, - "required": [ - "path" - ], - "additionalProperties": false - }, - "eyes": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "spacing": { - "type": "number" - }, - "scale": { - "type": "number" - } - }, - "required": [ - "x", - "y", - "spacing", - "scale" - ], - "additionalProperties": false + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], + "responses": { + "204": { + "description": "Success, no response body" + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/event-sources": { + "get": { + "operationId": "listEventSources", + "description": "The account's event sources, each with the number of automations that use it.", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "usedBy": { + "type": "integer", + "minimum": 0 } }, "required": [ - "version", "id", "name", - "body", - "eyes" - ], - "additionalProperties": false - }, - "color": { - "type": "string", - "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" - }, - "eyeColor": { - "type": "string", - "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" + "createdAt", + "usedBy" + ] } - }, - "required": [ - "definition", - "color", - "eyeColor" - ] - }, - "description": { - "type": "string", - "maxLength": 1000, - "default": "" - }, - "instructions": { - "type": "string", - "maxLength": 32000, - "default": "You are a thoughtful, capable personal assistant." - }, - "provider": { - "type": "string", - "minLength": 1, - "maxLength": 80, - "pattern": "^[a-z0-9-]+$", - "default": "openai" - }, - "model": { - "type": "string", - "minLength": 1, - "maxLength": 200, - "default": "gpt-4.1" - }, - "webSearchProvider": { - "type": [ - "string", - "null" - ], - "enum": [ - "mixed", - "exa", - null - ] - }, - "enabled": { - "type": "boolean", - "default": true - }, - "tools": { - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "maxItems": 100, - "default": [ - "memory" - ] - }, - "skills": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 100 - }, - "instructions": { - "type": "string", - "maxLength": 32000 - } - }, - "required": [ - "name", - "instructions" - ] - }, - "maxItems": 100, - "default": [] - }, - "sharedSkills": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "maxItems": 100 - }, - "sharedMemory": { - "type": "boolean" + } }, - "mcpServers": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "maxItems": 30, - "default": [] - }, - "delegates": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "maxItems": 30, - "default": [] - }, - "inference": { - "type": "object", - "properties": { - "thinkingLevel": { - "type": "string", - "enum": [ - "off", - "minimal", - "low", - "medium", - "high", - "xhigh", - "max" - ], - "default": "off" - }, - "temperature": { - "type": "number", - "minimum": 0, - "maximum": 2 - }, - "maxOutputTokens": { - "type": "integer", - "minimum": 1, - "maximum": 1000000 - } - } - }, - "review": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "default": true - }, - "skillThreshold": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 10 - }, - "memoryThreshold": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 10 - }, - "maxInputTokens": { - "type": "integer", - "minimum": 1000, - "maximum": 2000000 - } - } - }, - "reviewModel": { - "type": [ - "object", - "null" - ], - "properties": { - "provider": { - "type": "string", - "minLength": 1, - "maxLength": 80, - "pattern": "^[a-z0-9-]+$" - }, - "model": { - "type": "string", - "minLength": 1, - "maxLength": 200 - } - }, - "required": [ - "provider", - "model" - ] - }, - "desktopModel": { - "type": [ - "object", - "null" - ], - "properties": { - "provider": { - "type": "string", - "minLength": 1, - "maxLength": 80, - "pattern": "^[a-z0-9-]+$" - }, - "model": { - "type": "string", - "minLength": 1, - "maxLength": 200 - } - }, - "required": [ - "provider", - "model" - ] - } - }, - "required": [ - "name" - ] - } - } - } - }, - "responses": { - "201": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Agent" + "required": [ + "sources" + ] } } } @@ -10353,11 +10913,10 @@ } } } - } - }, - "/v1/agents/{id}": { - "get": { - "operationId": "getAgent", + }, + "post": { + "operationId": "createEventSource", + "description": "Creates a source on the event relay. The response's `address` contains the source's secret and is returned only once. 400 when the relay URL or token is missing, or the relay can't be reached or rejects the token.", "security": [ { "BearerAuth": [] @@ -10366,23 +10925,59 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + } } - ], + }, "responses": { - "200": { + "201": { "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Agent" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "usedBy": { + "type": "integer", + "minimum": 0 + }, + "address": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "createdAt", + "usedBy", + "address" + ] } } } @@ -10468,9 +11063,12 @@ } } } - }, - "patch": { - "operationId": "updateAgent", + } + }, + "/v1/event-sources/{id}": { + "delete": { + "operationId": "deleteEventSource", + "description": "Deletes the source on the event relay and in Crumble; its address stops working. 409 while an automation uses it.", "security": [ { "BearerAuth": [] @@ -10482,319 +11080,135 @@ "parameters": [ { "schema": { - "type": "string" + "type": "string", + "minLength": 1, + "maxLength": 200 }, "required": true, "name": "id", "in": "path" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 80 - }, - "avatar": { - "type": "object", - "properties": { - "definition": { - "type": "object", - "properties": { - "version": { - "type": "number", - "enum": [ - 1 - ] - }, - "id": { - "type": "string", - "minLength": 1, - "maxLength": 40 - }, - "name": { - "type": "string", - "minLength": 1, - "maxLength": 40 - }, - "body": { - "type": "object", - "properties": { - "path": { - "type": "string", - "minLength": 1, - "maxLength": 6000 - } - }, - "required": [ - "path" - ], - "additionalProperties": false - }, - "eyes": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "spacing": { - "type": "number" - }, - "scale": { - "type": "number" - } - }, - "required": [ - "x", - "y", - "spacing", - "scale" - ], - "additionalProperties": false - } - }, - "required": [ - "version", - "id", - "name", - "body", - "eyes" - ], - "additionalProperties": false - }, - "color": { - "type": "string", - "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" - }, - "eyeColor": { - "type": "string", - "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" - } - }, - "required": [ - "definition", - "color", - "eyeColor" - ] - }, - "description": { - "type": "string", - "maxLength": 1000 - }, - "instructions": { - "type": "string", - "maxLength": 32000 - }, - "provider": { - "type": "string", - "minLength": 1, - "maxLength": 80, - "pattern": "^[a-z0-9-]+$" - }, - "model": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "webSearchProvider": { - "type": [ - "string", - "null" - ], - "enum": [ - "mixed", - "exa", - null - ] - }, - "enabled": { - "type": "boolean" - }, - "tools": { - "type": "array", - "items": { + "responses": { + "204": { + "description": "Success, no response body" + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/web-search": { + "get": { + "operationId": "getWebSearch", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "defaultProvider": { "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "maxItems": 100 - }, - "skills": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 100 - }, - "instructions": { - "type": "string", - "maxLength": 32000 - } - }, - "required": [ - "name", - "instructions" + "enum": [ + "mixed", + "exa" ] }, - "maxItems": 100 - }, - "sharedSkills": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "maxItems": 100 - }, - "sharedMemory": { - "type": "boolean" - }, - "mcpServers": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "maxItems": 30 - }, - "delegates": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "maxItems": 30 + "exaKeyConfigured": { + "type": "boolean" + } }, - "inference": { - "type": "object", - "properties": { - "thinkingLevel": { - "type": "string", - "enum": [ - "off", - "minimal", - "low", - "medium", - "high", - "xhigh", - "max" - ], - "default": "off" - }, - "temperature": { - "type": "number", - "minimum": 0, - "maximum": 2 - }, - "maxOutputTokens": { - "type": "integer", - "minimum": 1, - "maximum": 1000000 - } - } - }, - "review": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "default": true - }, - "skillThreshold": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 10 - }, - "memoryThreshold": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 10 - }, - "maxInputTokens": { - "type": "integer", - "minimum": 1000, - "maximum": 2000000 - } - } - }, - "reviewModel": { - "type": [ - "object", - "null" - ], - "properties": { - "provider": { - "type": "string", - "minLength": 1, - "maxLength": 80, - "pattern": "^[a-z0-9-]+$" - }, - "model": { - "type": "string", - "minLength": 1, - "maxLength": 200 - } - }, - "required": [ - "provider", - "model" - ] - }, - "desktopModel": { - "type": [ - "object", - "null" - ], - "properties": { - "provider": { - "type": "string", - "minLength": 1, - "maxLength": 80, - "pattern": "^[a-z0-9-]+$" - }, - "model": { - "type": "string", - "minLength": 1, - "maxLength": 200 - } - }, - "required": [ - "provider", - "model" - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Agent" - }, - { - "type": "null" - } + "required": [ + "defaultProvider", + "exaKeyConfigured" ] } } @@ -10882,8 +11296,8 @@ } } }, - "delete": { - "operationId": "deleteAgent", + "put": { + "operationId": "updateWebSearch", "security": [ { "BearerAuth": [] @@ -10892,19 +11306,54 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "defaultProvider": { + "type": "string", + "enum": [ + "mixed", + "exa" + ] + } + }, + "required": [ + "defaultProvider" + ] + } + } } - ], + }, "responses": { - "204": { - "description": "Success, no response body" + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "defaultProvider": { + "type": "string", + "enum": [ + "mixed", + "exa" + ] + }, + "exaKeyConfigured": { + "type": "boolean" + } + }, + "required": [ + "defaultProvider", + "exaKeyConfigured" + ] + } + } + } }, "400": { "description": "Invalid request or operation", @@ -10989,9 +11438,10 @@ } } }, - "/v1/agents/{id}/duplicate": { - "post": { - "operationId": "duplicateAgent", + "/v1/judge-model": { + "get": { + "operationId": "getJudgeModel", + "description": "The account's judge model for desktop jobs' intent checks, and the models the account's provider keys reach.", "security": [ { "BearerAuth": [] @@ -11000,30 +11450,13 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" - } - ], "responses": { - "201": { + "200": { "description": "Success", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Agent" - }, - { - "type": "null" - } - ] + "$ref": "#/components/schemas/JudgeModel" } } } @@ -11109,11 +11542,9 @@ } } } - } - }, - "/v1/agents/{id}/chat": { - "get": { - "operationId": "getChat", + }, + "put": { + "operationId": "updateJudgeModel", "security": [ { "BearerAuth": [] @@ -11122,45 +11553,63 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" - }, - { - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 200 - }, - "required": false, - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSnapshot" - } - } - } - }, - "400": { - "description": "Invalid request or operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "judgeModel": { + "type": [ + "object", + "null" + ], + "properties": { + "provider": { + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-z0-9-]+$" + }, + "model": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "provider", + "model" + ] + } + }, + "required": [ + "judgeModel" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JudgeModel" + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } }, "401": { @@ -11236,9 +11685,10 @@ } } }, - "/v1/agents/{id}/chat/history": { + "/v1/vision-model": { "get": { - "operationId": "getChatHistory", + "operationId": "getVisionModel", + "description": "The account's vision model, which describes images for bots whose model can't read them, and the models that read images the account's provider keys reach.", "security": [ { "BearerAuth": [] @@ -11247,43 +11697,13 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" - }, - { - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 200 - }, - "required": false, - "name": "limit", - "in": "query" - }, - { - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "required": false, - "name": "before", - "in": "query" - } - ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TranscriptPage" + "$ref": "#/components/schemas/VisionModel" } } } @@ -11369,11 +11789,10 @@ } } } - } - }, - "/v1/agents/{id}/coding-jobs": { - "get": { - "operationId": "listCodingJobs", + }, + "put": { + "operationId": "updateVisionModel", + "description": "Choose the account's vision model, or turn it off with null. It must be one of the choices `getVisionModel` lists.", "security": [ { "BearerAuth": [] @@ -11382,23 +11801,51 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "visionModel": { + "type": [ + "object", + "null" + ], + "properties": { + "provider": { + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-z0-9-]+$" + }, + "model": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "provider", + "model" + ] + } + }, + "required": [ + "visionModel" + ] + } + } } - ], + }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CodingJobs" + "$ref": "#/components/schemas/VisionModel" } } } @@ -11486,10 +11933,9 @@ } } }, - "/v1/agents/{id}/coding-jobs/{name}/answer": { - "post": { - "operationId": "answerCodingJob", - "description": "Answers the coding job's open question, which resumes the job. 409 when the job no longer waits on that question.", + "/v1/agents": { + "get": { + "operationId": "listAgents", "security": [ { "BearerAuth": [] @@ -11498,52 +11944,19 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" - }, - { - "schema": { - "type": "string" - }, - "required": true, - "name": "name", - "in": "path" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "questionId": { - "type": "string", - "minLength": 1 - }, - "text": { - "type": "string", - "minLength": 1, - "maxLength": 32000 + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentPreview" } - }, - "required": [ - "questionId", - "text" - ] + } } } - } - }, - "responses": { - "204": { - "description": "Success, no response body" }, "400": { "description": "Invalid request or operation", @@ -11626,11 +12039,9 @@ } } } - } - }, - "/v1/agents/{id}/coding-jobs/{name}/history": { - "get": { - "operationId": "getCodingJobHistory", + }, + "post": { + "operationId": "createAgent", "security": [ { "BearerAuth": [] @@ -11639,43 +12050,1728 @@ "SessionCookie": [] } ], - "parameters": [ - { - "schema": { - "type": "string" - }, - "required": true, - "name": "id", - "in": "path" - }, - { - "schema": { - "type": "string" - }, - "required": true, - "name": "name", - "in": "path" - }, - { - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 200 - }, - "required": false, - "name": "limit", - "in": "query" - }, - { - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "required": false, - "name": "before", - "in": "query" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 80 + }, + "avatar": { + "type": "object", + "properties": { + "definition": { + "type": "object", + "properties": { + "version": { + "type": "number", + "enum": [ + 1 + ] + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "body": { + "type": "object", + "properties": { + "path": { + "type": "string", + "minLength": 1, + "maxLength": 6000 + } + }, + "required": [ + "path" + ], + "additionalProperties": false + }, + "eyes": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "spacing": { + "type": "number" + }, + "scale": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "spacing", + "scale" + ], + "additionalProperties": false + } + }, + "required": [ + "version", + "id", + "name", + "body", + "eyes" + ], + "additionalProperties": false + }, + "color": { + "type": "string", + "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" + }, + "eyeColor": { + "type": "string", + "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" + } + }, + "required": [ + "definition", + "color", + "eyeColor" + ] + }, + "description": { + "type": "string", + "maxLength": 1000, + "default": "" + }, + "instructions": { + "type": "string", + "maxLength": 32000, + "default": "You are a thoughtful, capable personal assistant." + }, + "provider": { + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-z0-9-]+$", + "default": "openai" + }, + "model": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "default": "gpt-4.1" + }, + "webSearchProvider": { + "type": [ + "string", + "null" + ], + "enum": [ + "mixed", + "exa", + null + ] + }, + "enabled": { + "type": "boolean", + "default": true + }, + "tools": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "maxItems": 100, + "default": [ + "memory" + ] + }, + "skills": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "instructions": { + "type": "string", + "maxLength": 32000 + } + }, + "required": [ + "name", + "instructions" + ] + }, + "maxItems": 100, + "default": [] + }, + "sharedSkills": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 100 + }, + "sharedMemory": { + "type": "boolean" + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 30, + "default": [] + }, + "delegates": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 30, + "default": [] + }, + "inference": { + "type": "object", + "properties": { + "thinkingLevel": { + "type": "string", + "enum": [ + "off", + "minimal", + "low", + "medium", + "high", + "xhigh", + "max" + ], + "default": "off" + }, + "temperature": { + "type": "number", + "minimum": 0, + "maximum": 2 + }, + "maxOutputTokens": { + "type": "integer", + "minimum": 1, + "maximum": 1000000 + } + } + }, + "review": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true + }, + "skillThreshold": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 10 + }, + "memoryThreshold": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 10 + }, + "maxInputTokens": { + "type": "integer", + "minimum": 1000, + "maximum": 2000000 + } + } + }, + "reviewModel": { + "type": [ + "object", + "null" + ], + "properties": { + "provider": { + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-z0-9-]+$" + }, + "model": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "provider", + "model" + ] + }, + "desktopModel": { + "type": [ + "object", + "null" + ], + "properties": { + "provider": { + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-z0-9-]+$" + }, + "model": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "provider", + "model" + ] + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Agent" + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}": { + "get": { + "operationId": "getAgent", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Agent" + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "patch": { + "operationId": "updateAgent", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 80 + }, + "avatar": { + "type": "object", + "properties": { + "definition": { + "type": "object", + "properties": { + "version": { + "type": "number", + "enum": [ + 1 + ] + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "body": { + "type": "object", + "properties": { + "path": { + "type": "string", + "minLength": 1, + "maxLength": 6000 + } + }, + "required": [ + "path" + ], + "additionalProperties": false + }, + "eyes": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "spacing": { + "type": "number" + }, + "scale": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "spacing", + "scale" + ], + "additionalProperties": false + } + }, + "required": [ + "version", + "id", + "name", + "body", + "eyes" + ], + "additionalProperties": false + }, + "color": { + "type": "string", + "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" + }, + "eyeColor": { + "type": "string", + "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" + } + }, + "required": [ + "definition", + "color", + "eyeColor" + ] + }, + "description": { + "type": "string", + "maxLength": 1000 + }, + "instructions": { + "type": "string", + "maxLength": 32000 + }, + "provider": { + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-z0-9-]+$" + }, + "model": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "webSearchProvider": { + "type": [ + "string", + "null" + ], + "enum": [ + "mixed", + "exa", + null + ] + }, + "enabled": { + "type": "boolean" + }, + "tools": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "maxItems": 100 + }, + "skills": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "instructions": { + "type": "string", + "maxLength": 32000 + } + }, + "required": [ + "name", + "instructions" + ] + }, + "maxItems": 100 + }, + "sharedSkills": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 100 + }, + "sharedMemory": { + "type": "boolean" + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 30 + }, + "delegates": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 30 + }, + "inference": { + "type": "object", + "properties": { + "thinkingLevel": { + "type": "string", + "enum": [ + "off", + "minimal", + "low", + "medium", + "high", + "xhigh", + "max" + ], + "default": "off" + }, + "temperature": { + "type": "number", + "minimum": 0, + "maximum": 2 + }, + "maxOutputTokens": { + "type": "integer", + "minimum": 1, + "maximum": 1000000 + } + } + }, + "review": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true + }, + "skillThreshold": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 10 + }, + "memoryThreshold": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 10 + }, + "maxInputTokens": { + "type": "integer", + "minimum": 1000, + "maximum": 2000000 + } + } + }, + "reviewModel": { + "type": [ + "object", + "null" + ], + "properties": { + "provider": { + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-z0-9-]+$" + }, + "model": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "provider", + "model" + ] + }, + "desktopModel": { + "type": [ + "object", + "null" + ], + "properties": { + "provider": { + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-z0-9-]+$" + }, + "model": { + "type": "string", + "minLength": 1, + "maxLength": 200 + } + }, + "required": [ + "provider", + "model" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Agent" + }, + { + "type": "null" + } + ] + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteAgent", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], + "responses": { + "204": { + "description": "Success, no response body" + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}/duplicate": { + "post": { + "operationId": "duplicateAgent", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Agent" + }, + { + "type": "null" + } + ] + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}/chat": { + "get": { + "operationId": "getChat", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + }, + { + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200 + }, + "required": false, + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSnapshot" + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}/chat/history": { + "get": { + "operationId": "getChatHistory", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + }, + { + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200 + }, + "required": false, + "name": "limit", + "in": "query" + }, + { + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "required": false, + "name": "before", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TranscriptPage" + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}/coding-jobs": { + "get": { + "operationId": "listCodingJobs", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CodingJobs" + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}/coding-jobs/{name}/answer": { + "post": { + "operationId": "answerCodingJob", + "description": "Answers the coding job's open question, which resumes the job. 409 when the job no longer waits on that question.", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + }, + { + "schema": { + "type": "string" + }, + "required": true, + "name": "name", + "in": "path" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "questionId": { + "type": "string", + "minLength": 1 + }, + "text": { + "type": "string", + "minLength": 1, + "maxLength": 32000 + } + }, + "required": [ + "questionId", + "text" + ] + } + } + } + }, + "responses": { + "204": { + "description": "Success, no response body" + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}/coding-jobs/{name}/history": { + "get": { + "operationId": "getCodingJobHistory", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + }, + { + "schema": { + "type": "string" + }, + "required": true, + "name": "name", + "in": "path" + }, + { + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200 + }, + "required": false, + "name": "limit", + "in": "query" + }, + { + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "required": false, + "name": "before", + "in": "query" + } ], "responses": { "200": { @@ -13232,6 +15328,16 @@ "required": false, "name": "limit", "in": "query" + }, + { + "schema": { + "type": "string", + "description": "With partial=true, each snapshot's partial carries the reply text the bot is writing, updated about every 100 ms. Without it, partial stays empty and replies appear only when the turn ends." + }, + "required": false, + "description": "With partial=true, each snapshot's partial carries the reply text the bot is writing, updated about every 100 ms. Without it, partial stays empty and replies appear only when the turn ends.", + "name": "partial", + "in": "query" } ], "responses": { @@ -15444,26 +17550,393 @@ } } } - }, + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "request": { + "$ref": "#/components/schemas/BotRequest" + }, + "agent": { + "$ref": "#/components/schemas/Agent" + } + }, + "required": [ + "request", + "agent" + ] + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}/bot-requests/{requestId}/decline": { + "post": { + "operationId": "declineBotRequest", + "description": "Declines a pending bot request.", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + }, + { + "schema": { + "type": "string" + }, + "required": true, + "name": "requestId", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BotRequest" + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}/call-requests": { + "get": { + "operationId": "listCallRequests", + "description": "The bot's call requests, newest first: its proposals to phone someone other than the owner, and how each call went.", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallRequest" + } + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}/call-requests/{requestId}/approve": { + "post": { + "operationId": "approveCallRequest", + "description": "Approves a pending call request and dials at once; returns once the voice gateway was asked to call, with the status calling. 409, with the request still pending, when the request is not pending, the number no longer passes the number rules, calls to other people are switched off for the line, no voice gateway that places calls is connected, or the line has a call.", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + }, + { + "schema": { + "type": "string" + }, + "required": true, + "name": "requestId", + "in": "path" + } + ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "request": { - "$ref": "#/components/schemas/BotRequest" - }, - "agent": { - "$ref": "#/components/schemas/Agent" - } - }, - "required": [ - "request", - "agent" - ] + "$ref": "#/components/schemas/CallRequest" } } } @@ -15551,10 +18024,10 @@ } } }, - "/v1/agents/{id}/bot-requests/{requestId}/decline": { + "/v1/agents/{id}/call-requests/{requestId}/decline": { "post": { - "operationId": "declineBotRequest", - "description": "Declines a pending bot request.", + "operationId": "declineCallRequest", + "description": "Declines a pending call request; the bot gets a notice.", "security": [ { "BearerAuth": [] @@ -15587,7 +18060,151 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BotRequest" + "$ref": "#/components/schemas/CallRequest" + } + } + } + }, + "400": { + "description": "Invalid request or operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing, expired, or invalid account session", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "405": { + "description": "Resource is read-only", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflicting request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Request body exceeds the size limit", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/v1/agents/{id}/call-requests/{requestId}/transcript": { + "get": { + "operationId": "getCallRequestTranscript", + "description": "The messages of the call's conversation: the callee's words as user messages and the bot's replies. Empty before the call, and when the callee objected to the call.", + "security": [ + { + "BearerAuth": [] + }, + { + "SessionCookie": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "required": true, + "name": "id", + "in": "path" + }, + { + "schema": { + "type": "string" + }, + "required": true, + "name": "requestId", + "in": "path" + }, + { + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200 + }, + "required": false, + "name": "limit", + "in": "query" + }, + { + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "required": false, + "name": "before", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TranscriptPage" } } } diff --git a/apfelkern/Contract/pin.json b/apfelkern/Contract/pin.json deleted file mode 100644 index 9512bd0..0000000 --- a/apfelkern/Contract/pin.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "checksums": { - "CHANGELOG.md": "f1b51f5a2371989fb0a961e8d2097879a0fb90fc4d44a7554e32555ade38da32", - "activity-event.schema.json": "4fa4a524cf635a837b53a322f2bdcbcccba75bc24b33260863ea8124f96ee21e", - "chat-snapshot.schema.json": "eb4fc4fea61127a93e78b09eb7223a1ed730b49bc7a9a3dedfbf0fa70c3932c6", - "desktop-control.schema.json": "d056a6914bb219d64634eeb701d8e9bae19bbd7bce3dc88bafe538429642070f", - "group-chat-snapshot.schema.json": "58efc1a9112e6f868468663db7d52be716740444a189b24620a886d7a34ea9e0", - "heartbeat.schema.json": "e1fc21c5ca3e658bfbfbb5005a0d1dfec2be6e720b5a1ff86f699a13cc5db221", - "openapi.json": "3f389004678290cd63833233a48f17b321bb1157ae62956f72ae882b034a0c84", - "source-commit.txt": "139de61622a3ef9a8c0112ca42971afcc5b5da9613f6604b2c64a37166a623e3" - }, - "kind": "local-export", - "sourceCommit": "a3218780cf457d4377f195ef9e67d640c5158c24", - "version": "6.0.0" -} diff --git a/apfelkern/Contract/source-commit.txt b/apfelkern/Contract/source-commit.txt deleted file mode 100644 index c4cbfbf..0000000 --- a/apfelkern/Contract/source-commit.txt +++ /dev/null @@ -1 +0,0 @@ -a3218780cf457d4377f195ef9e67d640c5158c24 diff --git a/apfelkern/Generation/update-pr.md b/apfelkern/Generation/update-pr.md deleted file mode 100644 index d54cae2..0000000 --- a/apfelkern/Generation/update-pr.md +++ /dev/null @@ -1,15 +0,0 @@ -## Summary - -Update the bot contract pin and regenerate the Swift client with the recorded tool versions. - -## Evidence - -The updater verifies every payload checksum before generation. Before creating this PR, it runs byte-for-byte regeneration checks, `swift build`, `swift test`, `swiftlint lint`, and the unsigned iOS Simulator build of `BotAvatar`. - -Review the workflow run and the contract changelog in `Contract/CHANGELOG.md` before merging. Public PR checks might require approval for a PR created with `GITHUB_TOKEN`; this updater runs its own checks regardless. - -## Risk & Rollback - -**Reversibility:** Reversible. Revert the pin and generated output together. - -**Blast Radius:** Shared HTTP operations and event payloads consumed by the Apple apps. Both apps build against this apfelkern by path, so run the macOS tests and the iOS build and unit tests before merging. diff --git a/apfelkern/README.md b/apfelkern/README.md index a5f9bff..c7987b1 100644 --- a/apfelkern/README.md +++ b/apfelkern/README.md @@ -9,12 +9,12 @@ Shared Swift package for the Crumble macOS and iOS apps. Requires Swift 6.2+ and ## Update the API contract -`Contract/pin.json` pins the verified `bot` contract release (`contract-vX.Y.Z`) and SHA-256 checksums. Ordinary builds use committed output in `Sources/apfelkern/Generated` without running the generator. +`Contract/` holds a copy of the `bot` contract files from `bot/openapi/`. Ordinary builds use committed output in `Sources/apfelkern/Generated` without running the generator. A running server also serves its document at `GET /openapi.json`. ```sh -python3 scripts/contract.py # Regenerate from current pin -python3 scripts/contract.py --check # Verify checksums and byte-for-byte output -python3 scripts/contract.py --update contract-vX.Y.Z # Update to a published release (or local bundle path) +python3 scripts/contract.py # Regenerate from Contract/ +python3 scripts/contract.py --check # Verify the generated output byte-for-byte +python3 scripts/contract.py --update ../../bot/openapi # Copy the contract files, regenerate, and run swift test ``` ## Verify changes diff --git a/apfelkern/Sources/BotAvatar/ChatCards.swift b/apfelkern/Sources/BotAvatar/ChatCards.swift index 39b8510..01a1d24 100644 --- a/apfelkern/Sources/BotAvatar/ChatCards.swift +++ b/apfelkern/Sources/BotAvatar/ChatCards.swift @@ -31,7 +31,7 @@ public struct JobFailureCard: View { } } -/// "Sent from Discord", under an owner message that came through a message gateway. +/// "Sent from Discord" or "Spoken on a call", under an owner message that came through a gateway. public struct GatewayOriginLabel: View { let id: String @@ -41,11 +41,58 @@ public struct GatewayOriginLabel: View { public var body: some View { HStack(spacing: 4) { - BrandLogoView(.gateway(id), size: 12) - Text("Sent from \(gatewayLabel(id))") + if id == voiceGatewayID { + Image(systemName: "phone").font(.system(size: 10)) + } else { + BrandLogoView(.gateway(id), size: 12) + } + Text(gatewayOrigin(id)) } .font(.caption) .foregroundStyle(.secondary) .accessibilityElement(children: .combine) } } + +/// A centered phone marker for a call's start or end, with the greeting of a call the bot placed under it. +public struct CallMarkerView: View { + let title: String + let quote: String? + let reactions: [String] + + public init(marker: CallMarker, botName: String, reactions: [String] = []) { + title = marker.title(botName: botName) + quote = marker.quote + self.reactions = reactions + } + + public var body: some View { + VStack(spacing: 4) { + HStack(spacing: 6) { + Image(systemName: "phone").font(.caption) + Text(title) + if !reactions.isEmpty { + Text(reactions.joined()) + .padding(.horizontal, 6) + .padding(.vertical, 1) + .background(.quaternary, in: .capsule) + .accessibilityLabel("Reacted \(reactions.joined(separator: " "))") + } + } + .font(.callout) + .foregroundStyle(.secondary) + .multilineTextAlignment(.center) + .accessibilityElement(children: .combine) + if let quote { + HStack(spacing: 8) { + Capsule().fill(.quaternary).frame(width: 2) + Text(quote).font(.callout).foregroundStyle(.secondary).textSelection(.enabled) + } + .fixedSize(horizontal: false, vertical: true) + .frame(maxWidth: 448, alignment: .leading) + } + } + .padding(.vertical, 6) + .frame(maxWidth: .infinity) + } +} diff --git a/apfelkern/Sources/apfelkern/APIClient+Agents.swift b/apfelkern/Sources/apfelkern/APIClient+Agents.swift index 13fd1ec..8f4cdfb 100644 --- a/apfelkern/Sources/apfelkern/APIClient+Agents.swift +++ b/apfelkern/Sources/apfelkern/APIClient+Agents.swift @@ -126,6 +126,39 @@ extension APIClient { } } + /// The bot's requests to call someone other than the owner, newest first, pending and decided. + public func callRequests(_ agentID: String) async throws -> [CallRequest] { + try await invoke { + try await $0.listCallRequests(.init(path: .init(id: agentID))).ok.body.json.map(CallRequest.init(wire:)) + } + } + + /// Places the call. Fails with a 409, whose message the owner can read, when the call can't start; + /// the request stays pending. + public func approveCallRequest(_ agentID: String, id: String) async throws -> CallRequest { + try await invoke { + CallRequest(wire: try await $0.approveCallRequest(.init(path: .init(id: agentID, requestId: id))).ok.body.json) + } + } + + /// Fails with a 409 once decided. + public func declineCallRequest(_ agentID: String, id: String) async throws -> CallRequest { + try await invoke { + CallRequest(wire: try await $0.declineCallRequest(.init(path: .init(id: agentID, requestId: id))).ok.body.json) + } + } + + /// The call's messages, a page at a time. + public func callRequestTranscript(_ agentID: String, id: String, before: String = "", limit: Int = 200) + async throws -> ChatHistoryResponse { + try await invoke { + try ChatHistoryResponse(wire: await $0.getCallRequestTranscript(.init( + path: .init(id: agentID, requestId: id), + query: .init(limit: limit > 0 ? limit : nil, before: before.nilIfEmpty) + )).ok.body.json) + } + } + public func codingJobHistory(_ agentID: String, name: String, before: String, limit: Int) async throws -> ChatHistoryResponse { try await invoke { diff --git a/apfelkern/Sources/apfelkern/BotRequest.swift b/apfelkern/Sources/apfelkern/BotRequest.swift index aca98db..78ed36d 100644 --- a/apfelkern/Sources/apfelkern/BotRequest.swift +++ b/apfelkern/Sources/apfelkern/BotRequest.swift @@ -92,7 +92,7 @@ extension BotRequest { } extension JSONValue { - fileprivate func decoded() throws -> T { + func decoded() throws -> T { try JSONDecoder().decode(T.self, from: JSONEncoder().encode(self)) } } diff --git a/apfelkern/Sources/apfelkern/CallRequest.swift b/apfelkern/Sources/apfelkern/CallRequest.swift new file mode 100644 index 0000000..1b30230 --- /dev/null +++ b/apfelkern/Sources/apfelkern/CallRequest.swift @@ -0,0 +1,79 @@ +import Foundation + +/// A bot's proposal to phone someone other than the owner, waiting for the owner or decided. +public struct CallRequest: Identifiable, Hashable, Sendable { + public enum Status: Hashable, Sendable { + case pending + case declined + case calling + case ended + } + + public enum Outcome: Hashable, Sendable { + case answered + case unanswered + case busy + case failed + } + + public static let toolName = "request_call" + + public var id: String + /// The bot that asked. + public var agentID: String + public var number: String + /// Who the bot calls. + public var callee: String + public var goal: String + /// What the bot says first when the callee answers. + public var opening: String + public var status: Status + public var callID: String? + /// The conversation holding the call's transcript. + public var conversationID: String? + public var outcome: Outcome? + public var error: String? + public var requestedAt: String + public var decidedAt: String? + public var endedAt: String? + + /// A `request_call` result carries the request as it was saved. Whether it still waits is in the + /// bot's requests. + public init?(message: Message) { + guard message.role == "toolResult", message.toolName == Self.toolName, message.isError != true, + let details = message.toolDetails, + let wire: Components.Schemas.CallRequest = try? details.decoded() + else { return nil } + self.init(wire: wire) + } +} + +extension CallRequest { + init(wire: Components.Schemas.CallRequest) { + id = wire.id + agentID = wire.agentId + number = wire.number + callee = wire.callee + goal = wire.goal + opening = wire.opening + status = switch wire.status { + case .pending: .pending + case .declined: .declined + case .calling: .calling + case .ended: .ended + } + callID = wire.callId + conversationID = wire.conversationId + outcome = switch wire.outcome { + case .answered: .answered + case .unanswered: .unanswered + case .busy: .busy + case .failed: .failed + case ._empty_, nil: nil + } + error = wire.error?.nilIfEmpty + requestedAt = wire.requestedAt + decidedAt = wire.decidedAt + endedAt = wire.endedAt + } +} diff --git a/apfelkern/Sources/apfelkern/CallRequestBoard.swift b/apfelkern/Sources/apfelkern/CallRequestBoard.swift new file mode 100644 index 0000000..ddefe5d --- /dev/null +++ b/apfelkern/Sources/apfelkern/CallRequestBoard.swift @@ -0,0 +1,143 @@ +import Foundation +import Observation + +/// What the owner has started on a waiting call request. +public struct CallRequestDecision: Hashable, Sendable { + /// A decision is on its way to the server. + public var sending = false + /// The server's reason for refusing, which the owner can read. + public var error = "" + + public init() {} +} + +/// The selected bot's call requests and the owner's decisions on them. A request only reads as +/// decided once the server said so. Results that return after the selection or connection changed +/// are dropped. +@MainActor @Observable +public final class CallRequestBoard { + /// The bot's requests as the server last listed them, newest first. + public private(set) var requests: [CallRequest] = [] + public private(set) var decisions: [String: CallRequestDecision] = [:] + /// Requests the chat shows, as their tool results saved them. + private var shown: [String: CallRequest] = [:] + private var reads = 0 + /// Reads up to this one are ignored: they may predate a newer read or a decision. + private var settledReads = 0 + private var agentID = "" + private var scope = 0 + private let pollInterval: Duration + + public init(pollInterval: Duration = .seconds(5)) { + self.pollInterval = pollInterval + } + + public func reset() { + scope += 1 + agentID = "" + requests = [] + decisions = [:] + shown = [:] + } + + /// Reopening the same bot's chat keeps its decisions; a request may have ended since, so the + /// next messages read the list anew. + public func select(_ agentID: String) { + shown = [:] + guard agentID != self.agentID else { return } + reset() + self.agentID = agentID + } + + /// The request as the server last reported it, or as it was saved until the list has answered. + public func current(_ request: CallRequest) -> CallRequest { + requests.first { $0.id == request.id } ?? request + } + + public func decision(for id: String) -> CallRequestDecision { + decisions[id] ?? CallRequestDecision() + } + + // MARK: Reading + + /// A new request in the messages is the cue to ask the server about it. + public func refreshIfChanged(messages: [Message], client: APIClient) { + let added = messages.compactMap(CallRequest.init(message:)).filter { shown[$0.id] == nil } + guard !added.isEmpty else { return } + for request in added { shown[request.id] = request } + refresh(client: client) + } + + public func refresh(client: APIClient) { + guard !agentID.isEmpty else { return } + let version = scope + let agentID = agentID + reads += 1 + let read = reads + Task { + let loaded = try? await client.callRequests(agentID) + guard scope == version, read > settledReads, let loaded else { return } + settledReads = read + requests = loaded + } + } + + /// A request waits for the owner or a call is going on, and nothing in the chat says when that changes. + public var needsPolling: Bool { + requests.contains { $0.status == .pending || $0.status == .calling } + || shown.values.contains { current($0).status == .pending || current($0).status == .calling } + } + + /// Runs until cancelled. + public func watch(client: APIClient) async { + while !Task.isCancelled { + try? await Task.sleep(for: pollInterval) + guard !Task.isCancelled else { return } + refresh(client: client) + } + } + + // MARK: Deciding + + /// Places the call. A refusal leaves the request waiting, with the server's text in `decision(for:).error`. + public func approve(_ request: CallRequest, client: APIClient) { + decide(request.id, client: client) { + try await $0.approveCallRequest(request.agentID, id: request.id) + } + } + + public func decline(_ request: CallRequest, client: APIClient) { + decide(request.id, client: client) { + try await $0.declineCallRequest(request.agentID, id: request.id) + } + } + + private func decide( + _ id: String, client: APIClient, + _ work: @escaping @MainActor (APIClient) async throws -> CallRequest + ) { + guard !decision(for: id).sending else { return } + let version = scope + decisions[id, default: CallRequestDecision()].sending = true + decisions[id]?.error = "" + Task { + do { + let decided = try await work(client) + guard scope == version else { return } + settledReads = reads + if let index = requests.firstIndex(where: { $0.id == id }) { + requests[index] = decided + } else { + requests.insert(decided, at: 0) + } + decisions[id] = nil + } catch { + guard scope == version else { return } + settledReads = reads + decisions[id]?.sending = false + decisions[id]?.error = friendlyError(error) + } + refresh(client: client) + } + } +} diff --git a/apfelkern/Sources/apfelkern/ChatCards.swift b/apfelkern/Sources/apfelkern/ChatCards.swift index 404e8e3..f0d4f54 100644 --- a/apfelkern/Sources/apfelkern/ChatCards.swift +++ b/apfelkern/Sources/apfelkern/ChatCards.swift @@ -29,12 +29,48 @@ public struct JobFailure: Hashable, Sendable { public var title: String { text.prefix(1).uppercased() + text.dropFirst() } } +/// A voice gateway call in the chat: its start or end, or the notice that its end woke the bot. +public struct CallMarker: Hashable, Sendable { + public static let startedKind = "call-started" + public static let endedKind = "call-ended" + public static let originKind = "call" + + /// The bot placed the call, so its start reads "{bot} called you" over the greeting it spoke. + public var outbound: Bool + public var ended: Bool + public var text: String + + public init?(message: Message) { + if message.role == "user", message.origin?.kind == Self.originKind { + outbound = false + ended = true + } else if message.role == "event", let call = message.call, + [Self.startedKind, Self.endedKind].contains(message.kind) { + outbound = call.direction == .outbound + ended = message.kind == Self.endedKind + } else { + return nil + } + text = message.text + } + + public func title(botName: String) -> String { + if ended { return text } + return outbound ? "\(botName) called you" : "Call started" + } + + /// The greeting the bot spoke on a call it placed. + public var quote: String? { !ended && outbound ? text.nilIfEmpty : nil } +} + /// The title of the collapsed row that stands in for an automated turn's prompt; nil for other messages. public func noticeTitle(_ message: Message) -> String? { guard message.role == "user", let origin = message.origin else { return nil } let name = origin.name ?? "" switch origin.kind { case "bot_request": return "Bot request" + case CallRequest.noticeOriginKind: return "Call request" + case CallMarker.originKind: return "Call" case "task", "credential", "bot": return messageLabel(message) case "script": return "Script automation · \(name)" case "event": return "Automation · \(name), event from \(origin.source ?? "a deleted source")" @@ -47,6 +83,15 @@ public func gatewayLabel(_ id: String) -> String { id == "discord" ? "Discord" : id } +/// The voice gateway's `via` on a spoken message. +public let voiceGatewayID = "voice" + +/// The line under an owner message that came through a gateway: "Sent from Discord" or, for a spoken message, +/// "Spoken on a call". +public func gatewayOrigin(_ id: String) -> String { + id == voiceGatewayID ? "Spoken on a call" : "Sent from \(gatewayLabel(id))" +} + /// Keeps the conversation itself: owner and agent text, context events, and the cards tools leave, /// not thinking, tool calls, or other tool results. public func shownInChat(_ message: Message) -> Bool { @@ -54,19 +99,100 @@ public func shownInChat(_ message: Message) -> Bool { case "toolResult": return DisplayComponent(message: message) != nil || message.isDesktopScreenshot || Job(message: message) != nil || BotRequest(message: message) != nil + || CallRequest(message: message) != nil || BotSecretAsk(message: message) != nil case "user": guard !JobKind.isReport(message) else { return false } return !message.text.isEmpty || !(message.attachments ?? []).isEmpty case "event": - return !message.text.isEmpty + return !message.text.isEmpty && !(message.kind == CallMarker.startedKind && message.call?.callee != nil) case "assistant": - guard case .array(let blocks)? = message.blocks else { return !contentText(message.blocks).isEmpty } - return blocks.contains { - $0["type"]?.stringValue == "text" - && !($0["text"]?.stringValue ?? "").trimmingCharacters(in: .whitespacesAndNewlines).isEmpty - } + return hasAssistantText(message) default: return false } } + +private func hasAssistantText(_ message: Message) -> Bool { + guard case .array(let blocks)? = message.blocks else { return !contentText(message.blocks).isEmpty } + return blocks.contains { + $0["type"]?.stringValue == "text" + && !($0["text"]?.stringValue ?? "").trimmingCharacters(in: .whitespacesAndNewlines).isEmpty + } +} + +extension CallRequest { + public static let noticeOriginKind = "call_request" + + /// The state the card shows; nil while the request waits for the owner. + public var stateLabel: String? { + switch status { + case .pending: nil + case .declined: "Declined" + case .calling: "Calling" + case .ended: + switch outcome { + case .answered: "Answered" + case .unanswered: "Not answered" + case .busy: "Busy" + case .failed: "Failed" + case nil: "Ended" + } + } + } +} + +private let endedCallPrefix = "voice-call:" +private let endedCallSuffix = ":ended" +private let sweptRequestPrefix = "call-request:" + +/// The call request an outside call's notice stands for; nil for a call with the owner and for notices of +/// other origins. +public func callRequest(for message: Message, in requests: [CallRequest]) -> CallRequest? { + guard message.role == "user", + [CallMarker.originKind, CallRequest.noticeOriginKind].contains(message.origin?.kind), + let requestID = message.requestId + else { return nil } + if requestID.hasPrefix(endedCallPrefix), requestID.hasSuffix(endedCallSuffix) { + let callID = requestID.dropFirst(endedCallPrefix.count).dropLast(endedCallSuffix.count) + guard !callID.isEmpty, !callID.contains(":") else { return nil } + return requests.first { $0.callID == String(callID) } + } + if requestID.hasPrefix(sweptRequestPrefix) { + let id = requestID.dropFirst(sweptRequestPrefix.count) + guard !id.isEmpty, !id.contains(":") else { return nil } + return requests.first { $0.id == String(id) } + } + return nil +} + +/// What an outside call's notice says after the callee's name, such as "ended after 2 minutes". +public func callNoticeDetail(_ message: Message, request: CallRequest) -> String { + let lead = "Call to \(request.callee) " + return message.text.hasPrefix(lead) ? String(message.text.dropFirst(lead.count)) : message.text +} + +/// One thing said on an outside call. +public struct CallTranscriptLine: Identifiable, Hashable, Sendable { + public enum Speaker: Hashable, Sendable { + /// The person the bot called. + case callee + case bot + } + + public var id: String + public var speaker: Speaker + public var text: String +} + +/// The spoken lines of a call's transcript page, in order: what the callee said and the bot's replies with text. +public func callTranscriptLines(_ messages: [Message]) -> [CallTranscriptLine] { + messages.compactMap { message in + switch message.role { + case "user": CallTranscriptLine(id: message.id, speaker: .callee, text: message.text) + case "assistant" where hasAssistantText(message): + CallTranscriptLine(id: message.id, speaker: .bot, text: message.text) + default: nil + } + } +} diff --git a/apfelkern/Sources/apfelkern/ChatModels.swift b/apfelkern/Sources/apfelkern/ChatModels.swift index 458c3e0..4cf0938 100644 --- a/apfelkern/Sources/apfelkern/ChatModels.swift +++ b/apfelkern/Sources/apfelkern/ChatModels.swift @@ -51,6 +51,26 @@ public struct BotCommunication: Codable, Hashable, Sendable { } } +/// The voice gateway call a `call-started` or `call-ended` event belongs to. +public struct CallEvent: Codable, Hashable, Sendable { + public enum Direction: String, Codable, Hashable, Sendable { + case inbound + /// The bot called the owner. + case outbound + } + + public var callId: String + public var direction: Direction + /// Who an outside call phones; nil for a call with the owner. + public var callee: String? + + public init(callId: String, direction: Direction, callee: String? = nil) { + self.callId = callId + self.direction = direction + self.callee = callee + } +} + /// Client-side delivery state for an optimistic owner message. public enum MessageDeliveryState: String, Codable, Hashable, Sendable { case confirmed @@ -71,6 +91,7 @@ public struct Message: Codable, Identifiable, Hashable, Sendable { public var communication: BotCommunication? public var jobQuestion: JobQuestionEvent? public var heldAction: HeldActionEvent? + public var call: CallEvent? public var timestamp: Int64? public var createdAt: String? public var attachments: [AttachmentInfo]? @@ -90,7 +111,7 @@ public struct Message: Codable, Identifiable, Hashable, Sendable { blocks: JSONValue? = nil, kind: String? = nil, replyTo: String? = nil, replyPreview: String? = nil, origin: MessageOrigin? = nil, communication: BotCommunication? = nil, jobQuestion: JobQuestionEvent? = nil, - heldAction: HeldActionEvent? = nil, timestamp: Int64? = nil, + heldAction: HeldActionEvent? = nil, call: CallEvent? = nil, timestamp: Int64? = nil, attachments: [AttachmentInfo]? = nil, toolName: String? = nil, toolCallId: String? = nil, isError: Bool? = nil, toolDetails: JSONValue? = nil, requestId: String? = nil, sources: [MessageSource]? = nil, @@ -108,6 +129,7 @@ public struct Message: Codable, Identifiable, Hashable, Sendable { self.communication = communication self.jobQuestion = jobQuestion self.heldAction = heldAction + self.call = call self.timestamp = timestamp self.attachments = attachments self.toolName = toolName @@ -133,6 +155,7 @@ public struct Message: Codable, Identifiable, Hashable, Sendable { communication = try container.decodeIfPresent(BotCommunication.self, forKey: .communication) jobQuestion = try container.decodeIfPresent(JobQuestionEvent.self, forKey: .jobQuestion) heldAction = try container.decodeIfPresent(HeldActionEvent.self, forKey: .heldAction) + call = try container.decodeIfPresent(CallEvent.self, forKey: .call) timestamp = try container.decodeIfPresent(Int64.self, forKey: .timestamp) createdAt = try container.decodeIfPresent(String.self, forKey: .createdAt) attachments = try container.decodeIfPresent([AttachmentInfo].self, forKey: .attachments) diff --git a/apfelkern/Sources/apfelkern/ContractAdapters.swift b/apfelkern/Sources/apfelkern/ContractAdapters.swift index bf5eefd..45749f4 100644 --- a/apfelkern/Sources/apfelkern/ContractAdapters.swift +++ b/apfelkern/Sources/apfelkern/ContractAdapters.swift @@ -46,6 +46,9 @@ extension Message { status: $0.status.rawValue) }, jobQuestion: wire.jobQuestion.map { JobQuestionEvent(id: $0.id, kind: $0.kind, job: $0.job) }, heldAction: wire.heldAction.map { HeldActionEvent(id: $0.id, job: $0.job) }, + call: wire.call.map { + CallEvent(callId: $0.callId, direction: CallEvent.Direction(wire: $0.direction), callee: $0.callee) + }, timestamp: wire.timestamp.flatMap(Int64.init(exactly:)), attachments: wire.attachments?.map { AttachmentInfo(name: $0.name, mimeType: $0.mimeType, size: Int(exactly: $0.size) ?? 0, @@ -56,6 +59,15 @@ extension Message { } } +extension CallEvent.Direction { + init(wire: Components.Schemas.TranscriptMessage.CallPayload.DirectionPayload) { + switch wire { + case .inbound: self = .inbound + case .outbound: self = .outbound + } + } +} + extension ChatSnapshot { init(wire: Components.Schemas.ChatSnapshot) throws { self.init( diff --git a/apfelkern/Sources/apfelkern/Generated/Client.swift b/apfelkern/Sources/apfelkern/Generated/Client.swift index 4fbe62c..b51ed05 100644 --- a/apfelkern/Sources/apfelkern/Generated/Client.swift +++ b/apfelkern/Sources/apfelkern/Generated/Client.swift @@ -90,6 +90,66 @@ public struct Client: APIProtocol { } ) } + /// This document, generated by the running server. + /// + /// - Remark: HTTP `GET /openapi.json`. + /// - Remark: Generated from `#/paths//openapi.json/get(getOpenAPI)`. + public func getOpenAPI(_ input: Operations.GetOpenAPI.Input) async throws -> Operations.GetOpenAPI.Output { + try await client.send( + input: input, + forOperation: Operations.GetOpenAPI.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/openapi.json", + parameters: [] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.GetOpenAPI.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.GetOpenAPI.Output.Ok.Body.JsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// Bots' tool calls, tool results, MCP calls, and bot messages, and skill and memory changes, newest first. Page with `cursor` set to the previous page's `nextCursor`. A page may hold fewer than `limit` items while `hasMore` is true. /// /// - Remark: HTTP `GET /v1/activity/feed`. @@ -4825,15 +4885,17 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/agents/{id}/chat`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)`. - public func getChat(_ input: Operations.GetChat.Input) async throws -> Operations.GetChat.Output { + /// The bot's call requests, newest first: its proposals to phone someone other than the owner, and how each call went. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/call-requests`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)`. + public func listCallRequests(_ input: Operations.ListCallRequests.Input) async throws -> Operations.ListCallRequests.Output { try await client.send( input: input, - forOperation: Operations.GetChat.id, + forOperation: Operations.ListCallRequests.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/chat", + template: "/v1/agents/{}/call-requests", parameters: [ input.path.id ] @@ -4843,13 +4905,6 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -4860,7 +4915,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChat.Output.Ok.Body + let body: Operations.ListCallRequests.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -4870,7 +4925,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ChatSnapshot.self, + [Components.Schemas.CallRequest].self, from: responseBody, transforming: { value in .json(value) @@ -4882,7 +4937,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChat.Output.BadRequest.Body + let body: Operations.ListCallRequests.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -4904,7 +4959,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChat.Output.Unauthorized.Body + let body: Operations.ListCallRequests.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -4926,7 +4981,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChat.Output.NotFound.Body + let body: Operations.ListCallRequests.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -4948,7 +5003,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChat.Output.MethodNotAllowed.Body + let body: Operations.ListCallRequests.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -4970,7 +5025,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChat.Output.Conflict.Body + let body: Operations.ListCallRequests.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -4992,7 +5047,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChat.Output.ContentTooLarge.Body + let body: Operations.ListCallRequests.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5014,7 +5069,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChat.Output.InternalServerError.Body + let body: Operations.ListCallRequests.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5036,7 +5091,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChat.Output.ServiceUnavailable.Body + let body: Operations.ListCallRequests.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5068,38 +5123,27 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/agents/{id}/chat/history`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)`. - public func getChatHistory(_ input: Operations.GetChatHistory.Input) async throws -> Operations.GetChatHistory.Output { + /// Approves a pending call request and dials at once; returns once the voice gateway was asked to call, with the status calling. 409, with the request still pending, when the request is not pending, the number no longer passes the number rules, calls to other people are switched off for the line, no voice gateway that places calls is connected, or the line has a call. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/call-requests/{requestId}/approve`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)`. + public func approveCallRequest(_ input: Operations.ApproveCallRequest.Input) async throws -> Operations.ApproveCallRequest.Output { try await client.send( input: input, - forOperation: Operations.GetChatHistory.id, + forOperation: Operations.ApproveCallRequest.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/chat/history", + template: "/v1/agents/{}/call-requests/{}/approve", parameters: [ - input.path.id + input.path.id, + input.path.requestId ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "before", - value: input.query.before - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -5110,7 +5154,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChatHistory.Output.Ok.Body + let body: Operations.ApproveCallRequest.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5120,7 +5164,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.TranscriptPage.self, + Components.Schemas.CallRequest.self, from: responseBody, transforming: { value in .json(value) @@ -5132,7 +5176,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChatHistory.Output.BadRequest.Body + let body: Operations.ApproveCallRequest.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5154,7 +5198,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChatHistory.Output.Unauthorized.Body + let body: Operations.ApproveCallRequest.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5176,7 +5220,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChatHistory.Output.NotFound.Body + let body: Operations.ApproveCallRequest.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5198,7 +5242,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChatHistory.Output.MethodNotAllowed.Body + let body: Operations.ApproveCallRequest.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5220,7 +5264,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChatHistory.Output.Conflict.Body + let body: Operations.ApproveCallRequest.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5242,7 +5286,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChatHistory.Output.ContentTooLarge.Body + let body: Operations.ApproveCallRequest.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5264,7 +5308,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChatHistory.Output.InternalServerError.Body + let body: Operations.ApproveCallRequest.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5286,7 +5330,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetChatHistory.Output.ServiceUnavailable.Body + let body: Operations.ApproveCallRequest.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5318,22 +5362,25 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/agents/{id}/coding-jobs`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)`. - public func listCodingJobs(_ input: Operations.ListCodingJobs.Input) async throws -> Operations.ListCodingJobs.Output { + /// Declines a pending call request; the bot gets a notice. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/call-requests/{requestId}/decline`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)`. + public func declineCallRequest(_ input: Operations.DeclineCallRequest.Input) async throws -> Operations.DeclineCallRequest.Output { try await client.send( input: input, - forOperation: Operations.ListCodingJobs.id, + forOperation: Operations.DeclineCallRequest.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/coding-jobs", + template: "/v1/agents/{}/call-requests/{}/decline", parameters: [ - input.path.id + input.path.id, + input.path.requestId ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -5346,7 +5393,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListCodingJobs.Output.Ok.Body + let body: Operations.DeclineCallRequest.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5356,7 +5403,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.CodingJobs.self, + Components.Schemas.CallRequest.self, from: responseBody, transforming: { value in .json(value) @@ -5368,7 +5415,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListCodingJobs.Output.BadRequest.Body + let body: Operations.DeclineCallRequest.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5390,7 +5437,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListCodingJobs.Output.Unauthorized.Body + let body: Operations.DeclineCallRequest.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5412,7 +5459,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListCodingJobs.Output.NotFound.Body + let body: Operations.DeclineCallRequest.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5434,7 +5481,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListCodingJobs.Output.MethodNotAllowed.Body + let body: Operations.DeclineCallRequest.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5456,7 +5503,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListCodingJobs.Output.Conflict.Body + let body: Operations.DeclineCallRequest.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5478,7 +5525,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListCodingJobs.Output.ContentTooLarge.Body + let body: Operations.DeclineCallRequest.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5500,7 +5547,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListCodingJobs.Output.InternalServerError.Body + let body: Operations.DeclineCallRequest.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5522,7 +5569,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListCodingJobs.Output.ServiceUnavailable.Body + let body: Operations.DeclineCallRequest.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5554,49 +5601,74 @@ public struct Client: APIProtocol { } ) } - /// Answers the coding job's open question, which resumes the job. 409 when the job no longer waits on that question. + /// The messages of the call's conversation: the callee's words as user messages and the bot's replies. Empty before the call, and when the callee objected to the call. /// - /// - Remark: HTTP `POST /v1/agents/{id}/coding-jobs/{name}/answer`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)`. - public func answerCodingJob(_ input: Operations.AnswerCodingJob.Input) async throws -> Operations.AnswerCodingJob.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/call-requests/{requestId}/transcript`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)`. + public func getCallRequestTranscript(_ input: Operations.GetCallRequestTranscript.Input) async throws -> Operations.GetCallRequestTranscript.Output { try await client.send( input: input, - forOperation: Operations.AnswerCodingJob.id, + forOperation: Operations.GetCallRequestTranscript.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/coding-jobs/{}/answer", + template: "/v1/agents/{}/call-requests/{}/transcript", parameters: [ input.path.id, - input.path.name + input.path.requestId ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.GetCallRequestTranscript.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.TranscriptPage.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerCodingJob.Output.BadRequest.Body + let body: Operations.GetCallRequestTranscript.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5618,7 +5690,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerCodingJob.Output.Unauthorized.Body + let body: Operations.GetCallRequestTranscript.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5640,7 +5712,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerCodingJob.Output.NotFound.Body + let body: Operations.GetCallRequestTranscript.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5662,7 +5734,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerCodingJob.Output.MethodNotAllowed.Body + let body: Operations.GetCallRequestTranscript.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5684,7 +5756,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerCodingJob.Output.Conflict.Body + let body: Operations.GetCallRequestTranscript.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5706,7 +5778,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerCodingJob.Output.ContentTooLarge.Body + let body: Operations.GetCallRequestTranscript.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5728,7 +5800,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerCodingJob.Output.InternalServerError.Body + let body: Operations.GetCallRequestTranscript.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5750,7 +5822,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerCodingJob.Output.ServiceUnavailable.Body + let body: Operations.GetCallRequestTranscript.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5782,18 +5854,17 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/agents/{id}/coding-jobs/{name}/history`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)`. - public func getCodingJobHistory(_ input: Operations.GetCodingJobHistory.Input) async throws -> Operations.GetCodingJobHistory.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/chat`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)`. + public func getChat(_ input: Operations.GetChat.Input) async throws -> Operations.GetChat.Output { try await client.send( input: input, - forOperation: Operations.GetCodingJobHistory.id, + forOperation: Operations.GetChat.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/coding-jobs/{}/history", + template: "/v1/agents/{}/chat", parameters: [ - input.path.id, - input.path.name + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -5808,13 +5879,6 @@ public struct Client: APIProtocol { name: "limit", value: input.query.limit ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "before", - value: input.query.before - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -5825,7 +5889,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCodingJobHistory.Output.Ok.Body + let body: Operations.GetChat.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5835,7 +5899,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.TranscriptPage.self, + Components.Schemas.ChatSnapshot.self, from: responseBody, transforming: { value in .json(value) @@ -5847,7 +5911,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCodingJobHistory.Output.BadRequest.Body + let body: Operations.GetChat.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5869,7 +5933,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCodingJobHistory.Output.Unauthorized.Body + let body: Operations.GetChat.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5891,7 +5955,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCodingJobHistory.Output.NotFound.Body + let body: Operations.GetChat.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5913,7 +5977,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCodingJobHistory.Output.MethodNotAllowed.Body + let body: Operations.GetChat.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5935,7 +5999,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCodingJobHistory.Output.Conflict.Body + let body: Operations.GetChat.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5957,7 +6021,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCodingJobHistory.Output.ContentTooLarge.Body + let body: Operations.GetChat.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -5979,7 +6043,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCodingJobHistory.Output.InternalServerError.Body + let body: Operations.GetChat.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6001,7 +6065,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCodingJobHistory.Output.ServiceUnavailable.Body + let body: Operations.GetChat.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6033,24 +6097,38 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/agents/{id}/compact`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)`. - public func compactChat(_ input: Operations.CompactChat.Input) async throws -> Operations.CompactChat.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/chat/history`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)`. + public func getChatHistory(_ input: Operations.GetChatHistory.Input) async throws -> Operations.GetChatHistory.Output { try await client.send( input: input, - forOperation: Operations.CompactChat.id, + forOperation: Operations.GetChatHistory.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/compact", + template: "/v1/agents/{}/chat/history", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -6059,9 +6137,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 202: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompactChat.Output.Accepted.Body + let body: Operations.GetChatHistory.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6071,7 +6149,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Compaction.self, + Components.Schemas.TranscriptPage.self, from: responseBody, transforming: { value in .json(value) @@ -6080,10 +6158,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .accepted(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompactChat.Output.BadRequest.Body + let body: Operations.GetChatHistory.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6105,7 +6183,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompactChat.Output.Unauthorized.Body + let body: Operations.GetChatHistory.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6127,7 +6205,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompactChat.Output.NotFound.Body + let body: Operations.GetChatHistory.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6149,7 +6227,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompactChat.Output.MethodNotAllowed.Body + let body: Operations.GetChatHistory.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6171,7 +6249,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompactChat.Output.Conflict.Body + let body: Operations.GetChatHistory.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6193,7 +6271,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompactChat.Output.ContentTooLarge.Body + let body: Operations.GetChatHistory.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6215,7 +6293,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompactChat.Output.InternalServerError.Body + let body: Operations.GetChatHistory.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6237,7 +6315,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompactChat.Output.ServiceUnavailable.Body + let body: Operations.GetChatHistory.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6269,17 +6347,15 @@ public struct Client: APIProtocol { } ) } - /// The bot's credentials and its requests for credentials the owner has not answered. Values are never returned. - /// - /// - Remark: HTTP `GET /v1/agents/{id}/credentials`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)`. - public func listAgentCredentials(_ input: Operations.ListAgentCredentials.Input) async throws -> Operations.ListAgentCredentials.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/coding-jobs`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)`. + public func listCodingJobs(_ input: Operations.ListCodingJobs.Input) async throws -> Operations.ListCodingJobs.Output { try await client.send( input: input, - forOperation: Operations.ListAgentCredentials.id, + forOperation: Operations.ListCodingJobs.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/credentials", + template: "/v1/agents/{}/coding-jobs", parameters: [ input.path.id ] @@ -6299,7 +6375,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentials.Output.Ok.Body + let body: Operations.ListCodingJobs.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6309,7 +6385,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Credentials.self, + Components.Schemas.CodingJobs.self, from: responseBody, transforming: { value in .json(value) @@ -6321,7 +6397,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentials.Output.BadRequest.Body + let body: Operations.ListCodingJobs.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6343,7 +6419,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentials.Output.Unauthorized.Body + let body: Operations.ListCodingJobs.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6365,7 +6441,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentials.Output.NotFound.Body + let body: Operations.ListCodingJobs.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6387,7 +6463,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentials.Output.MethodNotAllowed.Body + let body: Operations.ListCodingJobs.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6409,7 +6485,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentials.Output.Conflict.Body + let body: Operations.ListCodingJobs.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6431,7 +6507,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentials.Output.ContentTooLarge.Body + let body: Operations.ListCodingJobs.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6453,7 +6529,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentials.Output.InternalServerError.Body + let body: Operations.ListCodingJobs.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6475,7 +6551,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentials.Output.ServiceUnavailable.Body + let body: Operations.ListCodingJobs.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6507,17 +6583,17 @@ public struct Client: APIProtocol { } ) } - /// Creates or updates a credential. Saving one the bot requested answers the request and starts a bot turn with a notice. A new value applies from the next request; the placeholder stays the same. + /// Answers the coding job's open question, which resumes the job. 409 when the job no longer waits on that question. /// - /// - Remark: HTTP `PUT /v1/agents/{id}/credentials/{name}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)`. - public func saveAgentCredential(_ input: Operations.SaveAgentCredential.Input) async throws -> Operations.SaveAgentCredential.Output { + /// - Remark: HTTP `POST /v1/agents/{id}/coding-jobs/{name}/answer`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)`. + public func answerCodingJob(_ input: Operations.AnswerCodingJob.Input) async throws -> Operations.AnswerCodingJob.Output { try await client.send( input: input, - forOperation: Operations.SaveAgentCredential.id, + forOperation: Operations.AnswerCodingJob.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/credentials/{}", + template: "/v1/agents/{}/coding-jobs/{}/answer", parameters: [ input.path.id, input.path.name @@ -6525,7 +6601,7 @@ public struct Client: APIProtocol { ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -6545,31 +6621,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentCredential.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Credential.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentCredential.Output.BadRequest.Body + let body: Operations.AnswerCodingJob.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6591,7 +6647,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentCredential.Output.Unauthorized.Body + let body: Operations.AnswerCodingJob.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6613,7 +6669,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentCredential.Output.NotFound.Body + let body: Operations.AnswerCodingJob.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6635,7 +6691,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentCredential.Output.MethodNotAllowed.Body + let body: Operations.AnswerCodingJob.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6657,7 +6713,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentCredential.Output.Conflict.Body + let body: Operations.AnswerCodingJob.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6679,7 +6735,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentCredential.Output.ContentTooLarge.Body + let body: Operations.AnswerCodingJob.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6701,7 +6757,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentCredential.Output.InternalServerError.Body + let body: Operations.AnswerCodingJob.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6723,7 +6779,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentCredential.Output.ServiceUnavailable.Body + let body: Operations.AnswerCodingJob.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6755,17 +6811,15 @@ public struct Client: APIProtocol { } ) } - /// Deletes a credential and its use records, or declines a request for one, which starts a bot turn with a notice. - /// - /// - Remark: HTTP `DELETE /v1/agents/{id}/credentials/{name}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)`. - public func deleteAgentCredential(_ input: Operations.DeleteAgentCredential.Input) async throws -> Operations.DeleteAgentCredential.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/coding-jobs/{name}/history`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)`. + public func getCodingJobHistory(_ input: Operations.GetCodingJobHistory.Input) async throws -> Operations.GetCodingJobHistory.Output { try await client.send( input: input, - forOperation: Operations.DeleteAgentCredential.id, + forOperation: Operations.GetCodingJobHistory.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/credentials/{}", + template: "/v1/agents/{}/coding-jobs/{}/history", parameters: [ input.path.id, input.path.name @@ -6773,9 +6827,23 @@ public struct Client: APIProtocol { ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -6784,11 +6852,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.GetCodingJobHistory.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.TranscriptPage.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentCredential.Output.BadRequest.Body + let body: Operations.GetCodingJobHistory.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6810,7 +6898,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentCredential.Output.Unauthorized.Body + let body: Operations.GetCodingJobHistory.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6832,7 +6920,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentCredential.Output.NotFound.Body + let body: Operations.GetCodingJobHistory.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6854,7 +6942,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentCredential.Output.MethodNotAllowed.Body + let body: Operations.GetCodingJobHistory.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6876,7 +6964,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentCredential.Output.Conflict.Body + let body: Operations.GetCodingJobHistory.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6898,7 +6986,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentCredential.Output.ContentTooLarge.Body + let body: Operations.GetCodingJobHistory.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6920,7 +7008,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentCredential.Output.InternalServerError.Body + let body: Operations.GetCodingJobHistory.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6942,7 +7030,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentCredential.Output.ServiceUnavailable.Body + let body: Operations.GetCodingJobHistory.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6974,20 +7062,17 @@ public struct Client: APIProtocol { } ) } - /// Declines a pending credential request without changing a saved credential. - /// - /// - Remark: HTTP `POST /v1/agents/{id}/credentials/{name}/decline`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)`. - public func declineAgentCredential(_ input: Operations.DeclineAgentCredential.Input) async throws -> Operations.DeclineAgentCredential.Output { + /// - Remark: HTTP `POST /v1/agents/{id}/compact`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)`. + public func compactChat(_ input: Operations.CompactChat.Input) async throws -> Operations.CompactChat.Output { try await client.send( input: input, - forOperation: Operations.DeclineAgentCredential.id, + forOperation: Operations.CompactChat.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/credentials/{}/decline", + template: "/v1/agents/{}/compact", parameters: [ - input.path.id, - input.path.name + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -7003,11 +7088,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 202: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CompactChat.Output.Accepted.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.Compaction.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .accepted(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentCredential.Output.BadRequest.Body + let body: Operations.CompactChat.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7029,7 +7134,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentCredential.Output.Unauthorized.Body + let body: Operations.CompactChat.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7051,7 +7156,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentCredential.Output.NotFound.Body + let body: Operations.CompactChat.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7073,7 +7178,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentCredential.Output.MethodNotAllowed.Body + let body: Operations.CompactChat.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7095,7 +7200,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentCredential.Output.Conflict.Body + let body: Operations.CompactChat.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7117,7 +7222,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentCredential.Output.ContentTooLarge.Body + let body: Operations.CompactChat.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7139,7 +7244,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentCredential.Output.InternalServerError.Body + let body: Operations.CompactChat.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7161,7 +7266,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentCredential.Output.ServiceUnavailable.Body + let body: Operations.CompactChat.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7193,20 +7298,19 @@ public struct Client: APIProtocol { } ) } - /// Requests sent with the credential's value in the last 90 days, newest first. Page with `before` set to the last use's ID. + /// The bot's credentials and its requests for credentials the owner has not answered. Values are never returned. /// - /// - Remark: HTTP `GET /v1/agents/{id}/credentials/{name}/uses`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)`. - public func listAgentCredentialUses(_ input: Operations.ListAgentCredentialUses.Input) async throws -> Operations.ListAgentCredentialUses.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/credentials`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)`. + public func listAgentCredentials(_ input: Operations.ListAgentCredentials.Input) async throws -> Operations.ListAgentCredentials.Output { try await client.send( input: input, - forOperation: Operations.ListAgentCredentialUses.id, + forOperation: Operations.ListAgentCredentials.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/credentials/{}/uses", + template: "/v1/agents/{}/credentials", parameters: [ - input.path.id, - input.path.name + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -7214,20 +7318,6 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "before", - value: input.query.before - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -7238,7 +7328,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentialUses.Output.Ok.Body + let body: Operations.ListAgentCredentials.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7248,7 +7338,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.CredentialUse].self, + Components.Schemas.Credentials.self, from: responseBody, transforming: { value in .json(value) @@ -7260,7 +7350,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentialUses.Output.BadRequest.Body + let body: Operations.ListAgentCredentials.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7282,7 +7372,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentialUses.Output.Unauthorized.Body + let body: Operations.ListAgentCredentials.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7304,7 +7394,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentialUses.Output.NotFound.Body + let body: Operations.ListAgentCredentials.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7326,7 +7416,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentialUses.Output.MethodNotAllowed.Body + let body: Operations.ListAgentCredentials.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7348,7 +7438,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentialUses.Output.Conflict.Body + let body: Operations.ListAgentCredentials.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7370,7 +7460,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentialUses.Output.ContentTooLarge.Body + let body: Operations.ListAgentCredentials.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7392,7 +7482,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentialUses.Output.InternalServerError.Body + let body: Operations.ListAgentCredentials.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7414,7 +7504,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentCredentialUses.Output.ServiceUnavailable.Body + let body: Operations.ListAgentCredentials.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7446,35 +7536,47 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/agents/{id}/desktop-jobs`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)`. - public func listDesktopJobs(_ input: Operations.ListDesktopJobs.Input) async throws -> Operations.ListDesktopJobs.Output { + /// Creates or updates a credential. Saving one the bot requested answers the request and starts a bot turn with a notice. A new value applies from the next request; the placeholder stays the same. + /// + /// - Remark: HTTP `PUT /v1/agents/{id}/credentials/{name}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)`. + public func saveAgentCredential(_ input: Operations.SaveAgentCredential.Input) async throws -> Operations.SaveAgentCredential.Output { try await client.send( input: input, - forOperation: Operations.ListDesktopJobs.id, + forOperation: Operations.SaveAgentCredential.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/desktop-jobs", + template: "/v1/agents/{}/credentials/{}", parameters: [ - input.path.id + input.path.id, + input.path.name ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListDesktopJobs.Output.Ok.Body + let body: Operations.SaveAgentCredential.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7484,7 +7586,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.DesktopJobs.self, + Components.Schemas.Credential.self, from: responseBody, transforming: { value in .json(value) @@ -7496,7 +7598,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListDesktopJobs.Output.BadRequest.Body + let body: Operations.SaveAgentCredential.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7518,7 +7620,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListDesktopJobs.Output.Unauthorized.Body + let body: Operations.SaveAgentCredential.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7540,7 +7642,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListDesktopJobs.Output.NotFound.Body + let body: Operations.SaveAgentCredential.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7562,7 +7664,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListDesktopJobs.Output.MethodNotAllowed.Body + let body: Operations.SaveAgentCredential.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7584,7 +7686,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListDesktopJobs.Output.Conflict.Body + let body: Operations.SaveAgentCredential.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7606,7 +7708,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListDesktopJobs.Output.ContentTooLarge.Body + let body: Operations.SaveAgentCredential.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7628,7 +7730,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListDesktopJobs.Output.InternalServerError.Body + let body: Operations.SaveAgentCredential.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7650,7 +7752,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListDesktopJobs.Output.ServiceUnavailable.Body + let body: Operations.SaveAgentCredential.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7682,15 +7784,17 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/agents/{id}/desktop-jobs/{name}/history`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)`. - public func getDesktopJobHistory(_ input: Operations.GetDesktopJobHistory.Input) async throws -> Operations.GetDesktopJobHistory.Output { + /// Deletes a credential and its use records, or declines a request for one, which starts a bot turn with a notice. + /// + /// - Remark: HTTP `DELETE /v1/agents/{id}/credentials/{name}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)`. + public func deleteAgentCredential(_ input: Operations.DeleteAgentCredential.Input) async throws -> Operations.DeleteAgentCredential.Output { try await client.send( input: input, - forOperation: Operations.GetDesktopJobHistory.id, + forOperation: Operations.DeleteAgentCredential.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/desktop-jobs/{}/history", + template: "/v1/agents/{}/credentials/{}", parameters: [ input.path.id, input.path.name @@ -7698,23 +7802,9 @@ public struct Client: APIProtocol { ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .delete ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "before", - value: input.query.before - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -7723,31 +7813,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopJobHistory.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.TranscriptPage.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopJobHistory.Output.BadRequest.Body + let body: Operations.DeleteAgentCredential.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7769,7 +7839,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopJobHistory.Output.Unauthorized.Body + let body: Operations.DeleteAgentCredential.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7791,7 +7861,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopJobHistory.Output.NotFound.Body + let body: Operations.DeleteAgentCredential.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7813,7 +7883,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopJobHistory.Output.MethodNotAllowed.Body + let body: Operations.DeleteAgentCredential.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7835,7 +7905,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopJobHistory.Output.Conflict.Body + let body: Operations.DeleteAgentCredential.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7857,7 +7927,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopJobHistory.Output.ContentTooLarge.Body + let body: Operations.DeleteAgentCredential.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7879,7 +7949,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopJobHistory.Output.InternalServerError.Body + let body: Operations.DeleteAgentCredential.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7901,7 +7971,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopJobHistory.Output.ServiceUnavailable.Body + let body: Operations.DeleteAgentCredential.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -7933,22 +8003,25 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/agents/{id}/desktop/control`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)`. - public func getDesktopControl(_ input: Operations.GetDesktopControl.Input) async throws -> Operations.GetDesktopControl.Output { + /// Declines a pending credential request without changing a saved credential. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/credentials/{name}/decline`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)`. + public func declineAgentCredential(_ input: Operations.DeclineAgentCredential.Input) async throws -> Operations.DeclineAgentCredential.Output { try await client.send( input: input, - forOperation: Operations.GetDesktopControl.id, + forOperation: Operations.DeclineAgentCredential.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/desktop/control", + template: "/v1/agents/{}/credentials/{}/decline", parameters: [ - input.path.id + input.path.id, + input.path.name ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -7959,31 +8032,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopControl.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.DesktopControl.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopControl.Output.BadRequest.Body + let body: Operations.DeclineAgentCredential.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8005,7 +8058,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopControl.Output.Unauthorized.Body + let body: Operations.DeclineAgentCredential.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8027,7 +8080,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopControl.Output.NotFound.Body + let body: Operations.DeclineAgentCredential.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8049,7 +8102,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopControl.Output.MethodNotAllowed.Body + let body: Operations.DeclineAgentCredential.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8071,7 +8124,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopControl.Output.Conflict.Body + let body: Operations.DeclineAgentCredential.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8093,7 +8146,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopControl.Output.ContentTooLarge.Body + let body: Operations.DeclineAgentCredential.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8115,7 +8168,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopControl.Output.InternalServerError.Body + let body: Operations.DeclineAgentCredential.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8137,7 +8190,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopControl.Output.ServiceUnavailable.Body + let body: Operations.DeclineAgentCredential.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8169,46 +8222,52 @@ public struct Client: APIProtocol { } ) } - /// Take control of the bot desktop (holder owner) or hand it back (holder bot). 409 when the bot has no bot desktop. + /// Requests sent with the credential's value in the last 90 days, newest first. Page with `before` set to the last use's ID. /// - /// - Remark: HTTP `PUT /v1/agents/{id}/desktop/control`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)`. - public func putDesktopControl(_ input: Operations.PutDesktopControl.Input) async throws -> Operations.PutDesktopControl.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/credentials/{name}/uses`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)`. + public func listAgentCredentialUses(_ input: Operations.ListAgentCredentialUses.Input) async throws -> Operations.ListAgentCredentialUses.Output { try await client.send( input: input, - forOperation: Operations.PutDesktopControl.id, + forOperation: Operations.ListAgentCredentialUses.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/desktop/control", + template: "/v1/agents/{}/credentials/{}/uses", parameters: [ - input.path.id + input.path.id, + input.path.name ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutDesktopControl.Output.Ok.Body + let body: Operations.ListAgentCredentialUses.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8218,7 +8277,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.DesktopControl.self, + [Components.Schemas.CredentialUse].self, from: responseBody, transforming: { value in .json(value) @@ -8230,7 +8289,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutDesktopControl.Output.BadRequest.Body + let body: Operations.ListAgentCredentialUses.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8252,7 +8311,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutDesktopControl.Output.Unauthorized.Body + let body: Operations.ListAgentCredentialUses.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8274,7 +8333,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutDesktopControl.Output.NotFound.Body + let body: Operations.ListAgentCredentialUses.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8296,7 +8355,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutDesktopControl.Output.MethodNotAllowed.Body + let body: Operations.ListAgentCredentialUses.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8318,7 +8377,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutDesktopControl.Output.Conflict.Body + let body: Operations.ListAgentCredentialUses.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8340,7 +8399,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutDesktopControl.Output.ContentTooLarge.Body + let body: Operations.ListAgentCredentialUses.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8362,7 +8421,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutDesktopControl.Output.InternalServerError.Body + let body: Operations.ListAgentCredentialUses.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8384,7 +8443,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutDesktopControl.Output.ServiceUnavailable.Body + let body: Operations.ListAgentCredentialUses.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8416,17 +8475,15 @@ public struct Client: APIProtocol { } ) } - /// Server-sent events. A control event carries the DesktopControl JSON object in data, once on connect and on every change. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. - /// - /// - Remark: HTTP `GET /v1/agents/{id}/desktop/events`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)`. - public func streamDesktopEvents(_ input: Operations.StreamDesktopEvents.Input) async throws -> Operations.StreamDesktopEvents.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/desktop-jobs`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)`. + public func listDesktopJobs(_ input: Operations.ListDesktopJobs.Input) async throws -> Operations.ListDesktopJobs.Output { try await client.send( input: input, - forOperation: Operations.StreamDesktopEvents.id, + forOperation: Operations.ListDesktopJobs.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/desktop/events", + template: "/v1/agents/{}/desktop-jobs", parameters: [ input.path.id ] @@ -8446,20 +8503,20 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamDesktopEvents.Output.Ok.Body + let body: Operations.ListDesktopJobs.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "text/event-stream" + "application/json" ] ) switch chosenContentType { - case "text/event-stream": - body = try converter.getResponseBodyAsBinary( - OpenAPIRuntime.HTTPBody.self, + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.DesktopJobs.self, from: responseBody, transforming: { value in - .textEventStream(value) + .json(value) } ) default: @@ -8468,7 +8525,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamDesktopEvents.Output.BadRequest.Body + let body: Operations.ListDesktopJobs.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8490,7 +8547,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamDesktopEvents.Output.Unauthorized.Body + let body: Operations.ListDesktopJobs.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8512,7 +8569,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamDesktopEvents.Output.NotFound.Body + let body: Operations.ListDesktopJobs.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8534,7 +8591,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamDesktopEvents.Output.MethodNotAllowed.Body + let body: Operations.ListDesktopJobs.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8556,7 +8613,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamDesktopEvents.Output.Conflict.Body + let body: Operations.ListDesktopJobs.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8578,7 +8635,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamDesktopEvents.Output.ContentTooLarge.Body + let body: Operations.ListDesktopJobs.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8600,7 +8657,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamDesktopEvents.Output.InternalServerError.Body + let body: Operations.ListDesktopJobs.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8622,7 +8679,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamDesktopEvents.Output.ServiceUnavailable.Body + let body: Operations.ListDesktopJobs.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8654,17 +8711,18 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/agents/{id}/desktop/status`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)`. - public func getDesktopStatus(_ input: Operations.GetDesktopStatus.Input) async throws -> Operations.GetDesktopStatus.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/desktop-jobs/{name}/history`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)`. + public func getDesktopJobHistory(_ input: Operations.GetDesktopJobHistory.Input) async throws -> Operations.GetDesktopJobHistory.Output { try await client.send( input: input, - forOperation: Operations.GetDesktopStatus.id, + forOperation: Operations.GetDesktopJobHistory.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/desktop/status", + template: "/v1/agents/{}/desktop-jobs/{}/history", parameters: [ - input.path.id + input.path.id, + input.path.name ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -8672,6 +8730,20 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -8682,7 +8754,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopStatus.Output.Ok.Body + let body: Operations.GetDesktopJobHistory.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8692,7 +8764,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.DesktopStatus.self, + Components.Schemas.TranscriptPage.self, from: responseBody, transforming: { value in .json(value) @@ -8704,7 +8776,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopStatus.Output.BadRequest.Body + let body: Operations.GetDesktopJobHistory.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8726,7 +8798,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopStatus.Output.Unauthorized.Body + let body: Operations.GetDesktopJobHistory.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8748,7 +8820,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopStatus.Output.NotFound.Body + let body: Operations.GetDesktopJobHistory.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8770,7 +8842,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopStatus.Output.MethodNotAllowed.Body + let body: Operations.GetDesktopJobHistory.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8792,7 +8864,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopStatus.Output.Conflict.Body + let body: Operations.GetDesktopJobHistory.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8814,7 +8886,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopStatus.Output.ContentTooLarge.Body + let body: Operations.GetDesktopJobHistory.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8836,7 +8908,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopStatus.Output.InternalServerError.Body + let body: Operations.GetDesktopJobHistory.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8858,7 +8930,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetDesktopStatus.Output.ServiceUnavailable.Body + let body: Operations.GetDesktopJobHistory.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8890,33 +8962,24 @@ public struct Client: APIProtocol { } ) } - /// Issue a single-use viewer link for the bot desktop. The page and its WebSocket live outside /v1 and need no Authorization header: the link is the credential. With passive=true the link is watch-only: it neither boots the bot's machine nor keeps it awake, and its connection ends when the machine stops. 409 when the bot has no bot desktop. - /// - /// - Remark: HTTP `POST /v1/agents/{id}/desktop/viewer`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)`. - public func createDesktopViewer(_ input: Operations.CreateDesktopViewer.Input) async throws -> Operations.CreateDesktopViewer.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/desktop/control`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)`. + public func getDesktopControl(_ input: Operations.GetDesktopControl.Input) async throws -> Operations.GetDesktopControl.Output { try await client.send( input: input, - forOperation: Operations.CreateDesktopViewer.id, + forOperation: Operations.GetDesktopControl.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/desktop/viewer", + template: "/v1/agents/{}/desktop/control", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "passive", - value: input.query.passive - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -8925,9 +8988,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateDesktopViewer.Output.Created.Body + let body: Operations.GetDesktopControl.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8937,7 +9000,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.DesktopViewer.self, + Components.Schemas.DesktopControl.self, from: responseBody, transforming: { value in .json(value) @@ -8946,10 +9009,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateDesktopViewer.Output.BadRequest.Body + let body: Operations.GetDesktopControl.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8971,7 +9034,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateDesktopViewer.Output.Unauthorized.Body + let body: Operations.GetDesktopControl.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8993,7 +9056,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateDesktopViewer.Output.NotFound.Body + let body: Operations.GetDesktopControl.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9015,7 +9078,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateDesktopViewer.Output.MethodNotAllowed.Body + let body: Operations.GetDesktopControl.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9037,7 +9100,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateDesktopViewer.Output.Conflict.Body + let body: Operations.GetDesktopControl.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9059,7 +9122,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateDesktopViewer.Output.ContentTooLarge.Body + let body: Operations.GetDesktopControl.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9081,7 +9144,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateDesktopViewer.Output.InternalServerError.Body + let body: Operations.GetDesktopControl.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9103,7 +9166,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateDesktopViewer.Output.ServiceUnavailable.Body + let body: Operations.GetDesktopControl.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9135,35 +9198,46 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/agents/{id}/duplicate`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)`. - public func duplicateAgent(_ input: Operations.DuplicateAgent.Input) async throws -> Operations.DuplicateAgent.Output { + /// Take control of the bot desktop (holder owner) or hand it back (holder bot). 409 when the bot has no bot desktop. + /// + /// - Remark: HTTP `PUT /v1/agents/{id}/desktop/control`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)`. + public func putDesktopControl(_ input: Operations.PutDesktopControl.Input) async throws -> Operations.PutDesktopControl.Output { try await client.send( input: input, - forOperation: Operations.DuplicateAgent.id, + forOperation: Operations.PutDesktopControl.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/duplicate", + template: "/v1/agents/{}/desktop/control", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DuplicateAgent.Output.Created.Body + let body: Operations.PutDesktopControl.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9173,7 +9247,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.DuplicateAgent.Output.Created.Body.JsonPayload?.self, + Components.Schemas.DesktopControl.self, from: responseBody, transforming: { value in .json(value) @@ -9182,10 +9256,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DuplicateAgent.Output.BadRequest.Body + let body: Operations.PutDesktopControl.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9207,7 +9281,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DuplicateAgent.Output.Unauthorized.Body + let body: Operations.PutDesktopControl.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9229,7 +9303,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DuplicateAgent.Output.NotFound.Body + let body: Operations.PutDesktopControl.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9251,7 +9325,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DuplicateAgent.Output.MethodNotAllowed.Body + let body: Operations.PutDesktopControl.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9273,7 +9347,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DuplicateAgent.Output.Conflict.Body + let body: Operations.PutDesktopControl.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9295,7 +9369,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DuplicateAgent.Output.ContentTooLarge.Body + let body: Operations.PutDesktopControl.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9317,7 +9391,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DuplicateAgent.Output.InternalServerError.Body + let body: Operations.PutDesktopControl.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9339,7 +9413,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DuplicateAgent.Output.ServiceUnavailable.Body + let body: Operations.PutDesktopControl.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9371,17 +9445,17 @@ public struct Client: APIProtocol { } ) } - /// Server-sent events. Each snapshot event carries a ChatSnapshot JSON object in data. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. Reconnect by fetching the current snapshot; there is no Last-Event-ID replay. + /// Server-sent events. A control event carries the DesktopControl JSON object in data, once on connect and on every change. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. /// - /// - Remark: HTTP `GET /v1/agents/{id}/events`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)`. - public func streamChatEvents(_ input: Operations.StreamChatEvents.Input) async throws -> Operations.StreamChatEvents.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/desktop/events`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)`. + public func streamDesktopEvents(_ input: Operations.StreamDesktopEvents.Input) async throws -> Operations.StreamDesktopEvents.Output { try await client.send( input: input, - forOperation: Operations.StreamChatEvents.id, + forOperation: Operations.StreamDesktopEvents.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/events", + template: "/v1/agents/{}/desktop/events", parameters: [ input.path.id ] @@ -9391,13 +9465,6 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -9408,7 +9475,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamChatEvents.Output.Ok.Body + let body: Operations.StreamDesktopEvents.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9430,7 +9497,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamChatEvents.Output.BadRequest.Body + let body: Operations.StreamDesktopEvents.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9452,7 +9519,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamChatEvents.Output.Unauthorized.Body + let body: Operations.StreamDesktopEvents.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9474,7 +9541,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamChatEvents.Output.NotFound.Body + let body: Operations.StreamDesktopEvents.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9496,7 +9563,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamChatEvents.Output.MethodNotAllowed.Body + let body: Operations.StreamDesktopEvents.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9518,7 +9585,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamChatEvents.Output.Conflict.Body + let body: Operations.StreamDesktopEvents.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9540,7 +9607,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamChatEvents.Output.ContentTooLarge.Body + let body: Operations.StreamDesktopEvents.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9562,7 +9629,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamChatEvents.Output.InternalServerError.Body + let body: Operations.StreamDesktopEvents.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9584,7 +9651,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamChatEvents.Output.ServiceUnavailable.Body + let body: Operations.StreamDesktopEvents.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9616,17 +9683,15 @@ public struct Client: APIProtocol { } ) } - /// Desktop job actions an intent check held for the owner, newest first, pending and decided. - /// - /// - Remark: HTTP `GET /v1/agents/{id}/held-actions`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)`. - public func listAgentHeldActions(_ input: Operations.ListAgentHeldActions.Input) async throws -> Operations.ListAgentHeldActions.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/desktop/status`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)`. + public func getDesktopStatus(_ input: Operations.GetDesktopStatus.Input) async throws -> Operations.GetDesktopStatus.Output { try await client.send( input: input, - forOperation: Operations.ListAgentHeldActions.id, + forOperation: Operations.GetDesktopStatus.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/held-actions", + template: "/v1/agents/{}/desktop/status", parameters: [ input.path.id ] @@ -9646,7 +9711,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentHeldActions.Output.Ok.Body + let body: Operations.GetDesktopStatus.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9656,7 +9721,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.HeldAction].self, + Components.Schemas.DesktopStatus.self, from: responseBody, transforming: { value in .json(value) @@ -9668,7 +9733,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentHeldActions.Output.BadRequest.Body + let body: Operations.GetDesktopStatus.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9690,7 +9755,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentHeldActions.Output.Unauthorized.Body + let body: Operations.GetDesktopStatus.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9712,7 +9777,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentHeldActions.Output.NotFound.Body + let body: Operations.GetDesktopStatus.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9734,7 +9799,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentHeldActions.Output.MethodNotAllowed.Body + let body: Operations.GetDesktopStatus.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9756,7 +9821,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentHeldActions.Output.Conflict.Body + let body: Operations.GetDesktopStatus.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9778,7 +9843,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentHeldActions.Output.ContentTooLarge.Body + let body: Operations.GetDesktopStatus.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9800,7 +9865,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentHeldActions.Output.InternalServerError.Body + let body: Operations.GetDesktopStatus.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9822,7 +9887,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentHeldActions.Output.ServiceUnavailable.Body + let body: Operations.GetDesktopStatus.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9854,20 +9919,19 @@ public struct Client: APIProtocol { } ) } - /// Runs the held action; the job continues where it stopped. Fails with 409 once the action was decided. + /// Issue a single-use viewer link for the bot desktop. The page and its WebSocket live outside /v1 and need no Authorization header: the link is the credential. With passive=true the link is watch-only: it neither boots the bot's machine nor keeps it awake, and its connection ends when the machine stops. 409 when the bot has no bot desktop. /// - /// - Remark: HTTP `POST /v1/agents/{id}/held-actions/{actionId}/approve`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)`. - public func approveAgentHeldAction(_ input: Operations.ApproveAgentHeldAction.Input) async throws -> Operations.ApproveAgentHeldAction.Output { + /// - Remark: HTTP `POST /v1/agents/{id}/desktop/viewer`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)`. + public func createDesktopViewer(_ input: Operations.CreateDesktopViewer.Input) async throws -> Operations.CreateDesktopViewer.Output { try await client.send( input: input, - forOperation: Operations.ApproveAgentHeldAction.id, + forOperation: Operations.CreateDesktopViewer.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/held-actions/{}/approve", + template: "/v1/agents/{}/desktop/viewer", parameters: [ - input.path.id, - input.path.actionId + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -9875,6 +9939,13 @@ public struct Client: APIProtocol { method: .post ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "passive", + value: input.query.passive + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -9883,9 +9954,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApproveAgentHeldAction.Output.Ok.Body + let body: Operations.CreateDesktopViewer.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9895,7 +9966,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.HeldAction.self, + Components.Schemas.DesktopViewer.self, from: responseBody, transforming: { value in .json(value) @@ -9904,10 +9975,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApproveAgentHeldAction.Output.BadRequest.Body + let body: Operations.CreateDesktopViewer.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9929,7 +10000,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApproveAgentHeldAction.Output.Unauthorized.Body + let body: Operations.CreateDesktopViewer.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9951,7 +10022,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApproveAgentHeldAction.Output.NotFound.Body + let body: Operations.CreateDesktopViewer.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9973,7 +10044,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApproveAgentHeldAction.Output.MethodNotAllowed.Body + let body: Operations.CreateDesktopViewer.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -9995,7 +10066,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApproveAgentHeldAction.Output.Conflict.Body + let body: Operations.CreateDesktopViewer.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10017,7 +10088,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApproveAgentHeldAction.Output.ContentTooLarge.Body + let body: Operations.CreateDesktopViewer.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10039,7 +10110,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApproveAgentHeldAction.Output.InternalServerError.Body + let body: Operations.CreateDesktopViewer.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10061,7 +10132,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApproveAgentHeldAction.Output.ServiceUnavailable.Body + let body: Operations.CreateDesktopViewer.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10093,20 +10164,17 @@ public struct Client: APIProtocol { } ) } - /// Refuses the held action with an optional reason; the job reports back. Fails with 409 once the action was decided. - /// - /// - Remark: HTTP `POST /v1/agents/{id}/held-actions/{actionId}/decline`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)`. - public func declineAgentHeldAction(_ input: Operations.DeclineAgentHeldAction.Input) async throws -> Operations.DeclineAgentHeldAction.Output { + /// - Remark: HTTP `POST /v1/agents/{id}/duplicate`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)`. + public func duplicateAgent(_ input: Operations.DuplicateAgent.Input) async throws -> Operations.DuplicateAgent.Output { try await client.send( input: input, - forOperation: Operations.DeclineAgentHeldAction.id, + forOperation: Operations.DuplicateAgent.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/held-actions/{}/decline", + template: "/v1/agents/{}/duplicate", parameters: [ - input.path.id, - input.path.actionId + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -10118,22 +10186,13 @@ public struct Client: APIProtocol { in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentHeldAction.Output.Ok.Body + let body: Operations.DuplicateAgent.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10143,7 +10202,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.HeldAction.self, + Operations.DuplicateAgent.Output.Created.Body.JsonPayload?.self, from: responseBody, transforming: { value in .json(value) @@ -10152,10 +10211,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentHeldAction.Output.BadRequest.Body + let body: Operations.DuplicateAgent.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10177,7 +10236,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentHeldAction.Output.Unauthorized.Body + let body: Operations.DuplicateAgent.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10199,7 +10258,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentHeldAction.Output.NotFound.Body + let body: Operations.DuplicateAgent.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10221,7 +10280,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentHeldAction.Output.MethodNotAllowed.Body + let body: Operations.DuplicateAgent.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10243,7 +10302,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentHeldAction.Output.Conflict.Body + let body: Operations.DuplicateAgent.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10265,7 +10324,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentHeldAction.Output.ContentTooLarge.Body + let body: Operations.DuplicateAgent.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10287,7 +10346,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentHeldAction.Output.InternalServerError.Body + let body: Operations.DuplicateAgent.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10309,7 +10368,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentHeldAction.Output.ServiceUnavailable.Body + let body: Operations.DuplicateAgent.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10341,17 +10400,17 @@ public struct Client: APIProtocol { } ) } - /// The logins the bot's desktop jobs can fill into web pages, and its requests for logins the owner has not answered. Values are never returned. + /// Server-sent events. Each snapshot event carries a ChatSnapshot JSON object in data. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. Reconnect by fetching the current snapshot; there is no Last-Event-ID replay. /// - /// - Remark: HTTP `GET /v1/agents/{id}/logins`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)`. - public func listAgentLogins(_ input: Operations.ListAgentLogins.Input) async throws -> Operations.ListAgentLogins.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/events`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)`. + public func streamChatEvents(_ input: Operations.StreamChatEvents.Input) async throws -> Operations.StreamChatEvents.Output { try await client.send( input: input, - forOperation: Operations.ListAgentLogins.id, + forOperation: Operations.StreamChatEvents.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/logins", + template: "/v1/agents/{}/events", parameters: [ input.path.id ] @@ -10361,6 +10420,20 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "partial", + value: input.query.partial + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -10371,20 +10444,20 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLogins.Output.Ok.Body + let body: Operations.StreamChatEvents.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "application/json" + "text/event-stream" ] ) switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Logins.self, + case "text/event-stream": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, from: responseBody, transforming: { value in - .json(value) + .textEventStream(value) } ) default: @@ -10393,7 +10466,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLogins.Output.BadRequest.Body + let body: Operations.StreamChatEvents.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10415,7 +10488,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLogins.Output.Unauthorized.Body + let body: Operations.StreamChatEvents.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10437,7 +10510,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLogins.Output.NotFound.Body + let body: Operations.StreamChatEvents.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10459,7 +10532,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLogins.Output.MethodNotAllowed.Body + let body: Operations.StreamChatEvents.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10481,7 +10554,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLogins.Output.Conflict.Body + let body: Operations.StreamChatEvents.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10503,7 +10576,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLogins.Output.ContentTooLarge.Body + let body: Operations.StreamChatEvents.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10525,7 +10598,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLogins.Output.InternalServerError.Body + let body: Operations.StreamChatEvents.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10547,7 +10620,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLogins.Output.ServiceUnavailable.Body + let body: Operations.StreamChatEvents.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10579,47 +10652,37 @@ public struct Client: APIProtocol { } ) } - /// Creates or updates a login. Saving one the bot requested answers the request and starts a bot turn with a notice. Each field is a value stored in Crumble or a password manager reference; a 1Password `item` fills every field. Every reference is read once to check it, and nothing is saved if one fails. + /// Desktop job actions an intent check held for the owner, newest first, pending and decided. /// - /// - Remark: HTTP `PUT /v1/agents/{id}/logins/{name}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)`. - public func saveAgentLogin(_ input: Operations.SaveAgentLogin.Input) async throws -> Operations.SaveAgentLogin.Output { + /// - Remark: HTTP `GET /v1/agents/{id}/held-actions`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)`. + public func listAgentHeldActions(_ input: Operations.ListAgentHeldActions.Input) async throws -> Operations.ListAgentHeldActions.Output { try await client.send( input: input, - forOperation: Operations.SaveAgentLogin.id, + forOperation: Operations.ListAgentHeldActions.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/logins/{}", + template: "/v1/agents/{}/held-actions", parameters: [ - input.path.id, - input.path.name + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentLogin.Output.Ok.Body + let body: Operations.ListAgentHeldActions.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10629,7 +10692,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Login.self, + [Components.Schemas.HeldAction].self, from: responseBody, transforming: { value in .json(value) @@ -10641,7 +10704,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentLogin.Output.BadRequest.Body + let body: Operations.ListAgentHeldActions.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10663,7 +10726,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentLogin.Output.Unauthorized.Body + let body: Operations.ListAgentHeldActions.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10685,7 +10748,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentLogin.Output.NotFound.Body + let body: Operations.ListAgentHeldActions.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10707,7 +10770,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentLogin.Output.MethodNotAllowed.Body + let body: Operations.ListAgentHeldActions.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10729,7 +10792,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentLogin.Output.Conflict.Body + let body: Operations.ListAgentHeldActions.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10751,7 +10814,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentLogin.Output.ContentTooLarge.Body + let body: Operations.ListAgentHeldActions.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10773,7 +10836,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentLogin.Output.InternalServerError.Body + let body: Operations.ListAgentHeldActions.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10795,7 +10858,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SaveAgentLogin.Output.ServiceUnavailable.Body + let body: Operations.ListAgentHeldActions.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10827,25 +10890,25 @@ public struct Client: APIProtocol { } ) } - /// Deletes a login and its fill records, or declines a request for one, which starts a bot turn with a notice. + /// Runs the held action; the job continues where it stopped. Fails with 409 once the action was decided. /// - /// - Remark: HTTP `DELETE /v1/agents/{id}/logins/{name}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)`. - public func deleteAgentLogin(_ input: Operations.DeleteAgentLogin.Input) async throws -> Operations.DeleteAgentLogin.Output { + /// - Remark: HTTP `POST /v1/agents/{id}/held-actions/{actionId}/approve`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)`. + public func approveAgentHeldAction(_ input: Operations.ApproveAgentHeldAction.Input) async throws -> Operations.ApproveAgentHeldAction.Output { try await client.send( input: input, - forOperation: Operations.DeleteAgentLogin.id, + forOperation: Operations.ApproveAgentHeldAction.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/logins/{}", + template: "/v1/agents/{}/held-actions/{}/approve", parameters: [ input.path.id, - input.path.name + input.path.actionId ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -10856,11 +10919,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ApproveAgentHeldAction.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.HeldAction.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentLogin.Output.BadRequest.Body + let body: Operations.ApproveAgentHeldAction.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10882,7 +10965,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentLogin.Output.Unauthorized.Body + let body: Operations.ApproveAgentHeldAction.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10904,7 +10987,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentLogin.Output.NotFound.Body + let body: Operations.ApproveAgentHeldAction.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10926,7 +11009,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentLogin.Output.MethodNotAllowed.Body + let body: Operations.ApproveAgentHeldAction.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10948,7 +11031,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentLogin.Output.Conflict.Body + let body: Operations.ApproveAgentHeldAction.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10970,7 +11053,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentLogin.Output.ContentTooLarge.Body + let body: Operations.ApproveAgentHeldAction.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -10992,7 +11075,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentLogin.Output.InternalServerError.Body + let body: Operations.ApproveAgentHeldAction.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11014,7 +11097,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentLogin.Output.ServiceUnavailable.Body + let body: Operations.ApproveAgentHeldAction.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11046,20 +11129,20 @@ public struct Client: APIProtocol { } ) } - /// Declines a pending login request without changing a saved login. + /// Refuses the held action with an optional reason; the job reports back. Fails with 409 once the action was decided. /// - /// - Remark: HTTP `POST /v1/agents/{id}/logins/{name}/decline`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)`. - public func declineAgentLogin(_ input: Operations.DeclineAgentLogin.Input) async throws -> Operations.DeclineAgentLogin.Output { + /// - Remark: HTTP `POST /v1/agents/{id}/held-actions/{actionId}/decline`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)`. + public func declineAgentHeldAction(_ input: Operations.DeclineAgentHeldAction.Input) async throws -> Operations.DeclineAgentHeldAction.Output { try await client.send( input: input, - forOperation: Operations.DeclineAgentLogin.id, + forOperation: Operations.DeclineAgentHeldAction.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/logins/{}/decline", + template: "/v1/agents/{}/held-actions/{}/decline", parameters: [ input.path.id, - input.path.name + input.path.actionId ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -11071,15 +11154,968 @@ public struct Client: APIProtocol { in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentHeldAction.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.HeldAction.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentLogin.Output.BadRequest.Body + let body: Operations.DeclineAgentHeldAction.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentHeldAction.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentHeldAction.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentHeldAction.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentHeldAction.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentHeldAction.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentHeldAction.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentHeldAction.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// The logins the bot's desktop jobs can fill into web pages, and its requests for logins the owner has not answered. Values are never returned. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/logins`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)`. + public func listAgentLogins(_ input: Operations.ListAgentLogins.Input) async throws -> Operations.ListAgentLogins.Output { + try await client.send( + input: input, + forOperation: Operations.ListAgentLogins.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/logins", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLogins.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.Logins.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLogins.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLogins.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLogins.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLogins.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLogins.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLogins.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLogins.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLogins.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Creates or updates a login. Saving one the bot requested answers the request and starts a bot turn with a notice. Each field is a value stored in Crumble or a password manager reference; a 1Password `item` fills every field. Every reference is read once to check it, and nothing is saved if one fails. + /// + /// - Remark: HTTP `PUT /v1/agents/{id}/logins/{name}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)`. + public func saveAgentLogin(_ input: Operations.SaveAgentLogin.Input) async throws -> Operations.SaveAgentLogin.Output { + try await client.send( + input: input, + forOperation: Operations.SaveAgentLogin.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/logins/{}", + parameters: [ + input.path.id, + input.path.name + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .put + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SaveAgentLogin.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.Login.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SaveAgentLogin.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SaveAgentLogin.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SaveAgentLogin.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SaveAgentLogin.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SaveAgentLogin.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SaveAgentLogin.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SaveAgentLogin.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SaveAgentLogin.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Deletes a login and its fill records, or declines a request for one, which starts a bot turn with a notice. + /// + /// - Remark: HTTP `DELETE /v1/agents/{id}/logins/{name}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)`. + public func deleteAgentLogin(_ input: Operations.DeleteAgentLogin.Input) async throws -> Operations.DeleteAgentLogin.Output { + try await client.send( + input: input, + forOperation: Operations.DeleteAgentLogin.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/logins/{}", + parameters: [ + input.path.id, + input.path.name + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentLogin.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentLogin.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentLogin.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentLogin.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentLogin.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentLogin.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentLogin.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentLogin.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Declines a pending login request without changing a saved login. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/logins/{name}/decline`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)`. + public func declineAgentLogin(_ input: Operations.DeclineAgentLogin.Input) async throws -> Operations.DeclineAgentLogin.Output { + try await client.send( + input: input, + forOperation: Operations.DeclineAgentLogin.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/logins/{}/decline", + parameters: [ + input.path.id, + input.path.name + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentLogin.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11123,7 +12159,1932 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentLogin.Output.NotFound.Body + let body: Operations.DeclineAgentLogin.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentLogin.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentLogin.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentLogin.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentLogin.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeclineAgentLogin.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Fills of the login's fields in the last 90 days, newest first. Page with `before` set to the last use's ID. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/logins/{name}/uses`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)`. + public func listAgentLoginUses(_ input: Operations.ListAgentLoginUses.Input) async throws -> Operations.ListAgentLoginUses.Output { + try await client.send( + input: input, + forOperation: Operations.ListAgentLoginUses.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/logins/{}/uses", + parameters: [ + input.path.id, + input.path.name + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLoginUses.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.LoginUse].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLoginUses.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLoginUses.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLoginUses.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLoginUses.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLoginUses.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLoginUses.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLoginUses.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentLoginUses.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `GET /v1/agents/{id}/memories`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)`. + public func listAgentMemories(_ input: Operations.ListAgentMemories.Input) async throws -> Operations.ListAgentMemories.Output { + try await client.send( + input: input, + forOperation: Operations.ListAgentMemories.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/memories", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentMemories.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.Memory].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentMemories.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentMemories.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentMemories.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentMemories.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentMemories.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentMemories.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentMemories.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentMemories.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `POST /v1/agents/{id}/memories`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)`. + public func createAgentMemory(_ input: Operations.CreateAgentMemory.Input) async throws -> Operations.CreateAgentMemory.Output { + try await client.send( + input: input, + forOperation: Operations.CreateAgentMemory.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/memories", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentMemory.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.Memory.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentMemory.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentMemory.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentMemory.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentMemory.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentMemory.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentMemory.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentMemory.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentMemory.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `PATCH /v1/agents/{id}/memories/{memoryId}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)`. + public func updateAgentMemory(_ input: Operations.UpdateAgentMemory.Input) async throws -> Operations.UpdateAgentMemory.Output { + try await client.send( + input: input, + forOperation: Operations.UpdateAgentMemory.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/memories/{}", + parameters: [ + input.path.id, + input.path.memoryId + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .patch + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentMemory.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload?.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentMemory.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentMemory.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentMemory.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentMemory.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentMemory.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentMemory.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentMemory.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentMemory.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `DELETE /v1/agents/{id}/memories/{memoryId}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)`. + public func deleteAgentMemory(_ input: Operations.DeleteAgentMemory.Input) async throws -> Operations.DeleteAgentMemory.Output { + try await client.send( + input: input, + forOperation: Operations.DeleteAgentMemory.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/memories/{}", + parameters: [ + input.path.id, + input.path.memoryId + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentMemory.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentMemory.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentMemory.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentMemory.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentMemory.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentMemory.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentMemory.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.DeleteAgentMemory.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `POST /v1/agents/{id}/messages`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)`. + public func sendMessage(_ input: Operations.SendMessage.Input) async throws -> Operations.SendMessage.Output { + try await client.send( + input: input, + forOperation: Operations.SendMessage.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/messages", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 202: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SendMessage.Output.Accepted.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.Execution.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .accepted(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SendMessage.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SendMessage.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SendMessage.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SendMessage.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SendMessage.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SendMessage.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SendMessage.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.SendMessage.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// What the bot's reviews changed, newest first, one entry per reviewed execution with its changes. Clients show these as notices in the bot chat, also after reconnecting. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/reviews`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)`. + public func listAgentReviews(_ input: Operations.ListAgentReviews.Input) async throws -> Operations.ListAgentReviews.Output { + try await client.send( + input: input, + forOperation: Operations.ListAgentReviews.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/reviews", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentReviews.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.ReviewResult].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentReviews.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentReviews.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentReviews.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentReviews.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentReviews.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentReviews.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentReviews.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentReviews.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// The bot's own skill packages, including stale and archived ones. The agent's inline `skills` field lists the same skills by name and instructions. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/skills`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)`. + public func listAgentSkills(_ input: Operations.ListAgentSkills.Input) async throws -> Operations.ListAgentSkills.Output { + try await client.send( + input: input, + forOperation: Operations.ListAgentSkills.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/skills", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentSkills.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.SkillPackage].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentSkills.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentSkills.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListAgentSkills.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11145,7 +14106,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentLogin.Output.MethodNotAllowed.Body + let body: Operations.ListAgentSkills.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11167,7 +14128,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentLogin.Output.Conflict.Body + let body: Operations.ListAgentSkills.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11189,7 +14150,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentLogin.Output.ContentTooLarge.Body + let body: Operations.ListAgentSkills.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11211,7 +14172,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentLogin.Output.InternalServerError.Body + let body: Operations.ListAgentSkills.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11233,7 +14194,500 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeclineAgentLogin.Output.ServiceUnavailable.Body + let body: Operations.ListAgentSkills.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `POST /v1/agents/{id}/skills`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)`. + public func createAgentSkill(_ input: Operations.CreateAgentSkill.Input) async throws -> Operations.CreateAgentSkill.Output { + try await client.send( + input: input, + forOperation: Operations.CreateAgentSkill.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/skills", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentSkill.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.SkillPackage.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentSkill.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentSkill.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentSkill.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentSkill.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentSkill.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentSkill.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentSkill.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateAgentSkill.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Changes a skill's content, restores an archived skill by setting state to active, or pins it so the curator never marks it stale or archives it. + /// + /// - Remark: HTTP `PATCH /v1/agents/{id}/skills/{skillId}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)`. + public func updateAgentSkill(_ input: Operations.UpdateAgentSkill.Input) async throws -> Operations.UpdateAgentSkill.Output { + try await client.send( + input: input, + forOperation: Operations.UpdateAgentSkill.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/agents/{}/skills/{}", + parameters: [ + input.path.id, + input.path.skillId + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .patch + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentSkill.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload?.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentSkill.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentSkill.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentSkill.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 405: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentSkill.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentSkill.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentSkill.Output.ContentTooLarge.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentSkill.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateAgentSkill.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11265,41 +14719,25 @@ public struct Client: APIProtocol { } ) } - /// Fills of the login's fields in the last 90 days, newest first. Page with `before` set to the last use's ID. - /// - /// - Remark: HTTP `GET /v1/agents/{id}/logins/{name}/uses`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)`. - public func listAgentLoginUses(_ input: Operations.ListAgentLoginUses.Input) async throws -> Operations.ListAgentLoginUses.Output { + /// - Remark: HTTP `DELETE /v1/agents/{id}/skills/{skillId}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)`. + public func deleteAgentSkill(_ input: Operations.DeleteAgentSkill.Input) async throws -> Operations.DeleteAgentSkill.Output { try await client.send( input: input, - forOperation: Operations.ListAgentLoginUses.id, + forOperation: Operations.DeleteAgentSkill.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/logins/{}/uses", + template: "/v1/agents/{}/skills/{}", parameters: [ input.path.id, - input.path.name + input.path.skillId ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .delete ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "before", - value: input.query.before - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -11308,31 +14746,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLoginUses.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.LoginUse].self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLoginUses.Output.BadRequest.Body + let body: Operations.DeleteAgentSkill.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11354,7 +14772,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLoginUses.Output.Unauthorized.Body + let body: Operations.DeleteAgentSkill.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11376,7 +14794,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLoginUses.Output.NotFound.Body + let body: Operations.DeleteAgentSkill.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11398,7 +14816,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLoginUses.Output.MethodNotAllowed.Body + let body: Operations.DeleteAgentSkill.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11420,7 +14838,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLoginUses.Output.Conflict.Body + let body: Operations.DeleteAgentSkill.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11442,7 +14860,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLoginUses.Output.ContentTooLarge.Body + let body: Operations.DeleteAgentSkill.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11464,7 +14882,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLoginUses.Output.InternalServerError.Body + let body: Operations.DeleteAgentSkill.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11486,7 +14904,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentLoginUses.Output.ServiceUnavailable.Body + let body: Operations.DeleteAgentSkill.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11518,18 +14936,16 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/agents/{id}/memories`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)`. - public func listAgentMemories(_ input: Operations.ListAgentMemories.Input) async throws -> Operations.ListAgentMemories.Output { + /// - Remark: HTTP `GET /v1/capabilities`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)`. + public func getCapabilities(_ input: Operations.GetCapabilities.Input) async throws -> Operations.GetCapabilities.Output { try await client.send( input: input, - forOperation: Operations.ListAgentMemories.id, + forOperation: Operations.GetCapabilities.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/memories", - parameters: [ - input.path.id - ] + template: "/v1/capabilities", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, @@ -11546,7 +14962,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentMemories.Output.Ok.Body + let body: Operations.GetCapabilities.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11556,7 +14972,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.Memory].self, + Components.Schemas.Capabilities.self, from: responseBody, transforming: { value in .json(value) @@ -11568,7 +14984,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentMemories.Output.BadRequest.Body + let body: Operations.GetCapabilities.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11590,7 +15006,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentMemories.Output.Unauthorized.Body + let body: Operations.GetCapabilities.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11612,7 +15028,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentMemories.Output.NotFound.Body + let body: Operations.GetCapabilities.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11634,7 +15050,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentMemories.Output.MethodNotAllowed.Body + let body: Operations.GetCapabilities.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11656,7 +15072,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentMemories.Output.Conflict.Body + let body: Operations.GetCapabilities.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11678,7 +15094,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentMemories.Output.ContentTooLarge.Body + let body: Operations.GetCapabilities.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11700,7 +15116,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentMemories.Output.InternalServerError.Body + let body: Operations.GetCapabilities.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11722,7 +15138,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentMemories.Output.ServiceUnavailable.Body + let body: Operations.GetCapabilities.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11754,44 +15170,56 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/agents/{id}/memories`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)`. - public func createAgentMemory(_ input: Operations.CreateAgentMemory.Input) async throws -> Operations.CreateAgentMemory.Output { + /// Skill and memory changes by owners, bots, and reviews, newest first, with the state before and after each. Page with `before` set to the last change's ID. + /// + /// - Remark: HTTP `GET /v1/changes`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)`. + public func listChanges(_ input: Operations.ListChanges.Input) async throws -> Operations.ListChanges.Output { try await client.send( input: input, - forOperation: Operations.CreateAgentMemory.id, + forOperation: Operations.ListChanges.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/memories", - parameters: [ - input.path.id - ] + template: "/v1/changes", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "agentId", + value: input.query.agentId + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentMemory.Output.Created.Body + let body: Operations.ListChanges.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11801,7 +15229,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Memory.self, + [Components.Schemas.LearnedChange].self, from: responseBody, transforming: { value in .json(value) @@ -11810,10 +15238,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentMemory.Output.BadRequest.Body + let body: Operations.ListChanges.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11835,7 +15263,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentMemory.Output.Unauthorized.Body + let body: Operations.ListChanges.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11857,7 +15285,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentMemory.Output.NotFound.Body + let body: Operations.ListChanges.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11879,7 +15307,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentMemory.Output.MethodNotAllowed.Body + let body: Operations.ListChanges.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11901,7 +15329,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentMemory.Output.Conflict.Body + let body: Operations.ListChanges.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11923,7 +15351,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentMemory.Output.ContentTooLarge.Body + let body: Operations.ListChanges.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11945,7 +15373,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentMemory.Output.InternalServerError.Body + let body: Operations.ListChanges.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11967,7 +15395,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentMemory.Output.ServiceUnavailable.Body + let body: Operations.ListChanges.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -11999,45 +15427,37 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `PATCH /v1/agents/{id}/memories/{memoryId}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)`. - public func updateAgentMemory(_ input: Operations.UpdateAgentMemory.Input) async throws -> Operations.UpdateAgentMemory.Output { + /// Restores the state before the change, whatever happened since, and records the revert as a change of its own. + /// + /// - Remark: HTTP `POST /v1/changes/{id}/revert`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)`. + public func revertChange(_ input: Operations.RevertChange.Input) async throws -> Operations.RevertChange.Output { try await client.send( input: input, - forOperation: Operations.UpdateAgentMemory.id, + forOperation: Operations.RevertChange.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/memories/{}", + template: "/v1/changes/{}/revert", parameters: [ - input.path.id, - input.path.memoryId + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .patch + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentMemory.Output.Ok.Body + let body: Operations.RevertChange.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12047,7 +15467,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload?.self, + Components.Schemas.LearnedChange.self, from: responseBody, transforming: { value in .json(value) @@ -12056,10 +15476,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentMemory.Output.BadRequest.Body + let body: Operations.RevertChange.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12081,7 +15501,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentMemory.Output.Unauthorized.Body + let body: Operations.RevertChange.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12103,7 +15523,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentMemory.Output.NotFound.Body + let body: Operations.RevertChange.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12125,7 +15545,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentMemory.Output.MethodNotAllowed.Body + let body: Operations.RevertChange.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12147,7 +15567,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentMemory.Output.Conflict.Body + let body: Operations.RevertChange.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12169,7 +15589,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentMemory.Output.ContentTooLarge.Body + let body: Operations.RevertChange.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12191,7 +15611,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentMemory.Output.InternalServerError.Body + let body: Operations.RevertChange.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12213,7 +15633,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentMemory.Output.ServiceUnavailable.Body + let body: Operations.RevertChange.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12245,23 +15665,22 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `DELETE /v1/agents/{id}/memories/{memoryId}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)`. - public func deleteAgentMemory(_ input: Operations.DeleteAgentMemory.Input) async throws -> Operations.DeleteAgentMemory.Output { + /// The account's event relay: its URL, whether the Doorstep account token is set (plugin setting `doorstep:token`), and the connection status. + /// + /// - Remark: HTTP `GET /v1/event-relay`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)`. + public func getEventRelay(_ input: Operations.GetEventRelay.Input) async throws -> Operations.GetEventRelay.Output { try await client.send( input: input, - forOperation: Operations.DeleteAgentMemory.id, + forOperation: Operations.GetEventRelay.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/memories/{}", - parameters: [ - input.path.id, - input.path.memoryId - ] + template: "/v1/event-relay", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -12272,11 +15691,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.GetEventRelay.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.GetEventRelay.Output.Ok.Body.JsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentMemory.Output.BadRequest.Body + let body: Operations.GetEventRelay.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12298,7 +15737,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentMemory.Output.Unauthorized.Body + let body: Operations.GetEventRelay.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12320,7 +15759,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentMemory.Output.NotFound.Body + let body: Operations.GetEventRelay.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12342,7 +15781,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentMemory.Output.MethodNotAllowed.Body + let body: Operations.GetEventRelay.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12364,7 +15803,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentMemory.Output.Conflict.Body + let body: Operations.GetEventRelay.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12386,7 +15825,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentMemory.Output.ContentTooLarge.Body + let body: Operations.GetEventRelay.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12408,7 +15847,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentMemory.Output.InternalServerError.Body + let body: Operations.GetEventRelay.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12430,7 +15869,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentMemory.Output.ServiceUnavailable.Body + let body: Operations.GetEventRelay.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12462,22 +15901,22 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/agents/{id}/messages`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)`. - public func sendMessage(_ input: Operations.SendMessage.Input) async throws -> Operations.SendMessage.Output { + /// Sets the event relay URL, or removes it with `null`, which disconnects the relay. + /// + /// - Remark: HTTP `PUT /v1/event-relay`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)`. + public func updateEventRelay(_ input: Operations.UpdateEventRelay.Input) async throws -> Operations.UpdateEventRelay.Output { try await client.send( input: input, - forOperation: Operations.SendMessage.id, + forOperation: Operations.UpdateEventRelay.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/messages", - parameters: [ - input.path.id - ] + template: "/v1/event-relay", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -12497,9 +15936,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 202: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendMessage.Output.Accepted.Body + let body: Operations.UpdateEventRelay.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12509,7 +15948,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Execution.self, + Operations.UpdateEventRelay.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -12518,10 +15957,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .accepted(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendMessage.Output.BadRequest.Body + let body: Operations.UpdateEventRelay.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12543,7 +15982,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendMessage.Output.Unauthorized.Body + let body: Operations.UpdateEventRelay.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12565,7 +16004,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendMessage.Output.NotFound.Body + let body: Operations.UpdateEventRelay.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12587,7 +16026,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendMessage.Output.MethodNotAllowed.Body + let body: Operations.UpdateEventRelay.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12609,7 +16048,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendMessage.Output.Conflict.Body + let body: Operations.UpdateEventRelay.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12631,7 +16070,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendMessage.Output.ContentTooLarge.Body + let body: Operations.UpdateEventRelay.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12653,7 +16092,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendMessage.Output.InternalServerError.Body + let body: Operations.UpdateEventRelay.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12675,7 +16114,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendMessage.Output.ServiceUnavailable.Body + let body: Operations.UpdateEventRelay.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12707,33 +16146,24 @@ public struct Client: APIProtocol { } ) } - /// What the bot's reviews changed, newest first, one entry per reviewed execution with its changes. Clients show these as notices in the bot chat, also after reconnecting. + /// The account's event sources, each with the number of automations that use it. /// - /// - Remark: HTTP `GET /v1/agents/{id}/reviews`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)`. - public func listAgentReviews(_ input: Operations.ListAgentReviews.Input) async throws -> Operations.ListAgentReviews.Output { + /// - Remark: HTTP `GET /v1/event-sources`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)`. + public func listEventSources(_ input: Operations.ListEventSources.Input) async throws -> Operations.ListEventSources.Output { try await client.send( input: input, - forOperation: Operations.ListAgentReviews.id, + forOperation: Operations.ListEventSources.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/reviews", - parameters: [ - input.path.id - ] + template: "/v1/event-sources", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, method: .get ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -12744,7 +16174,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentReviews.Output.Ok.Body + let body: Operations.ListEventSources.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12754,7 +16184,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.ReviewResult].self, + Operations.ListEventSources.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -12766,7 +16196,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentReviews.Output.BadRequest.Body + let body: Operations.ListEventSources.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12788,7 +16218,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentReviews.Output.Unauthorized.Body + let body: Operations.ListEventSources.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12810,7 +16240,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentReviews.Output.NotFound.Body + let body: Operations.ListEventSources.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12832,7 +16262,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentReviews.Output.MethodNotAllowed.Body + let body: Operations.ListEventSources.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12854,7 +16284,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentReviews.Output.Conflict.Body + let body: Operations.ListEventSources.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12876,7 +16306,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentReviews.Output.ContentTooLarge.Body + let body: Operations.ListEventSources.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12898,7 +16328,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentReviews.Output.InternalServerError.Body + let body: Operations.ListEventSources.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12920,7 +16350,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentReviews.Output.ServiceUnavailable.Body + let body: Operations.ListEventSources.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12952,37 +16382,44 @@ public struct Client: APIProtocol { } ) } - /// The bot's own skill packages, including stale and archived ones. The agent's inline `skills` field lists the same skills by name and instructions. + /// Creates a source on the event relay. The response's `address` contains the source's secret and is returned only once. 400 when the relay URL or token is missing, or the relay can't be reached or rejects the token. /// - /// - Remark: HTTP `GET /v1/agents/{id}/skills`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)`. - public func listAgentSkills(_ input: Operations.ListAgentSkills.Input) async throws -> Operations.ListAgentSkills.Output { + /// - Remark: HTTP `POST /v1/event-sources`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)`. + public func createEventSource(_ input: Operations.CreateEventSource.Input) async throws -> Operations.CreateEventSource.Output { try await client.send( input: input, - forOperation: Operations.ListAgentSkills.id, + forOperation: Operations.CreateEventSource.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/skills", - parameters: [ - input.path.id - ] + template: "/v1/event-sources", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentSkills.Output.Ok.Body + let body: Operations.CreateEventSource.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -12992,7 +16429,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.SkillPackage].self, + Operations.CreateEventSource.Output.Created.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -13001,10 +16438,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentSkills.Output.BadRequest.Body + let body: Operations.CreateEventSource.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13026,7 +16463,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentSkills.Output.Unauthorized.Body + let body: Operations.CreateEventSource.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13048,7 +16485,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentSkills.Output.NotFound.Body + let body: Operations.CreateEventSource.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13070,7 +16507,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentSkills.Output.MethodNotAllowed.Body + let body: Operations.CreateEventSource.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13092,7 +16529,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentSkills.Output.Conflict.Body + let body: Operations.CreateEventSource.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13114,7 +16551,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentSkills.Output.ContentTooLarge.Body + let body: Operations.CreateEventSource.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13136,7 +16573,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentSkills.Output.InternalServerError.Body + let body: Operations.CreateEventSource.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13158,7 +16595,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListAgentSkills.Output.ServiceUnavailable.Body + let body: Operations.CreateEventSource.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13190,66 +16627,39 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/agents/{id}/skills`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)`. - public func createAgentSkill(_ input: Operations.CreateAgentSkill.Input) async throws -> Operations.CreateAgentSkill.Output { + /// Deletes the source on the event relay and in Crumble; its address stops working. 409 while an automation uses it. + /// + /// - Remark: HTTP `DELETE /v1/event-sources/{id}`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)`. + public func deleteEventSource(_ input: Operations.DeleteEventSource.Input) async throws -> Operations.DeleteEventSource.Output { try await client.send( input: input, - forOperation: Operations.CreateAgentSkill.id, + forOperation: Operations.DeleteEventSource.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/skills", + template: "/v1/event-sources/{}", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 201: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentSkill.Output.Created.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.SkillPackage.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .created(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentSkill.Output.BadRequest.Body + let body: Operations.DeleteEventSource.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13271,7 +16681,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentSkill.Output.Unauthorized.Body + let body: Operations.DeleteEventSource.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13293,7 +16703,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentSkill.Output.NotFound.Body + let body: Operations.DeleteEventSource.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13315,7 +16725,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentSkill.Output.MethodNotAllowed.Body + let body: Operations.DeleteEventSource.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13337,7 +16747,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentSkill.Output.Conflict.Body + let body: Operations.DeleteEventSource.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13359,7 +16769,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentSkill.Output.ContentTooLarge.Body + let body: Operations.DeleteEventSource.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13381,7 +16791,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentSkill.Output.InternalServerError.Body + let body: Operations.DeleteEventSource.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13403,7 +16813,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateAgentSkill.Output.ServiceUnavailable.Body + let body: Operations.DeleteEventSource.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13435,60 +16845,48 @@ public struct Client: APIProtocol { } ) } - /// Changes a skill's content, restores an archived skill by setting state to active, or pins it so the curator never marks it stale or archives it. + /// Server-sent events. Each activity event carries a ReplyEvent or ChatPreviewEvent JSON object in data. Each learned event carries a LearnedEvent: what a bot's review of one turn changed; GET /v1/agents/{id}/reviews lists them durably. Current chat previews replay on connection; finished replies and learned events are not replayed. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. No Last-Event-ID replay. /// - /// - Remark: HTTP `PATCH /v1/agents/{id}/skills/{skillId}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)`. - public func updateAgentSkill(_ input: Operations.UpdateAgentSkill.Input) async throws -> Operations.UpdateAgentSkill.Output { + /// - Remark: HTTP `GET /v1/events`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)`. + public func streamActivityEvents(_ input: Operations.StreamActivityEvents.Input) async throws -> Operations.StreamActivityEvents.Output { try await client.send( input: input, - forOperation: Operations.UpdateAgentSkill.id, + forOperation: Operations.StreamActivityEvents.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/skills/{}", - parameters: [ - input.path.id, - input.path.skillId - ] + template: "/v1/events", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .patch + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentSkill.Output.Ok.Body + let body: Operations.StreamActivityEvents.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "application/json" + "text/event-stream" ] ) switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload?.self, + case "text/event-stream": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, from: responseBody, transforming: { value in - .json(value) + .textEventStream(value) } ) default: @@ -13497,7 +16895,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentSkill.Output.BadRequest.Body + let body: Operations.StreamActivityEvents.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13519,7 +16917,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentSkill.Output.Unauthorized.Body + let body: Operations.StreamActivityEvents.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13541,7 +16939,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentSkill.Output.NotFound.Body + let body: Operations.StreamActivityEvents.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13563,7 +16961,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentSkill.Output.MethodNotAllowed.Body + let body: Operations.StreamActivityEvents.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13585,7 +16983,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentSkill.Output.Conflict.Body + let body: Operations.StreamActivityEvents.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13607,7 +17005,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentSkill.Output.ContentTooLarge.Body + let body: Operations.StreamActivityEvents.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13629,7 +17027,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentSkill.Output.InternalServerError.Body + let body: Operations.StreamActivityEvents.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13651,7 +17049,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateAgentSkill.Output.ServiceUnavailable.Body + let body: Operations.StreamActivityEvents.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13683,25 +17081,29 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `DELETE /v1/agents/{id}/skills/{skillId}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)`. - public func deleteAgentSkill(_ input: Operations.DeleteAgentSkill.Input) async throws -> Operations.DeleteAgentSkill.Output { + /// - Remark: HTTP `GET /v1/executions`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)`. + public func listExecutions(_ input: Operations.ListExecutions.Input) async throws -> Operations.ListExecutions.Output { try await client.send( input: input, - forOperation: Operations.DeleteAgentSkill.id, + forOperation: Operations.ListExecutions.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/agents/{}/skills/{}", - parameters: [ - input.path.id, - input.path.skillId - ] + template: "/v1/executions", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "agentId", + value: input.query.agentId + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -13710,11 +17112,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListExecutions.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.Execution].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentSkill.Output.BadRequest.Body + let body: Operations.ListExecutions.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13736,7 +17158,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentSkill.Output.Unauthorized.Body + let body: Operations.ListExecutions.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13758,7 +17180,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentSkill.Output.NotFound.Body + let body: Operations.ListExecutions.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13780,7 +17202,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentSkill.Output.MethodNotAllowed.Body + let body: Operations.ListExecutions.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13802,7 +17224,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentSkill.Output.Conflict.Body + let body: Operations.ListExecutions.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13824,7 +17246,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentSkill.Output.ContentTooLarge.Body + let body: Operations.ListExecutions.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13846,7 +17268,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentSkill.Output.InternalServerError.Body + let body: Operations.ListExecutions.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13868,7 +17290,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteAgentSkill.Output.ServiceUnavailable.Body + let body: Operations.ListExecutions.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13900,15 +17322,17 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/capabilities`. - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)`. - public func getCapabilities(_ input: Operations.GetCapabilities.Input) async throws -> Operations.GetCapabilities.Output { + /// The account's machine accounts: GitHub users made for bots. A bot acts as its machine account wherever none of its GitHub Apps does. + /// + /// - Remark: HTTP `GET /v1/github-accounts`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)`. + public func listGithubAccounts(_ input: Operations.ListGithubAccounts.Input) async throws -> Operations.ListGithubAccounts.Output { try await client.send( input: input, - forOperation: Operations.GetCapabilities.id, + forOperation: Operations.ListGithubAccounts.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/capabilities", + template: "/v1/github-accounts", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( @@ -13926,7 +17350,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCapabilities.Output.Ok.Body + let body: Operations.ListGithubAccounts.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13936,7 +17360,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Capabilities.self, + Operations.ListGithubAccounts.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -13948,7 +17372,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCapabilities.Output.BadRequest.Body + let body: Operations.ListGithubAccounts.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13970,7 +17394,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCapabilities.Output.Unauthorized.Body + let body: Operations.ListGithubAccounts.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -13992,7 +17416,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCapabilities.Output.NotFound.Body + let body: Operations.ListGithubAccounts.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14014,7 +17438,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCapabilities.Output.MethodNotAllowed.Body + let body: Operations.ListGithubAccounts.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14036,7 +17460,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCapabilities.Output.Conflict.Body + let body: Operations.ListGithubAccounts.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14058,7 +17482,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCapabilities.Output.ContentTooLarge.Body + let body: Operations.ListGithubAccounts.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14080,7 +17504,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCapabilities.Output.InternalServerError.Body + let body: Operations.ListGithubAccounts.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14102,7 +17526,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetCapabilities.Output.ServiceUnavailable.Body + let body: Operations.ListGithubAccounts.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14134,56 +17558,44 @@ public struct Client: APIProtocol { } ) } - /// Skill and memory changes by owners, bots, and reviews, newest first, with the state before and after each. Page with `before` set to the last change's ID. + /// Adds the GitHub user a personal access token signs in as. 400 when GitHub refuses the token; 409 when the user is already added. /// - /// - Remark: HTTP `GET /v1/changes`. - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)`. - public func listChanges(_ input: Operations.ListChanges.Input) async throws -> Operations.ListChanges.Output { + /// - Remark: HTTP `POST /v1/github-accounts`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)`. + public func addGithubAccount(_ input: Operations.AddGithubAccount.Input) async throws -> Operations.AddGithubAccount.Output { try await client.send( input: input, - forOperation: Operations.ListChanges.id, + forOperation: Operations.AddGithubAccount.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/changes", + template: "/v1/github-accounts", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "before", - value: input.query.before - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "agentId", - value: input.query.agentId - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListChanges.Output.Ok.Body + let body: Operations.AddGithubAccount.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14193,7 +17605,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.LearnedChange].self, + Components.Schemas.GitHubAccount.self, from: responseBody, transforming: { value in .json(value) @@ -14205,7 +17617,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListChanges.Output.BadRequest.Body + let body: Operations.AddGithubAccount.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14227,7 +17639,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListChanges.Output.Unauthorized.Body + let body: Operations.AddGithubAccount.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14249,7 +17661,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListChanges.Output.NotFound.Body + let body: Operations.AddGithubAccount.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14271,7 +17683,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListChanges.Output.MethodNotAllowed.Body + let body: Operations.AddGithubAccount.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14293,7 +17705,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListChanges.Output.Conflict.Body + let body: Operations.AddGithubAccount.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14315,7 +17727,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListChanges.Output.ContentTooLarge.Body + let body: Operations.AddGithubAccount.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14337,7 +17749,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListChanges.Output.InternalServerError.Body + let body: Operations.AddGithubAccount.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14359,7 +17771,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListChanges.Output.ServiceUnavailable.Body + let body: Operations.AddGithubAccount.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14391,24 +17803,24 @@ public struct Client: APIProtocol { } ) } - /// Restores the state before the change, whatever happened since, and records the revert as a change of its own. + /// Forgets the machine account and its token, and takes GH_TOKEN from bots left without an installed App. The user stays on GitHub. /// - /// - Remark: HTTP `POST /v1/changes/{id}/revert`. - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)`. - public func revertChange(_ input: Operations.RevertChange.Input) async throws -> Operations.RevertChange.Output { + /// - Remark: HTTP `DELETE /v1/github-accounts/{id}`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)`. + public func deleteGithubAccount(_ input: Operations.DeleteGithubAccount.Input) async throws -> Operations.DeleteGithubAccount.Output { try await client.send( input: input, - forOperation: Operations.RevertChange.id, + forOperation: Operations.DeleteGithubAccount.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/changes/{}/revert", + template: "/v1/github-accounts/{}", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -14419,31 +17831,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 201: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RevertChange.Output.Created.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.LearnedChange.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .created(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RevertChange.Output.BadRequest.Body + let body: Operations.DeleteGithubAccount.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14465,7 +17857,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RevertChange.Output.Unauthorized.Body + let body: Operations.DeleteGithubAccount.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14487,7 +17879,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RevertChange.Output.NotFound.Body + let body: Operations.DeleteGithubAccount.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14509,7 +17901,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RevertChange.Output.MethodNotAllowed.Body + let body: Operations.DeleteGithubAccount.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14531,7 +17923,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RevertChange.Output.Conflict.Body + let body: Operations.DeleteGithubAccount.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14553,7 +17945,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RevertChange.Output.ContentTooLarge.Body + let body: Operations.DeleteGithubAccount.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14575,7 +17967,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RevertChange.Output.InternalServerError.Body + let body: Operations.DeleteGithubAccount.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14597,7 +17989,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RevertChange.Output.ServiceUnavailable.Body + let body: Operations.DeleteGithubAccount.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14629,35 +18021,46 @@ public struct Client: APIProtocol { } ) } - /// The account's event relay: its URL, whether the Doorstep account token is set (plugin setting `doorstep:token`), and the connection status. + /// Replaces the bots that act as the machine account, giving them GH_TOKEN. A bot acts as at most one; 409 when a bot already acts as another. /// - /// - Remark: HTTP `GET /v1/event-relay`. - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)`. - public func getEventRelay(_ input: Operations.GetEventRelay.Input) async throws -> Operations.GetEventRelay.Output { + /// - Remark: HTTP `PUT /v1/github-accounts/{id}/bots`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)`. + public func setGithubAccountBots(_ input: Operations.SetGithubAccountBots.Input) async throws -> Operations.SetGithubAccountBots.Output { try await client.send( input: input, - forOperation: Operations.GetEventRelay.id, + forOperation: Operations.SetGithubAccountBots.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/event-relay", - parameters: [] + template: "/v1/github-accounts/{}/bots", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetEventRelay.Output.Ok.Body + let body: Operations.SetGithubAccountBots.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14667,7 +18070,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.GetEventRelay.Output.Ok.Body.JsonPayload.self, + Components.Schemas.GitHubAccount.self, from: responseBody, transforming: { value in .json(value) @@ -14679,7 +18082,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetEventRelay.Output.BadRequest.Body + let body: Operations.SetGithubAccountBots.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14701,7 +18104,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetEventRelay.Output.Unauthorized.Body + let body: Operations.SetGithubAccountBots.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14723,7 +18126,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetEventRelay.Output.NotFound.Body + let body: Operations.SetGithubAccountBots.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14745,7 +18148,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetEventRelay.Output.MethodNotAllowed.Body + let body: Operations.SetGithubAccountBots.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14767,7 +18170,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetEventRelay.Output.Conflict.Body + let body: Operations.SetGithubAccountBots.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14789,7 +18192,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetEventRelay.Output.ContentTooLarge.Body + let body: Operations.SetGithubAccountBots.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14811,7 +18214,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetEventRelay.Output.InternalServerError.Body + let body: Operations.SetGithubAccountBots.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14833,7 +18236,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetEventRelay.Output.ServiceUnavailable.Body + let body: Operations.SetGithubAccountBots.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14865,18 +18268,20 @@ public struct Client: APIProtocol { } ) } - /// Sets the event relay URL, or removes it with `null`, which disconnects the relay. + /// Replaces the machine account's token. 400 when GitHub refuses it or it signs in as another user. /// - /// - Remark: HTTP `PUT /v1/event-relay`. - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)`. - public func updateEventRelay(_ input: Operations.UpdateEventRelay.Input) async throws -> Operations.UpdateEventRelay.Output { + /// - Remark: HTTP `PUT /v1/github-accounts/{id}/token`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)`. + public func setGithubAccountToken(_ input: Operations.SetGithubAccountToken.Input) async throws -> Operations.SetGithubAccountToken.Output { try await client.send( input: input, - forOperation: Operations.UpdateEventRelay.id, + forOperation: Operations.SetGithubAccountToken.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/event-relay", - parameters: [] + template: "/v1/github-accounts/{}/token", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, @@ -14902,7 +18307,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateEventRelay.Output.Ok.Body + let body: Operations.SetGithubAccountToken.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14912,7 +18317,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.UpdateEventRelay.Output.Ok.Body.JsonPayload.self, + Components.Schemas.GitHubAccount.self, from: responseBody, transforming: { value in .json(value) @@ -14924,7 +18329,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateEventRelay.Output.BadRequest.Body + let body: Operations.SetGithubAccountToken.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14946,7 +18351,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateEventRelay.Output.Unauthorized.Body + let body: Operations.SetGithubAccountToken.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14968,7 +18373,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateEventRelay.Output.NotFound.Body + let body: Operations.SetGithubAccountToken.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -14990,7 +18395,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateEventRelay.Output.MethodNotAllowed.Body + let body: Operations.SetGithubAccountToken.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15012,7 +18417,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateEventRelay.Output.Conflict.Body + let body: Operations.SetGithubAccountToken.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15034,7 +18439,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateEventRelay.Output.ContentTooLarge.Body + let body: Operations.SetGithubAccountToken.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15056,7 +18461,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateEventRelay.Output.InternalServerError.Body + let body: Operations.SetGithubAccountToken.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15078,7 +18483,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateEventRelay.Output.ServiceUnavailable.Body + let body: Operations.SetGithubAccountToken.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15110,17 +18515,17 @@ public struct Client: APIProtocol { } ) } - /// The account's event sources, each with the number of automations that use it. + /// The account's GitHub Apps, each the GitHub identity its bots act through in one GitHub account's repositories. /// - /// - Remark: HTTP `GET /v1/event-sources`. - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)`. - public func listEventSources(_ input: Operations.ListEventSources.Input) async throws -> Operations.ListEventSources.Output { + /// - Remark: HTTP `GET /v1/github-apps`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)`. + public func listGithubApps(_ input: Operations.ListGithubApps.Input) async throws -> Operations.ListGithubApps.Output { try await client.send( input: input, - forOperation: Operations.ListEventSources.id, + forOperation: Operations.ListGithubApps.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/event-sources", + template: "/v1/github-apps", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( @@ -15138,7 +18543,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListEventSources.Output.Ok.Body + let body: Operations.ListGithubApps.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15148,7 +18553,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.ListEventSources.Output.Ok.Body.JsonPayload.self, + Operations.ListGithubApps.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -15160,7 +18565,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListEventSources.Output.BadRequest.Body + let body: Operations.ListGithubApps.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15182,7 +18587,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListEventSources.Output.Unauthorized.Body + let body: Operations.ListGithubApps.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15204,7 +18609,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListEventSources.Output.NotFound.Body + let body: Operations.ListGithubApps.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15226,7 +18631,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListEventSources.Output.MethodNotAllowed.Body + let body: Operations.ListGithubApps.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15248,7 +18653,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListEventSources.Output.Conflict.Body + let body: Operations.ListGithubApps.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15270,7 +18675,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListEventSources.Output.ContentTooLarge.Body + let body: Operations.ListGithubApps.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15292,7 +18697,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListEventSources.Output.InternalServerError.Body + let body: Operations.ListGithubApps.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15314,7 +18719,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListEventSources.Output.ServiceUnavailable.Body + let body: Operations.ListGithubApps.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15346,17 +18751,17 @@ public struct Client: APIProtocol { } ) } - /// Creates a source on the event relay. The response's `address` contains the source's secret and is returned only once. 400 when the relay URL or token is missing, or the relay can't be reached or rejects the token. + /// Exchanges the code GitHub redirected back with for the App's keys, within an hour of starting. 400 for a stale or reused state. /// - /// - Remark: HTTP `POST /v1/event-sources`. - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)`. - public func createEventSource(_ input: Operations.CreateEventSource.Input) async throws -> Operations.CreateEventSource.Output { + /// - Remark: HTTP `POST /v1/github-apps/complete`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)`. + public func completeGithubApp(_ input: Operations.CompleteGithubApp.Input) async throws -> Operations.CompleteGithubApp.Output { try await client.send( input: input, - forOperation: Operations.CreateEventSource.id, + forOperation: Operations.CompleteGithubApp.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/event-sources", + template: "/v1/github-apps/complete", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( @@ -15381,9 +18786,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateEventSource.Output.Created.Body + let body: Operations.CompleteGithubApp.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15393,7 +18798,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.CreateEventSource.Output.Created.Body.JsonPayload.self, + Components.Schemas.GitHubApp.self, from: responseBody, transforming: { value in .json(value) @@ -15402,10 +18807,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateEventSource.Output.BadRequest.Body + let body: Operations.CompleteGithubApp.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15427,7 +18832,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateEventSource.Output.Unauthorized.Body + let body: Operations.CompleteGithubApp.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15449,7 +18854,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateEventSource.Output.NotFound.Body + let body: Operations.CompleteGithubApp.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15471,7 +18876,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateEventSource.Output.MethodNotAllowed.Body + let body: Operations.CompleteGithubApp.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15493,7 +18898,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateEventSource.Output.Conflict.Body + let body: Operations.CompleteGithubApp.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15515,7 +18920,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateEventSource.Output.ContentTooLarge.Body + let body: Operations.CompleteGithubApp.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15537,7 +18942,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateEventSource.Output.InternalServerError.Body + let body: Operations.CompleteGithubApp.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15559,7 +18964,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateEventSource.Output.ServiceUnavailable.Body + let body: Operations.CompleteGithubApp.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15591,39 +18996,66 @@ public struct Client: APIProtocol { } ) } - /// Deletes the source on the event relay and in Crumble; its address stops working. 409 while an automation uses it. + /// Starts creating a private GitHub App. The client posts `manifest` as a form field to `url`; GitHub then sends the owner to `{origin}/github-app/callback` with a code and state. /// - /// - Remark: HTTP `DELETE /v1/event-sources/{id}`. - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)`. - public func deleteEventSource(_ input: Operations.DeleteEventSource.Input) async throws -> Operations.DeleteEventSource.Output { + /// - Remark: HTTP `POST /v1/github-apps/manifest`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)`. + public func createGithubAppManifest(_ input: Operations.CreateGithubAppManifest.Input) async throws -> Operations.CreateGithubAppManifest.Output { try await client.send( input: input, - forOperation: Operations.DeleteEventSource.id, + forOperation: Operations.CreateGithubAppManifest.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/event-sources/{}", - parameters: [ - input.path.id - ] + template: "/v1/github-apps/manifest", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateGithubAppManifest.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.CreateGithubAppManifest.Output.Ok.Body.JsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteEventSource.Output.BadRequest.Body + let body: Operations.CreateGithubAppManifest.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15645,7 +19077,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteEventSource.Output.Unauthorized.Body + let body: Operations.CreateGithubAppManifest.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15667,7 +19099,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteEventSource.Output.NotFound.Body + let body: Operations.CreateGithubAppManifest.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15689,7 +19121,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteEventSource.Output.MethodNotAllowed.Body + let body: Operations.CreateGithubAppManifest.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15711,7 +19143,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteEventSource.Output.Conflict.Body + let body: Operations.CreateGithubAppManifest.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15733,7 +19165,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteEventSource.Output.ContentTooLarge.Body + let body: Operations.CreateGithubAppManifest.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15755,7 +19187,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteEventSource.Output.InternalServerError.Body + let body: Operations.CreateGithubAppManifest.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15777,7 +19209,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteEventSource.Output.ServiceUnavailable.Body + let body: Operations.CreateGithubAppManifest.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15809,48 +19241,57 @@ public struct Client: APIProtocol { } ) } - /// Server-sent events. Each activity event carries a ReplyEvent or ChatPreviewEvent JSON object in data. Each learned event carries a LearnedEvent: what a bot's review of one turn changed; GET /v1/agents/{id}/reviews lists them durably. Current chat previews replay on connection; finished replies and learned events are not replayed. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. No Last-Event-ID replay. + /// Exchanges the code GitHub sent the owner back with for the owner's tokens, within ten minutes of starting. 400 for a stale or reused state or a refused sign-in. /// - /// - Remark: HTTP `GET /v1/events`. - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)`. - public func streamActivityEvents(_ input: Operations.StreamActivityEvents.Input) async throws -> Operations.StreamActivityEvents.Output { + /// - Remark: HTTP `POST /v1/github-apps/sign-in/complete`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)`. + public func completeGithubAppSignIn(_ input: Operations.CompleteGithubAppSignIn.Input) async throws -> Operations.CompleteGithubAppSignIn.Output { try await client.send( input: input, - forOperation: Operations.StreamActivityEvents.id, + forOperation: Operations.CompleteGithubAppSignIn.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/events", + template: "/v1/github-apps/sign-in/complete", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamActivityEvents.Output.Ok.Body + let body: Operations.CompleteGithubAppSignIn.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "text/event-stream" + "application/json" ] ) switch chosenContentType { - case "text/event-stream": - body = try converter.getResponseBodyAsBinary( - OpenAPIRuntime.HTTPBody.self, + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.GitHubApp.self, from: responseBody, transforming: { value in - .textEventStream(value) + .json(value) } ) default: @@ -15859,7 +19300,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamActivityEvents.Output.BadRequest.Body + let body: Operations.CompleteGithubAppSignIn.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15881,7 +19322,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamActivityEvents.Output.Unauthorized.Body + let body: Operations.CompleteGithubAppSignIn.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15903,7 +19344,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamActivityEvents.Output.NotFound.Body + let body: Operations.CompleteGithubAppSignIn.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15925,7 +19366,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamActivityEvents.Output.MethodNotAllowed.Body + let body: Operations.CompleteGithubAppSignIn.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15947,7 +19388,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamActivityEvents.Output.Conflict.Body + let body: Operations.CompleteGithubAppSignIn.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15969,7 +19410,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamActivityEvents.Output.ContentTooLarge.Body + let body: Operations.CompleteGithubAppSignIn.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -15991,7 +19432,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamActivityEvents.Output.InternalServerError.Body + let body: Operations.CompleteGithubAppSignIn.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16013,7 +19454,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamActivityEvents.Output.ServiceUnavailable.Body + let body: Operations.CompleteGithubAppSignIn.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16045,29 +19486,26 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/executions`. - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)`. - public func listExecutions(_ input: Operations.ListExecutions.Input) async throws -> Operations.ListExecutions.Output { + /// Forgets the App, signs the owner out of it, and takes GH_TOKEN from bots left without an installed App. The App stays on GitHub until the owner deletes it there. + /// + /// - Remark: HTTP `DELETE /v1/github-apps/{id}`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)`. + public func deleteGithubApp(_ input: Operations.DeleteGithubApp.Input) async throws -> Operations.DeleteGithubApp.Output { try await client.send( input: input, - forOperation: Operations.ListExecutions.id, + forOperation: Operations.DeleteGithubApp.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/executions", - parameters: [] + template: "/v1/github-apps/{}", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .delete ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "agentId", - value: input.query.agentId - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -16076,31 +19514,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListExecutions.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.Execution].self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListExecutions.Output.BadRequest.Body + let body: Operations.DeleteGithubApp.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16122,7 +19540,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListExecutions.Output.Unauthorized.Body + let body: Operations.DeleteGithubApp.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16144,7 +19562,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListExecutions.Output.NotFound.Body + let body: Operations.DeleteGithubApp.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16166,7 +19584,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListExecutions.Output.MethodNotAllowed.Body + let body: Operations.DeleteGithubApp.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16188,7 +19606,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListExecutions.Output.Conflict.Body + let body: Operations.DeleteGithubApp.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16210,7 +19628,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListExecutions.Output.ContentTooLarge.Body + let body: Operations.DeleteGithubApp.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16232,7 +19650,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListExecutions.Output.InternalServerError.Body + let body: Operations.DeleteGithubApp.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16254,7 +19672,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListExecutions.Output.ServiceUnavailable.Body + let body: Operations.DeleteGithubApp.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16286,35 +19704,46 @@ public struct Client: APIProtocol { } ) } - /// The account's machine accounts: GitHub users made for bots. A bot acts as its machine account wherever none of its GitHub Apps does. + /// Replaces the bots that act through the App. A bot uses at most one App per GitHub account; 409 when a bot already uses another App for this App's account. /// - /// - Remark: HTTP `GET /v1/github-accounts`. - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)`. - public func listGithubAccounts(_ input: Operations.ListGithubAccounts.Input) async throws -> Operations.ListGithubAccounts.Output { + /// - Remark: HTTP `PUT /v1/github-apps/{id}/bots`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)`. + public func setGithubAppBots(_ input: Operations.SetGithubAppBots.Input) async throws -> Operations.SetGithubAppBots.Output { try await client.send( input: input, - forOperation: Operations.ListGithubAccounts.id, + forOperation: Operations.SetGithubAppBots.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-accounts", - parameters: [] + template: "/v1/github-apps/{}/bots", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubAccounts.Output.Ok.Body + let body: Operations.SetGithubAppBots.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16324,7 +19753,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.ListGithubAccounts.Output.Ok.Body.JsonPayload.self, + Components.Schemas.GitHubApp.self, from: responseBody, transforming: { value in .json(value) @@ -16336,7 +19765,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubAccounts.Output.BadRequest.Body + let body: Operations.SetGithubAppBots.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16358,7 +19787,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubAccounts.Output.Unauthorized.Body + let body: Operations.SetGithubAppBots.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16380,7 +19809,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubAccounts.Output.NotFound.Body + let body: Operations.SetGithubAppBots.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16402,7 +19831,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubAccounts.Output.MethodNotAllowed.Body + let body: Operations.SetGithubAppBots.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16424,7 +19853,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubAccounts.Output.Conflict.Body + let body: Operations.SetGithubAppBots.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16446,7 +19875,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubAccounts.Output.ContentTooLarge.Body + let body: Operations.SetGithubAppBots.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16468,7 +19897,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubAccounts.Output.InternalServerError.Body + let body: Operations.SetGithubAppBots.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16490,7 +19919,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubAccounts.Output.ServiceUnavailable.Body + let body: Operations.SetGithubAppBots.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16522,22 +19951,24 @@ public struct Client: APIProtocol { } ) } - /// Adds the GitHub user a personal access token signs in as. 400 when GitHub refuses the token; 409 when the user is already added. + /// Stores a client secret generated in the App's GitHub settings, for an App created before Crumble kept it. /// - /// - Remark: HTTP `POST /v1/github-accounts`. - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)`. - public func addGithubAccount(_ input: Operations.AddGithubAccount.Input) async throws -> Operations.AddGithubAccount.Output { + /// - Remark: HTTP `PUT /v1/github-apps/{id}/client-secret`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)`. + public func setGithubAppClientSecret(_ input: Operations.SetGithubAppClientSecret.Input) async throws -> Operations.SetGithubAppClientSecret.Output { try await client.send( input: input, - forOperation: Operations.AddGithubAccount.id, + forOperation: Operations.SetGithubAppClientSecret.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-accounts", - parameters: [] + template: "/v1/github-apps/{}/client-secret", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -16559,7 +19990,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AddGithubAccount.Output.Ok.Body + let body: Operations.SetGithubAppClientSecret.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16569,7 +20000,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GitHubAccount.self, + Components.Schemas.GitHubApp.self, from: responseBody, transforming: { value in .json(value) @@ -16581,7 +20012,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AddGithubAccount.Output.BadRequest.Body + let body: Operations.SetGithubAppClientSecret.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16603,7 +20034,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AddGithubAccount.Output.Unauthorized.Body + let body: Operations.SetGithubAppClientSecret.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16625,7 +20056,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AddGithubAccount.Output.NotFound.Body + let body: Operations.SetGithubAppClientSecret.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16647,7 +20078,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AddGithubAccount.Output.MethodNotAllowed.Body + let body: Operations.SetGithubAppClientSecret.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16669,7 +20100,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AddGithubAccount.Output.Conflict.Body + let body: Operations.SetGithubAppClientSecret.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16691,7 +20122,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AddGithubAccount.Output.ContentTooLarge.Body + let body: Operations.SetGithubAppClientSecret.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16713,7 +20144,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AddGithubAccount.Output.InternalServerError.Body + let body: Operations.SetGithubAppClientSecret.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16735,7 +20166,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AddGithubAccount.Output.ServiceUnavailable.Body + let body: Operations.SetGithubAppClientSecret.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16767,24 +20198,24 @@ public struct Client: APIProtocol { } ) } - /// Forgets the machine account and its token, and takes GH_TOKEN from bots left without an installed App. The user stays on GitHub. + /// Finds the App's installation on its account and gives its bots the GH_TOKEN credential. 409 until the owner installs the App. /// - /// - Remark: HTTP `DELETE /v1/github-accounts/{id}`. - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)`. - public func deleteGithubAccount(_ input: Operations.DeleteGithubAccount.Input) async throws -> Operations.DeleteGithubAccount.Output { + /// - Remark: HTTP `POST /v1/github-apps/{id}/connect`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)`. + public func connectGithubApp(_ input: Operations.ConnectGithubApp.Input) async throws -> Operations.ConnectGithubApp.Output { try await client.send( input: input, - forOperation: Operations.DeleteGithubAccount.id, + forOperation: Operations.ConnectGithubApp.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-accounts/{}", + template: "/v1/github-apps/{}/connect", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -16795,11 +20226,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ConnectGithubApp.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.GitHubApp.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubAccount.Output.BadRequest.Body + let body: Operations.ConnectGithubApp.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16821,7 +20272,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubAccount.Output.Unauthorized.Body + let body: Operations.ConnectGithubApp.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16843,7 +20294,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubAccount.Output.NotFound.Body + let body: Operations.ConnectGithubApp.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16865,7 +20316,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubAccount.Output.MethodNotAllowed.Body + let body: Operations.ConnectGithubApp.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16887,7 +20338,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubAccount.Output.Conflict.Body + let body: Operations.ConnectGithubApp.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16909,7 +20360,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubAccount.Output.ContentTooLarge.Body + let body: Operations.ConnectGithubApp.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16931,7 +20382,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubAccount.Output.InternalServerError.Body + let body: Operations.ConnectGithubApp.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16953,7 +20404,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubAccount.Output.ServiceUnavailable.Body + let body: Operations.ConnectGithubApp.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -16985,24 +20436,24 @@ public struct Client: APIProtocol { } ) } - /// Replaces the bots that act as the machine account, giving them GH_TOKEN. A bot acts as at most one; 409 when a bot already acts as another. + /// Starts signing the owner in to GitHub through the App, so its bots act as the owner. The client opens `url`; GitHub sends the owner to the App's callback URL, `{origin}/github-app/authorized`, or `{origin}/ui/github-app/authorized` for Apps created before the web UI moved to `/`, with a code and state. `origin` is no longer used. 409 without a client secret. /// - /// - Remark: HTTP `PUT /v1/github-accounts/{id}/bots`. - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)`. - public func setGithubAccountBots(_ input: Operations.SetGithubAccountBots.Input) async throws -> Operations.SetGithubAccountBots.Output { + /// - Remark: HTTP `POST /v1/github-apps/{id}/sign-in`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)`. + public func signInGithubApp(_ input: Operations.SignInGithubApp.Input) async throws -> Operations.SignInGithubApp.Output { try await client.send( input: input, - forOperation: Operations.SetGithubAccountBots.id, + forOperation: Operations.SignInGithubApp.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-accounts/{}/bots", + template: "/v1/github-apps/{}/sign-in", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -17024,7 +20475,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountBots.Output.Ok.Body + let body: Operations.SignInGithubApp.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17034,7 +20485,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GitHubAccount.self, + Operations.SignInGithubApp.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -17046,7 +20497,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountBots.Output.BadRequest.Body + let body: Operations.SignInGithubApp.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17068,7 +20519,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountBots.Output.Unauthorized.Body + let body: Operations.SignInGithubApp.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17090,7 +20541,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountBots.Output.NotFound.Body + let body: Operations.SignInGithubApp.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17112,7 +20563,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountBots.Output.MethodNotAllowed.Body + let body: Operations.SignInGithubApp.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17134,7 +20585,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountBots.Output.Conflict.Body + let body: Operations.SignInGithubApp.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17156,7 +20607,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountBots.Output.ContentTooLarge.Body + let body: Operations.SignInGithubApp.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17178,7 +20629,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountBots.Output.InternalServerError.Body + let body: Operations.SignInGithubApp.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17200,7 +20651,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountBots.Output.ServiceUnavailable.Body + let body: Operations.SignInGithubApp.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17232,46 +20683,37 @@ public struct Client: APIProtocol { } ) } - /// Replaces the machine account's token. 400 when GitHub refuses it or it signs in as another user. + /// Revokes and forgets the owner's sign-in through the App; its bots act as the App again. /// - /// - Remark: HTTP `PUT /v1/github-accounts/{id}/token`. - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)`. - public func setGithubAccountToken(_ input: Operations.SetGithubAccountToken.Input) async throws -> Operations.SetGithubAccountToken.Output { + /// - Remark: HTTP `DELETE /v1/github-apps/{id}/user`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)`. + public func signOutGithubApp(_ input: Operations.SignOutGithubApp.Input) async throws -> Operations.SignOutGithubApp.Output { try await client.send( input: input, - forOperation: Operations.SetGithubAccountToken.id, + forOperation: Operations.SignOutGithubApp.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-accounts/{}/token", + template: "/v1/github-apps/{}/user", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountToken.Output.Ok.Body + let body: Operations.SignOutGithubApp.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17281,7 +20723,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GitHubAccount.self, + Components.Schemas.GitHubApp.self, from: responseBody, transforming: { value in .json(value) @@ -17293,7 +20735,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountToken.Output.BadRequest.Body + let body: Operations.SignOutGithubApp.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17315,7 +20757,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountToken.Output.Unauthorized.Body + let body: Operations.SignOutGithubApp.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17337,7 +20779,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountToken.Output.NotFound.Body + let body: Operations.SignOutGithubApp.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17359,7 +20801,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountToken.Output.MethodNotAllowed.Body + let body: Operations.SignOutGithubApp.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17381,7 +20823,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountToken.Output.Conflict.Body + let body: Operations.SignOutGithubApp.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17403,7 +20845,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountToken.Output.ContentTooLarge.Body + let body: Operations.SignOutGithubApp.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17425,7 +20867,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountToken.Output.InternalServerError.Body + let body: Operations.SignOutGithubApp.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17447,7 +20889,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAccountToken.Output.ServiceUnavailable.Body + let body: Operations.SignOutGithubApp.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17479,17 +20921,15 @@ public struct Client: APIProtocol { } ) } - /// The account's GitHub Apps, each the GitHub identity its bots act through in one GitHub account's repositories. - /// - /// - Remark: HTTP `GET /v1/github-apps`. - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)`. - public func listGithubApps(_ input: Operations.ListGithubApps.Input) async throws -> Operations.ListGithubApps.Output { + /// - Remark: HTTP `GET /v1/group-chats`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)`. + public func listGroupChats(_ input: Operations.ListGroupChats.Input) async throws -> Operations.ListGroupChats.Output { try await client.send( input: input, - forOperation: Operations.ListGithubApps.id, + forOperation: Operations.ListGroupChats.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-apps", + template: "/v1/group-chats", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( @@ -17507,7 +20947,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubApps.Output.Ok.Body + let body: Operations.ListGroupChats.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17517,7 +20957,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.ListGithubApps.Output.Ok.Body.JsonPayload.self, + [Components.Schemas.GroupChat].self, from: responseBody, transforming: { value in .json(value) @@ -17529,7 +20969,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubApps.Output.BadRequest.Body + let body: Operations.ListGroupChats.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17551,7 +20991,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubApps.Output.Unauthorized.Body + let body: Operations.ListGroupChats.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17573,7 +21013,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubApps.Output.NotFound.Body + let body: Operations.ListGroupChats.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17595,7 +21035,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubApps.Output.MethodNotAllowed.Body + let body: Operations.ListGroupChats.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17617,7 +21057,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubApps.Output.Conflict.Body + let body: Operations.ListGroupChats.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17639,7 +21079,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubApps.Output.ContentTooLarge.Body + let body: Operations.ListGroupChats.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17661,7 +21101,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubApps.Output.InternalServerError.Body + let body: Operations.ListGroupChats.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17683,7 +21123,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGithubApps.Output.ServiceUnavailable.Body + let body: Operations.ListGroupChats.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17715,17 +21155,15 @@ public struct Client: APIProtocol { } ) } - /// Exchanges the code GitHub redirected back with for the App's keys, within an hour of starting. 400 for a stale or reused state. - /// - /// - Remark: HTTP `POST /v1/github-apps/complete`. - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)`. - public func completeGithubApp(_ input: Operations.CompleteGithubApp.Input) async throws -> Operations.CompleteGithubApp.Output { + /// - Remark: HTTP `POST /v1/group-chats`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)`. + public func createGroupChat(_ input: Operations.CreateGroupChat.Input) async throws -> Operations.CreateGroupChat.Output { try await client.send( input: input, - forOperation: Operations.CompleteGithubApp.id, + forOperation: Operations.CreateGroupChat.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-apps/complete", + template: "/v1/group-chats", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( @@ -17750,9 +21188,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubApp.Output.Ok.Body + let body: Operations.CreateGroupChat.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17762,7 +21200,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GitHubApp.self, + Components.Schemas.GroupChat.self, from: responseBody, transforming: { value in .json(value) @@ -17771,10 +21209,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubApp.Output.BadRequest.Body + let body: Operations.CreateGroupChat.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17796,7 +21234,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubApp.Output.Unauthorized.Body + let body: Operations.CreateGroupChat.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17818,7 +21256,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubApp.Output.NotFound.Body + let body: Operations.CreateGroupChat.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17840,7 +21278,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubApp.Output.MethodNotAllowed.Body + let body: Operations.CreateGroupChat.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17862,7 +21300,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubApp.Output.Conflict.Body + let body: Operations.CreateGroupChat.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17884,7 +21322,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubApp.Output.ContentTooLarge.Body + let body: Operations.CreateGroupChat.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17906,7 +21344,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubApp.Output.InternalServerError.Body + let body: Operations.CreateGroupChat.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17928,7 +21366,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubApp.Output.ServiceUnavailable.Body + let body: Operations.CreateGroupChat.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -17960,44 +21398,35 @@ public struct Client: APIProtocol { } ) } - /// Starts creating a private GitHub App. The client posts `manifest` as a form field to `url`; GitHub then sends the owner to `{origin}/github-app/callback` with a code and state. - /// - /// - Remark: HTTP `POST /v1/github-apps/manifest`. - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)`. - public func createGithubAppManifest(_ input: Operations.CreateGithubAppManifest.Input) async throws -> Operations.CreateGithubAppManifest.Output { + /// - Remark: HTTP `GET /v1/group-chats/{id}`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)`. + public func getGroupChat(_ input: Operations.GetGroupChat.Input) async throws -> Operations.GetGroupChat.Output { try await client.send( input: input, - forOperation: Operations.CreateGithubAppManifest.id, + forOperation: Operations.GetGroupChat.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-apps/manifest", - parameters: [] + template: "/v1/group-chats/{}", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGithubAppManifest.Output.Ok.Body + let body: Operations.GetGroupChat.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18007,7 +21436,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.CreateGithubAppManifest.Output.Ok.Body.JsonPayload.self, + Components.Schemas.GroupChat.self, from: responseBody, transforming: { value in .json(value) @@ -18019,7 +21448,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGithubAppManifest.Output.BadRequest.Body + let body: Operations.GetGroupChat.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18041,7 +21470,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGithubAppManifest.Output.Unauthorized.Body + let body: Operations.GetGroupChat.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18063,7 +21492,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGithubAppManifest.Output.NotFound.Body + let body: Operations.GetGroupChat.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18085,7 +21514,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGithubAppManifest.Output.MethodNotAllowed.Body + let body: Operations.GetGroupChat.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18107,7 +21536,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGithubAppManifest.Output.Conflict.Body + let body: Operations.GetGroupChat.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18129,7 +21558,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGithubAppManifest.Output.ContentTooLarge.Body + let body: Operations.GetGroupChat.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18151,7 +21580,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGithubAppManifest.Output.InternalServerError.Body + let body: Operations.GetGroupChat.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18173,7 +21602,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGithubAppManifest.Output.ServiceUnavailable.Body + let body: Operations.GetGroupChat.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18205,22 +21634,22 @@ public struct Client: APIProtocol { } ) } - /// Exchanges the code GitHub sent the owner back with for the owner's tokens, within ten minutes of starting. 400 for a stale or reused state or a refused sign-in. - /// - /// - Remark: HTTP `POST /v1/github-apps/sign-in/complete`. - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)`. - public func completeGithubAppSignIn(_ input: Operations.CompleteGithubAppSignIn.Input) async throws -> Operations.CompleteGithubAppSignIn.Output { + /// - Remark: HTTP `PATCH /v1/group-chats/{id}`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)`. + public func updateGroupChat(_ input: Operations.UpdateGroupChat.Input) async throws -> Operations.UpdateGroupChat.Output { try await client.send( input: input, - forOperation: Operations.CompleteGithubAppSignIn.id, + forOperation: Operations.UpdateGroupChat.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-apps/sign-in/complete", - parameters: [] + template: "/v1/group-chats/{}", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .patch ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -18242,7 +21671,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubAppSignIn.Output.Ok.Body + let body: Operations.UpdateGroupChat.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18252,7 +21681,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GitHubApp.self, + Components.Schemas.GroupChat.self, from: responseBody, transforming: { value in .json(value) @@ -18264,7 +21693,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubAppSignIn.Output.BadRequest.Body + let body: Operations.UpdateGroupChat.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18286,7 +21715,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubAppSignIn.Output.Unauthorized.Body + let body: Operations.UpdateGroupChat.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18308,7 +21737,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubAppSignIn.Output.NotFound.Body + let body: Operations.UpdateGroupChat.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18330,7 +21759,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubAppSignIn.Output.MethodNotAllowed.Body + let body: Operations.UpdateGroupChat.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18352,7 +21781,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubAppSignIn.Output.Conflict.Body + let body: Operations.UpdateGroupChat.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18374,7 +21803,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubAppSignIn.Output.ContentTooLarge.Body + let body: Operations.UpdateGroupChat.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18396,7 +21825,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubAppSignIn.Output.InternalServerError.Body + let body: Operations.UpdateGroupChat.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18418,7 +21847,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CompleteGithubAppSignIn.Output.ServiceUnavailable.Body + let body: Operations.UpdateGroupChat.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18450,17 +21879,15 @@ public struct Client: APIProtocol { } ) } - /// Forgets the App, signs the owner out of it, and takes GH_TOKEN from bots left without an installed App. The App stays on GitHub until the owner deletes it there. - /// - /// - Remark: HTTP `DELETE /v1/github-apps/{id}`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)`. - public func deleteGithubApp(_ input: Operations.DeleteGithubApp.Input) async throws -> Operations.DeleteGithubApp.Output { + /// - Remark: HTTP `DELETE /v1/group-chats/{id}`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)`. + public func deleteGroupChat(_ input: Operations.DeleteGroupChat.Input) async throws -> Operations.DeleteGroupChat.Output { try await client.send( input: input, - forOperation: Operations.DeleteGithubApp.id, + forOperation: Operations.DeleteGroupChat.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-apps/{}", + template: "/v1/group-chats/{}", parameters: [ input.path.id ] @@ -18482,7 +21909,7 @@ public struct Client: APIProtocol { return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubApp.Output.BadRequest.Body + let body: Operations.DeleteGroupChat.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18504,7 +21931,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubApp.Output.Unauthorized.Body + let body: Operations.DeleteGroupChat.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18526,7 +21953,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubApp.Output.NotFound.Body + let body: Operations.DeleteGroupChat.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18548,7 +21975,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubApp.Output.MethodNotAllowed.Body + let body: Operations.DeleteGroupChat.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18570,7 +21997,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubApp.Output.Conflict.Body + let body: Operations.DeleteGroupChat.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18592,7 +22019,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubApp.Output.ContentTooLarge.Body + let body: Operations.DeleteGroupChat.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18614,7 +22041,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubApp.Output.InternalServerError.Body + let body: Operations.DeleteGroupChat.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18636,7 +22063,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGithubApp.Output.ServiceUnavailable.Body + let body: Operations.DeleteGroupChat.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18668,68 +22095,67 @@ public struct Client: APIProtocol { } ) } - /// Replaces the bots that act through the App. A bot uses at most one App per GitHub account; 409 when a bot already uses another App for this App's account. - /// - /// - Remark: HTTP `PUT /v1/github-apps/{id}/bots`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)`. - public func setGithubAppBots(_ input: Operations.SetGithubAppBots.Input) async throws -> Operations.SetGithubAppBots.Output { + /// - Remark: HTTP `GET /v1/group-chats/{id}/attachments/{entryId}/{index}`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)`. + public func getGroupAttachment(_ input: Operations.GetGroupAttachment.Input) async throws -> Operations.GetGroupAttachment.Output { try await client.send( input: input, - forOperation: Operations.SetGithubAppBots.id, + forOperation: Operations.GetGroupAttachment.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-apps/{}/bots", + template: "/v1/group-chats/{}/attachments/{}/{}", parameters: [ - input.path.id + input.path.id, + input.path.entryId, + input.path.index ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: + let headers: Operations.GetGroupAttachment.Output.Ok.Headers = .init(cacheControl: try converter.getOptionalHeaderFieldAsURI( + in: response.headerFields, + name: "Cache-Control", + as: Swift.String.self + )) let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppBots.Output.Ok.Body + let body: Operations.GetGroupAttachment.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "application/json" + "*/*" ] ) switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GitHubApp.self, + case "*/*": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, from: responseBody, transforming: { value in - .json(value) + .any(value) } ) default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .ok(.init( + headers: headers, + body: body + )) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppBots.Output.BadRequest.Body + let body: Operations.GetGroupAttachment.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18751,7 +22177,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppBots.Output.Unauthorized.Body + let body: Operations.GetGroupAttachment.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18773,7 +22199,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppBots.Output.NotFound.Body + let body: Operations.GetGroupAttachment.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18795,7 +22221,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppBots.Output.MethodNotAllowed.Body + let body: Operations.GetGroupAttachment.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18817,7 +22243,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppBots.Output.Conflict.Body + let body: Operations.GetGroupAttachment.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18839,7 +22265,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppBots.Output.ContentTooLarge.Body + let body: Operations.GetGroupAttachment.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18861,7 +22287,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppBots.Output.InternalServerError.Body + let body: Operations.GetGroupAttachment.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18883,7 +22309,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppBots.Output.ServiceUnavailable.Body + let body: Operations.GetGroupAttachment.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18915,46 +22341,42 @@ public struct Client: APIProtocol { } ) } - /// Stores a client secret generated in the App's GitHub settings, for an App created before Crumble kept it. - /// - /// - Remark: HTTP `PUT /v1/github-apps/{id}/client-secret`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)`. - public func setGithubAppClientSecret(_ input: Operations.SetGithubAppClientSecret.Input) async throws -> Operations.SetGithubAppClientSecret.Output { + /// - Remark: HTTP `GET /v1/group-chats/{id}/chat`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)`. + public func getGroupChatSnapshot(_ input: Operations.GetGroupChatSnapshot.Input) async throws -> Operations.GetGroupChatSnapshot.Output { try await client.send( input: input, - forOperation: Operations.SetGithubAppClientSecret.id, + forOperation: Operations.GetGroupChatSnapshot.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-apps/{}/client-secret", + template: "/v1/group-chats/{}/chat", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppClientSecret.Output.Ok.Body + let body: Operations.GetGroupChatSnapshot.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18964,7 +22386,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GitHubApp.self, + Components.Schemas.GroupChatSnapshot.self, from: responseBody, transforming: { value in .json(value) @@ -18976,7 +22398,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppClientSecret.Output.BadRequest.Body + let body: Operations.GetGroupChatSnapshot.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -18998,7 +22420,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppClientSecret.Output.Unauthorized.Body + let body: Operations.GetGroupChatSnapshot.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19020,7 +22442,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppClientSecret.Output.NotFound.Body + let body: Operations.GetGroupChatSnapshot.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19042,7 +22464,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppClientSecret.Output.MethodNotAllowed.Body + let body: Operations.GetGroupChatSnapshot.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19064,7 +22486,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppClientSecret.Output.Conflict.Body + let body: Operations.GetGroupChatSnapshot.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19086,7 +22508,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppClientSecret.Output.ContentTooLarge.Body + let body: Operations.GetGroupChatSnapshot.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19108,7 +22530,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppClientSecret.Output.InternalServerError.Body + let body: Operations.GetGroupChatSnapshot.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19130,7 +22552,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetGithubAppClientSecret.Output.ServiceUnavailable.Body + let body: Operations.GetGroupChatSnapshot.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19162,26 +22584,33 @@ public struct Client: APIProtocol { } ) } - /// Finds the App's installation on its account and gives its bots the GH_TOKEN credential. 409 until the owner installs the App. + /// Server-sent events. Each snapshot event carries a GroupChatSnapshot JSON object in data, sent on connection and after every change. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. Reconnect by fetching the current snapshot; there is no Last-Event-ID replay. /// - /// - Remark: HTTP `POST /v1/github-apps/{id}/connect`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)`. - public func connectGithubApp(_ input: Operations.ConnectGithubApp.Input) async throws -> Operations.ConnectGithubApp.Output { + /// - Remark: HTTP `GET /v1/group-chats/{id}/events`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)`. + public func streamGroupChatEvents(_ input: Operations.StreamGroupChatEvents.Input) async throws -> Operations.StreamGroupChatEvents.Output { try await client.send( input: input, - forOperation: Operations.ConnectGithubApp.id, + forOperation: Operations.StreamGroupChatEvents.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-apps/{}/connect", + template: "/v1/group-chats/{}/events", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -19192,20 +22621,20 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectGithubApp.Output.Ok.Body + let body: Operations.StreamGroupChatEvents.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "application/json" + "text/event-stream" ] ) switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GitHubApp.self, + case "text/event-stream": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, from: responseBody, transforming: { value in - .json(value) + .textEventStream(value) } ) default: @@ -19214,7 +22643,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectGithubApp.Output.BadRequest.Body + let body: Operations.StreamGroupChatEvents.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19236,7 +22665,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectGithubApp.Output.Unauthorized.Body + let body: Operations.StreamGroupChatEvents.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19258,7 +22687,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectGithubApp.Output.NotFound.Body + let body: Operations.StreamGroupChatEvents.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19280,7 +22709,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectGithubApp.Output.MethodNotAllowed.Body + let body: Operations.StreamGroupChatEvents.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19302,7 +22731,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectGithubApp.Output.Conflict.Body + let body: Operations.StreamGroupChatEvents.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19324,7 +22753,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectGithubApp.Output.ContentTooLarge.Body + let body: Operations.StreamGroupChatEvents.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19346,7 +22775,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectGithubApp.Output.InternalServerError.Body + let body: Operations.StreamGroupChatEvents.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19368,7 +22797,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectGithubApp.Output.ServiceUnavailable.Body + let body: Operations.StreamGroupChatEvents.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19400,46 +22829,49 @@ public struct Client: APIProtocol { } ) } - /// Starts signing the owner in to GitHub through the App, so its bots act as the owner. The client opens `url`; GitHub sends the owner to the App's callback URL, `{origin}/github-app/authorized`, or `{origin}/ui/github-app/authorized` for Apps created before the web UI moved to `/`, with a code and state. `origin` is no longer used. 409 without a client secret. - /// - /// - Remark: HTTP `POST /v1/github-apps/{id}/sign-in`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)`. - public func signInGithubApp(_ input: Operations.SignInGithubApp.Input) async throws -> Operations.SignInGithubApp.Output { + /// - Remark: HTTP `GET /v1/group-chats/{id}/history`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)`. + public func getGroupChatHistory(_ input: Operations.GetGroupChatHistory.Input) async throws -> Operations.GetGroupChatHistory.Output { try await client.send( input: input, - forOperation: Operations.SignInGithubApp.id, + forOperation: Operations.GetGroupChatHistory.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-apps/{}/sign-in", + template: "/v1/group-chats/{}/history", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignInGithubApp.Output.Ok.Body + let body: Operations.GetGroupChatHistory.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19449,7 +22881,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.SignInGithubApp.Output.Ok.Body.JsonPayload.self, + Components.Schemas.TranscriptPage.self, from: responseBody, transforming: { value in .json(value) @@ -19461,7 +22893,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignInGithubApp.Output.BadRequest.Body + let body: Operations.GetGroupChatHistory.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19483,7 +22915,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignInGithubApp.Output.Unauthorized.Body + let body: Operations.GetGroupChatHistory.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19505,7 +22937,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignInGithubApp.Output.NotFound.Body + let body: Operations.GetGroupChatHistory.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19527,7 +22959,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignInGithubApp.Output.MethodNotAllowed.Body + let body: Operations.GetGroupChatHistory.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19549,7 +22981,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignInGithubApp.Output.Conflict.Body + let body: Operations.GetGroupChatHistory.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19571,7 +23003,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignInGithubApp.Output.ContentTooLarge.Body + let body: Operations.GetGroupChatHistory.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19593,7 +23025,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignInGithubApp.Output.InternalServerError.Body + let body: Operations.GetGroupChatHistory.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19615,7 +23047,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignInGithubApp.Output.ServiceUnavailable.Body + let body: Operations.GetGroupChatHistory.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19647,37 +23079,44 @@ public struct Client: APIProtocol { } ) } - /// Revokes and forgets the owner's sign-in through the App; its bots act as the App again. - /// - /// - Remark: HTTP `DELETE /v1/github-apps/{id}/user`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)`. - public func signOutGithubApp(_ input: Operations.SignOutGithubApp.Input) async throws -> Operations.SignOutGithubApp.Output { + /// - Remark: HTTP `POST /v1/group-chats/{id}/messages`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)`. + public func sendGroupMessage(_ input: Operations.SendGroupMessage.Input) async throws -> Operations.SendGroupMessage.Output { try await client.send( input: input, - forOperation: Operations.SignOutGithubApp.id, + forOperation: Operations.SendGroupMessage.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/github-apps/{}/user", + template: "/v1/group-chats/{}/messages", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutGithubApp.Output.Ok.Body + let body: Operations.SendGroupMessage.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19687,7 +23126,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GitHubApp.self, + Components.Schemas.GroupMessageReceipt.self, from: responseBody, transforming: { value in .json(value) @@ -19696,10 +23135,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutGithubApp.Output.BadRequest.Body + let body: Operations.SendGroupMessage.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19721,7 +23160,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutGithubApp.Output.Unauthorized.Body + let body: Operations.SendGroupMessage.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19743,7 +23182,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutGithubApp.Output.NotFound.Body + let body: Operations.SendGroupMessage.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19765,7 +23204,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutGithubApp.Output.MethodNotAllowed.Body + let body: Operations.SendGroupMessage.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19787,7 +23226,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutGithubApp.Output.Conflict.Body + let body: Operations.SendGroupMessage.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19809,7 +23248,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutGithubApp.Output.ContentTooLarge.Body + let body: Operations.SendGroupMessage.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19831,7 +23270,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutGithubApp.Output.InternalServerError.Body + let body: Operations.SendGroupMessage.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19853,7 +23292,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutGithubApp.Output.ServiceUnavailable.Body + let body: Operations.SendGroupMessage.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19885,20 +23324,24 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/group-chats`. - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)`. - public func listGroupChats(_ input: Operations.ListGroupChats.Input) async throws -> Operations.ListGroupChats.Output { + /// Ends every running bot turn in the group and drops the queued ones. The group is not paused; the next message starts turns again. + /// + /// - Remark: HTTP `POST /v1/group-chats/{id}/stop`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)`. + public func stopGroupChat(_ input: Operations.StopGroupChat.Input) async throws -> Operations.StopGroupChat.Output { try await client.send( input: input, - forOperation: Operations.ListGroupChats.id, + forOperation: Operations.StopGroupChat.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats", - parameters: [] + template: "/v1/group-chats/{}/stop", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -19909,31 +23352,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGroupChats.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.GroupChat].self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGroupChats.Output.BadRequest.Body + let body: Operations.StopGroupChat.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19955,7 +23378,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGroupChats.Output.Unauthorized.Body + let body: Operations.StopGroupChat.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19977,7 +23400,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGroupChats.Output.NotFound.Body + let body: Operations.StopGroupChat.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -19999,7 +23422,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGroupChats.Output.MethodNotAllowed.Body + let body: Operations.StopGroupChat.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20021,7 +23444,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGroupChats.Output.Conflict.Body + let body: Operations.StopGroupChat.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20043,7 +23466,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGroupChats.Output.ContentTooLarge.Body + let body: Operations.StopGroupChat.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20065,7 +23488,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGroupChats.Output.InternalServerError.Body + let body: Operations.StopGroupChat.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20087,7 +23510,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListGroupChats.Output.ServiceUnavailable.Body + let body: Operations.StopGroupChat.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20119,42 +23542,35 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/group-chats`. - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)`. - public func createGroupChat(_ input: Operations.CreateGroupChat.Input) async throws -> Operations.CreateGroupChat.Output { + /// The account's judge model for desktop jobs' intent checks, and the models the account's provider keys reach. + /// + /// - Remark: HTTP `GET /v1/judge-model`. + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)`. + public func getJudgeModel(_ input: Operations.GetJudgeModel.Input) async throws -> Operations.GetJudgeModel.Output { try await client.send( input: input, - forOperation: Operations.CreateGroupChat.id, + forOperation: Operations.GetJudgeModel.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats", + template: "/v1/judge-model", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGroupChat.Output.Created.Body + let body: Operations.GetJudgeModel.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20164,7 +23580,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GroupChat.self, + Components.Schemas.JudgeModel.self, from: responseBody, transforming: { value in .json(value) @@ -20173,10 +23589,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGroupChat.Output.BadRequest.Body + let body: Operations.GetJudgeModel.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20198,7 +23614,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGroupChat.Output.Unauthorized.Body + let body: Operations.GetJudgeModel.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20220,7 +23636,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGroupChat.Output.NotFound.Body + let body: Operations.GetJudgeModel.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20242,7 +23658,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGroupChat.Output.MethodNotAllowed.Body + let body: Operations.GetJudgeModel.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20264,7 +23680,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGroupChat.Output.Conflict.Body + let body: Operations.GetJudgeModel.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20286,7 +23702,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGroupChat.Output.ContentTooLarge.Body + let body: Operations.GetJudgeModel.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20308,7 +23724,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGroupChat.Output.InternalServerError.Body + let body: Operations.GetJudgeModel.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20330,7 +23746,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateGroupChat.Output.ServiceUnavailable.Body + let body: Operations.GetJudgeModel.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20362,35 +23778,42 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/group-chats/{id}`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)`. - public func getGroupChat(_ input: Operations.GetGroupChat.Input) async throws -> Operations.GetGroupChat.Output { + /// - Remark: HTTP `PUT /v1/judge-model`. + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)`. + public func updateJudgeModel(_ input: Operations.UpdateJudgeModel.Input) async throws -> Operations.UpdateJudgeModel.Output { try await client.send( input: input, - forOperation: Operations.GetGroupChat.id, + forOperation: Operations.UpdateJudgeModel.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats/{}", - parameters: [ - input.path.id - ] + template: "/v1/judge-model", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChat.Output.Ok.Body + let body: Operations.UpdateJudgeModel.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20400,7 +23823,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GroupChat.self, + Components.Schemas.JudgeModel.self, from: responseBody, transforming: { value in .json(value) @@ -20412,7 +23835,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChat.Output.BadRequest.Body + let body: Operations.UpdateJudgeModel.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20434,7 +23857,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChat.Output.Unauthorized.Body + let body: Operations.UpdateJudgeModel.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20456,7 +23879,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChat.Output.NotFound.Body + let body: Operations.UpdateJudgeModel.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20478,7 +23901,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChat.Output.MethodNotAllowed.Body + let body: Operations.UpdateJudgeModel.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20500,7 +23923,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChat.Output.Conflict.Body + let body: Operations.UpdateJudgeModel.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20522,7 +23945,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChat.Output.ContentTooLarge.Body + let body: Operations.UpdateJudgeModel.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20544,7 +23967,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChat.Output.InternalServerError.Body + let body: Operations.UpdateJudgeModel.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20566,7 +23989,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChat.Output.ServiceUnavailable.Body + let body: Operations.UpdateJudgeModel.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20598,44 +24021,33 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `PATCH /v1/group-chats/{id}`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)`. - public func updateGroupChat(_ input: Operations.UpdateGroupChat.Input) async throws -> Operations.UpdateGroupChat.Output { + /// - Remark: HTTP `GET /v1/mcp-servers`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)`. + public func listMcpServers(_ input: Operations.ListMcpServers.Input) async throws -> Operations.ListMcpServers.Output { try await client.send( input: input, - forOperation: Operations.UpdateGroupChat.id, + forOperation: Operations.ListMcpServers.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats/{}", - parameters: [ - input.path.id - ] + template: "/v1/mcp-servers", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .patch + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateGroupChat.Output.Ok.Body + let body: Operations.ListMcpServers.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20645,7 +24057,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GroupChat.self, + [Components.Schemas.McpServerStatus].self, from: responseBody, transforming: { value in .json(value) @@ -20657,7 +24069,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateGroupChat.Output.BadRequest.Body + let body: Operations.ListMcpServers.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20679,7 +24091,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateGroupChat.Output.Unauthorized.Body + let body: Operations.ListMcpServers.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20701,7 +24113,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateGroupChat.Output.NotFound.Body + let body: Operations.ListMcpServers.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20723,7 +24135,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateGroupChat.Output.MethodNotAllowed.Body + let body: Operations.ListMcpServers.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20745,7 +24157,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateGroupChat.Output.Conflict.Body + let body: Operations.ListMcpServers.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20767,7 +24179,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateGroupChat.Output.ContentTooLarge.Body + let body: Operations.ListMcpServers.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20789,7 +24201,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateGroupChat.Output.InternalServerError.Body + let body: Operations.ListMcpServers.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20811,7 +24223,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateGroupChat.Output.ServiceUnavailable.Body + let body: Operations.ListMcpServers.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20843,37 +24255,64 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `DELETE /v1/group-chats/{id}`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)`. - public func deleteGroupChat(_ input: Operations.DeleteGroupChat.Input) async throws -> Operations.DeleteGroupChat.Output { + /// - Remark: HTTP `POST /v1/mcp-servers`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)`. + public func createMcpServer(_ input: Operations.CreateMcpServer.Input) async throws -> Operations.CreateMcpServer.Output { try await client.send( input: input, - forOperation: Operations.DeleteGroupChat.id, + forOperation: Operations.CreateMcpServer.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats/{}", - parameters: [ - input.path.id - ] + template: "/v1/mcp-servers", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CreateMcpServer.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.McpServer.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGroupChat.Output.BadRequest.Body + let body: Operations.CreateMcpServer.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20895,7 +24334,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGroupChat.Output.Unauthorized.Body + let body: Operations.CreateMcpServer.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20917,7 +24356,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGroupChat.Output.NotFound.Body + let body: Operations.CreateMcpServer.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20939,7 +24378,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGroupChat.Output.MethodNotAllowed.Body + let body: Operations.CreateMcpServer.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20961,7 +24400,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGroupChat.Output.Conflict.Body + let body: Operations.CreateMcpServer.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -20983,7 +24422,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGroupChat.Output.ContentTooLarge.Body + let body: Operations.CreateMcpServer.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21005,7 +24444,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGroupChat.Output.InternalServerError.Body + let body: Operations.CreateMcpServer.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21027,7 +24466,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteGroupChat.Output.ServiceUnavailable.Body + let body: Operations.CreateMcpServer.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21059,67 +24498,66 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/group-chats/{id}/attachments/{entryId}/{index}`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)`. - public func getGroupAttachment(_ input: Operations.GetGroupAttachment.Input) async throws -> Operations.GetGroupAttachment.Output { + /// - Remark: HTTP `PATCH /v1/mcp-servers/{id}`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)`. + public func updateMcpServer(_ input: Operations.UpdateMcpServer.Input) async throws -> Operations.UpdateMcpServer.Output { try await client.send( input: input, - forOperation: Operations.GetGroupAttachment.id, + forOperation: Operations.UpdateMcpServer.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats/{}/attachments/{}/{}", + template: "/v1/mcp-servers/{}", parameters: [ - input.path.id, - input.path.entryId, - input.path.index + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .patch ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: - let headers: Operations.GetGroupAttachment.Output.Ok.Headers = .init(cacheControl: try converter.getOptionalHeaderFieldAsURI( - in: response.headerFields, - name: "Cache-Control", - as: Swift.String.self - )) let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupAttachment.Output.Ok.Body + let body: Operations.UpdateMcpServer.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "*/*" + "application/json" ] ) switch chosenContentType { - case "*/*": - body = try converter.getResponseBodyAsBinary( - OpenAPIRuntime.HTTPBody.self, + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.UpdateMcpServer.Output.Ok.Body.JsonPayload?.self, from: responseBody, transforming: { value in - .any(value) + .json(value) } ) default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init( - headers: headers, - body: body - )) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupAttachment.Output.BadRequest.Body + let body: Operations.UpdateMcpServer.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21141,7 +24579,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupAttachment.Output.Unauthorized.Body + let body: Operations.UpdateMcpServer.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21163,7 +24601,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupAttachment.Output.NotFound.Body + let body: Operations.UpdateMcpServer.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21185,7 +24623,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupAttachment.Output.MethodNotAllowed.Body + let body: Operations.UpdateMcpServer.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21207,7 +24645,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupAttachment.Output.Conflict.Body + let body: Operations.UpdateMcpServer.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21229,7 +24667,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupAttachment.Output.ContentTooLarge.Body + let body: Operations.UpdateMcpServer.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21251,7 +24689,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupAttachment.Output.InternalServerError.Body + let body: Operations.UpdateMcpServer.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21273,7 +24711,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupAttachment.Output.ServiceUnavailable.Body + let body: Operations.UpdateMcpServer.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21305,31 +24743,24 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/group-chats/{id}/chat`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)`. - public func getGroupChatSnapshot(_ input: Operations.GetGroupChatSnapshot.Input) async throws -> Operations.GetGroupChatSnapshot.Output { + /// - Remark: HTTP `DELETE /v1/mcp-servers/{id}`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)`. + public func deleteMcpServer(_ input: Operations.DeleteMcpServer.Input) async throws -> Operations.DeleteMcpServer.Output { try await client.send( input: input, - forOperation: Operations.GetGroupChatSnapshot.id, + forOperation: Operations.DeleteMcpServer.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats/{}/chat", + template: "/v1/mcp-servers/{}", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .delete ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -21338,31 +24769,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatSnapshot.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GroupChatSnapshot.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatSnapshot.Output.BadRequest.Body + let body: Operations.DeleteMcpServer.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21384,7 +24795,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatSnapshot.Output.Unauthorized.Body + let body: Operations.DeleteMcpServer.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21406,7 +24817,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatSnapshot.Output.NotFound.Body + let body: Operations.DeleteMcpServer.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21428,7 +24839,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatSnapshot.Output.MethodNotAllowed.Body + let body: Operations.DeleteMcpServer.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21450,7 +24861,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatSnapshot.Output.Conflict.Body + let body: Operations.DeleteMcpServer.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21472,7 +24883,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatSnapshot.Output.ContentTooLarge.Body + let body: Operations.DeleteMcpServer.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21494,7 +24905,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatSnapshot.Output.InternalServerError.Body + let body: Operations.DeleteMcpServer.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21516,7 +24927,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatSnapshot.Output.ServiceUnavailable.Body + let body: Operations.DeleteMcpServer.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21548,57 +24959,57 @@ public struct Client: APIProtocol { } ) } - /// Server-sent events. Each snapshot event carries a GroupChatSnapshot JSON object in data, sent on connection and after every change. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. Reconnect by fetching the current snapshot; there is no Last-Event-ID replay. - /// - /// - Remark: HTTP `GET /v1/group-chats/{id}/events`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)`. - public func streamGroupChatEvents(_ input: Operations.StreamGroupChatEvents.Input) async throws -> Operations.StreamGroupChatEvents.Output { + /// - Remark: HTTP `POST /v1/mcp-servers/{id}/oauth`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)`. + public func startMcpOAuth(_ input: Operations.StartMcpOAuth.Input) async throws -> Operations.StartMcpOAuth.Output { try await client.send( input: input, - forOperation: Operations.StreamGroupChatEvents.id, + forOperation: Operations.StartMcpOAuth.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats/{}/events", + template: "/v1/mcp-servers/{}/oauth", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamGroupChatEvents.Output.Ok.Body + let body: Operations.StartMcpOAuth.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "text/event-stream" + "application/json" ] ) switch chosenContentType { - case "text/event-stream": - body = try converter.getResponseBodyAsBinary( - OpenAPIRuntime.HTTPBody.self, + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.McpOAuthStart.self, from: responseBody, transforming: { value in - .textEventStream(value) + .json(value) } ) default: @@ -21607,7 +25018,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamGroupChatEvents.Output.BadRequest.Body + let body: Operations.StartMcpOAuth.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21629,7 +25040,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamGroupChatEvents.Output.Unauthorized.Body + let body: Operations.StartMcpOAuth.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21651,7 +25062,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamGroupChatEvents.Output.NotFound.Body + let body: Operations.StartMcpOAuth.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21673,7 +25084,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamGroupChatEvents.Output.MethodNotAllowed.Body + let body: Operations.StartMcpOAuth.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21695,7 +25106,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamGroupChatEvents.Output.Conflict.Body + let body: Operations.StartMcpOAuth.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21717,7 +25128,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamGroupChatEvents.Output.ContentTooLarge.Body + let body: Operations.StartMcpOAuth.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21739,7 +25150,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamGroupChatEvents.Output.InternalServerError.Body + let body: Operations.StartMcpOAuth.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21761,7 +25172,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StreamGroupChatEvents.Output.ServiceUnavailable.Body + let body: Operations.StartMcpOAuth.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21793,38 +25204,24 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/group-chats/{id}/history`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)`. - public func getGroupChatHistory(_ input: Operations.GetGroupChatHistory.Input) async throws -> Operations.GetGroupChatHistory.Output { + /// - Remark: HTTP `DELETE /v1/mcp-servers/{id}/oauth`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)`. + public func signOutMcpOAuth(_ input: Operations.SignOutMcpOAuth.Input) async throws -> Operations.SignOutMcpOAuth.Output { try await client.send( input: input, - forOperation: Operations.GetGroupChatHistory.id, + forOperation: Operations.SignOutMcpOAuth.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats/{}/history", + template: "/v1/mcp-servers/{}/oauth", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .delete ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "before", - value: input.query.before - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -21835,7 +25232,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatHistory.Output.Ok.Body + let body: Operations.SignOutMcpOAuth.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21845,7 +25242,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.TranscriptPage.self, + Components.Schemas.McpServerStatus.self, from: responseBody, transforming: { value in .json(value) @@ -21857,7 +25254,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatHistory.Output.BadRequest.Body + let body: Operations.SignOutMcpOAuth.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21879,7 +25276,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatHistory.Output.Unauthorized.Body + let body: Operations.SignOutMcpOAuth.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21901,7 +25298,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatHistory.Output.NotFound.Body + let body: Operations.SignOutMcpOAuth.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21923,7 +25320,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatHistory.Output.MethodNotAllowed.Body + let body: Operations.SignOutMcpOAuth.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21945,7 +25342,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatHistory.Output.Conflict.Body + let body: Operations.SignOutMcpOAuth.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21967,7 +25364,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatHistory.Output.ContentTooLarge.Body + let body: Operations.SignOutMcpOAuth.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -21989,7 +25386,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatHistory.Output.InternalServerError.Body + let body: Operations.SignOutMcpOAuth.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22011,7 +25408,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetGroupChatHistory.Output.ServiceUnavailable.Body + let body: Operations.SignOutMcpOAuth.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22043,15 +25440,15 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/group-chats/{id}/messages`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)`. - public func sendGroupMessage(_ input: Operations.SendGroupMessage.Input) async throws -> Operations.SendGroupMessage.Output { + /// - Remark: HTTP `POST /v1/mcp-servers/{id}/oauth/callback`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)`. + public func finishMcpOAuth(_ input: Operations.FinishMcpOAuth.Input) async throws -> Operations.FinishMcpOAuth.Output { try await client.send( input: input, - forOperation: Operations.SendGroupMessage.id, + forOperation: Operations.FinishMcpOAuth.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats/{}/messages", + template: "/v1/mcp-servers/{}/oauth/callback", parameters: [ input.path.id ] @@ -22078,9 +25475,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendGroupMessage.Output.Created.Body + let body: Operations.FinishMcpOAuth.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22090,7 +25487,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.GroupMessageReceipt.self, + Components.Schemas.McpServerStatus.self, from: responseBody, transforming: { value in .json(value) @@ -22099,10 +25496,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendGroupMessage.Output.BadRequest.Body + let body: Operations.FinishMcpOAuth.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22124,7 +25521,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendGroupMessage.Output.Unauthorized.Body + let body: Operations.FinishMcpOAuth.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22146,7 +25543,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendGroupMessage.Output.NotFound.Body + let body: Operations.FinishMcpOAuth.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22168,7 +25565,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendGroupMessage.Output.MethodNotAllowed.Body + let body: Operations.FinishMcpOAuth.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22190,7 +25587,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendGroupMessage.Output.Conflict.Body + let body: Operations.FinishMcpOAuth.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22212,7 +25609,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendGroupMessage.Output.ContentTooLarge.Body + let body: Operations.FinishMcpOAuth.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22234,7 +25631,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendGroupMessage.Output.InternalServerError.Body + let body: Operations.FinishMcpOAuth.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22256,7 +25653,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SendGroupMessage.Output.ServiceUnavailable.Body + let body: Operations.FinishMcpOAuth.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22288,24 +25685,20 @@ public struct Client: APIProtocol { } ) } - /// Ends every running bot turn in the group and drops the queued ones. The group is not paused; the next message starts turns again. - /// - /// - Remark: HTTP `POST /v1/group-chats/{id}/stop`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)`. - public func stopGroupChat(_ input: Operations.StopGroupChat.Input) async throws -> Operations.StopGroupChat.Output { + /// - Remark: HTTP `GET /v1/memories`. + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)`. + public func listSharedMemories(_ input: Operations.ListSharedMemories.Input) async throws -> Operations.ListSharedMemories.Output { try await client.send( input: input, - forOperation: Operations.StopGroupChat.id, + forOperation: Operations.ListSharedMemories.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/group-chats/{}/stop", - parameters: [ - input.path.id - ] + template: "/v1/memories", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -22316,11 +25709,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListSharedMemories.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.Memory].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StopGroupChat.Output.BadRequest.Body + let body: Operations.ListSharedMemories.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22342,7 +25755,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StopGroupChat.Output.Unauthorized.Body + let body: Operations.ListSharedMemories.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22364,7 +25777,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StopGroupChat.Output.NotFound.Body + let body: Operations.ListSharedMemories.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22386,7 +25799,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StopGroupChat.Output.MethodNotAllowed.Body + let body: Operations.ListSharedMemories.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22408,7 +25821,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StopGroupChat.Output.Conflict.Body + let body: Operations.ListSharedMemories.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22430,7 +25843,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StopGroupChat.Output.ContentTooLarge.Body + let body: Operations.ListSharedMemories.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22452,7 +25865,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StopGroupChat.Output.InternalServerError.Body + let body: Operations.ListSharedMemories.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22474,7 +25887,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StopGroupChat.Output.ServiceUnavailable.Body + let body: Operations.ListSharedMemories.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22506,35 +25919,42 @@ public struct Client: APIProtocol { } ) } - /// The account's judge model for desktop jobs' intent checks, and the models the account's provider keys reach. - /// - /// - Remark: HTTP `GET /v1/judge-model`. - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)`. - public func getJudgeModel(_ input: Operations.GetJudgeModel.Input) async throws -> Operations.GetJudgeModel.Output { + /// - Remark: HTTP `POST /v1/memories`. + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)`. + public func createSharedMemory(_ input: Operations.CreateSharedMemory.Input) async throws -> Operations.CreateSharedMemory.Output { try await client.send( input: input, - forOperation: Operations.GetJudgeModel.id, + forOperation: Operations.CreateSharedMemory.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/judge-model", + template: "/v1/memories", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetJudgeModel.Output.Ok.Body + let body: Operations.CreateSharedMemory.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22544,7 +25964,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.JudgeModel.self, + Components.Schemas.Memory.self, from: responseBody, transforming: { value in .json(value) @@ -22553,10 +25973,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetJudgeModel.Output.BadRequest.Body + let body: Operations.CreateSharedMemory.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22578,7 +25998,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetJudgeModel.Output.Unauthorized.Body + let body: Operations.CreateSharedMemory.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22600,7 +26020,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetJudgeModel.Output.NotFound.Body + let body: Operations.CreateSharedMemory.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22622,7 +26042,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetJudgeModel.Output.MethodNotAllowed.Body + let body: Operations.CreateSharedMemory.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22644,7 +26064,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetJudgeModel.Output.Conflict.Body + let body: Operations.CreateSharedMemory.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22666,7 +26086,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetJudgeModel.Output.ContentTooLarge.Body + let body: Operations.CreateSharedMemory.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22688,7 +26108,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetJudgeModel.Output.InternalServerError.Body + let body: Operations.CreateSharedMemory.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22710,7 +26130,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetJudgeModel.Output.ServiceUnavailable.Body + let body: Operations.CreateSharedMemory.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22742,20 +26162,22 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `PUT /v1/judge-model`. - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)`. - public func updateJudgeModel(_ input: Operations.UpdateJudgeModel.Input) async throws -> Operations.UpdateJudgeModel.Output { + /// - Remark: HTTP `PATCH /v1/memories/{id}`. + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)`. + public func updateSharedMemory(_ input: Operations.UpdateSharedMemory.Input) async throws -> Operations.UpdateSharedMemory.Output { try await client.send( input: input, - forOperation: Operations.UpdateJudgeModel.id, + forOperation: Operations.UpdateSharedMemory.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/judge-model", - parameters: [] + template: "/v1/memories/{}", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .patch ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -22777,7 +26199,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateJudgeModel.Output.Ok.Body + let body: Operations.UpdateSharedMemory.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22787,7 +26209,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.JudgeModel.self, + Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload?.self, from: responseBody, transforming: { value in .json(value) @@ -22799,7 +26221,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateJudgeModel.Output.BadRequest.Body + let body: Operations.UpdateSharedMemory.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22821,7 +26243,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateJudgeModel.Output.Unauthorized.Body + let body: Operations.UpdateSharedMemory.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22843,7 +26265,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateJudgeModel.Output.NotFound.Body + let body: Operations.UpdateSharedMemory.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22865,7 +26287,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateJudgeModel.Output.MethodNotAllowed.Body + let body: Operations.UpdateSharedMemory.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22887,7 +26309,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateJudgeModel.Output.Conflict.Body + let body: Operations.UpdateSharedMemory.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22909,7 +26331,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateJudgeModel.Output.ContentTooLarge.Body + let body: Operations.UpdateSharedMemory.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22931,7 +26353,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateJudgeModel.Output.InternalServerError.Body + let body: Operations.UpdateSharedMemory.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22953,7 +26375,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateJudgeModel.Output.ServiceUnavailable.Body + let body: Operations.UpdateSharedMemory.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -22985,20 +26407,22 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/mcp-servers`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)`. - public func listMcpServers(_ input: Operations.ListMcpServers.Input) async throws -> Operations.ListMcpServers.Output { + /// - Remark: HTTP `DELETE /v1/memories/{id}`. + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)`. + public func deleteSharedMemory(_ input: Operations.DeleteSharedMemory.Input) async throws -> Operations.DeleteSharedMemory.Output { try await client.send( input: input, - forOperation: Operations.ListMcpServers.id, + forOperation: Operations.DeleteSharedMemory.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/mcp-servers", - parameters: [] + template: "/v1/memories/{}", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -23009,31 +26433,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListMcpServers.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.McpServerStatus].self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListMcpServers.Output.BadRequest.Body + let body: Operations.DeleteSharedMemory.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23055,7 +26459,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListMcpServers.Output.Unauthorized.Body + let body: Operations.DeleteSharedMemory.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23077,7 +26481,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListMcpServers.Output.NotFound.Body + let body: Operations.DeleteSharedMemory.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23099,7 +26503,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListMcpServers.Output.MethodNotAllowed.Body + let body: Operations.DeleteSharedMemory.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23121,7 +26525,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListMcpServers.Output.Conflict.Body + let body: Operations.DeleteSharedMemory.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23143,7 +26547,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListMcpServers.Output.ContentTooLarge.Body + let body: Operations.DeleteSharedMemory.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23165,7 +26569,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListMcpServers.Output.InternalServerError.Body + let body: Operations.DeleteSharedMemory.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23187,7 +26591,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListMcpServers.Output.ServiceUnavailable.Body + let body: Operations.DeleteSharedMemory.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23219,42 +26623,33 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/mcp-servers`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)`. - public func createMcpServer(_ input: Operations.CreateMcpServer.Input) async throws -> Operations.CreateMcpServer.Output { + /// - Remark: HTTP `GET /v1/message-gateways`. + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)`. + public func messageGateways(_ input: Operations.MessageGateways.Input) async throws -> Operations.MessageGateways.Output { try await client.send( input: input, - forOperation: Operations.CreateMcpServer.id, + forOperation: Operations.MessageGateways.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/mcp-servers", + template: "/v1/message-gateways", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateMcpServer.Output.Created.Body + let body: Operations.MessageGateways.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23264,7 +26659,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.McpServer.self, + Operations.MessageGateways.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -23273,10 +26668,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateMcpServer.Output.BadRequest.Body + let body: Operations.MessageGateways.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23298,7 +26693,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateMcpServer.Output.Unauthorized.Body + let body: Operations.MessageGateways.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23320,7 +26715,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateMcpServer.Output.NotFound.Body + let body: Operations.MessageGateways.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23342,7 +26737,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateMcpServer.Output.MethodNotAllowed.Body + let body: Operations.MessageGateways.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23364,7 +26759,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateMcpServer.Output.Conflict.Body + let body: Operations.MessageGateways.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23386,7 +26781,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateMcpServer.Output.ContentTooLarge.Body + let body: Operations.MessageGateways.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23408,7 +26803,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateMcpServer.Output.InternalServerError.Body + let body: Operations.MessageGateways.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23430,7 +26825,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateMcpServer.Output.ServiceUnavailable.Body + let body: Operations.MessageGateways.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23462,22 +26857,22 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `PATCH /v1/mcp-servers/{id}`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)`. - public func updateMcpServer(_ input: Operations.UpdateMcpServer.Input) async throws -> Operations.UpdateMcpServer.Output { + /// - Remark: HTTP `PUT /v1/message-gateways/{id}`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)`. + public func updateMessageGateway(_ input: Operations.UpdateMessageGateway.Input) async throws -> Operations.UpdateMessageGateway.Output { try await client.send( input: input, - forOperation: Operations.UpdateMcpServer.id, + forOperation: Operations.UpdateMessageGateway.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/mcp-servers/{}", + template: "/v1/message-gateways/{}", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .patch + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -23499,7 +26894,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMcpServer.Output.Ok.Body + let body: Operations.UpdateMessageGateway.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23509,7 +26904,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.UpdateMcpServer.Output.Ok.Body.JsonPayload?.self, + Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -23521,7 +26916,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMcpServer.Output.BadRequest.Body + let body: Operations.UpdateMessageGateway.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23543,7 +26938,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMcpServer.Output.Unauthorized.Body + let body: Operations.UpdateMessageGateway.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23565,7 +26960,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMcpServer.Output.NotFound.Body + let body: Operations.UpdateMessageGateway.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23587,7 +26982,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMcpServer.Output.MethodNotAllowed.Body + let body: Operations.UpdateMessageGateway.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23609,7 +27004,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMcpServer.Output.Conflict.Body + let body: Operations.UpdateMessageGateway.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23631,7 +27026,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMcpServer.Output.ContentTooLarge.Body + let body: Operations.UpdateMessageGateway.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23653,7 +27048,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMcpServer.Output.InternalServerError.Body + let body: Operations.UpdateMessageGateway.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23675,7 +27070,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMcpServer.Output.ServiceUnavailable.Body + let body: Operations.UpdateMessageGateway.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23707,24 +27102,29 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `DELETE /v1/mcp-servers/{id}`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)`. - public func deleteMcpServer(_ input: Operations.DeleteMcpServer.Input) async throws -> Operations.DeleteMcpServer.Output { + /// - Remark: HTTP `GET /v1/models`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)`. + public func listModels(_ input: Operations.ListModels.Input) async throws -> Operations.ListModels.Output { try await client.send( input: input, - forOperation: Operations.DeleteMcpServer.id, + forOperation: Operations.ListModels.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/mcp-servers/{}", - parameters: [ - input.path.id - ] + template: "/v1/models", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "provider", + value: input.query.provider + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -23733,11 +27133,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ListModels.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.Model].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteMcpServer.Output.BadRequest.Body + let body: Operations.ListModels.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23759,7 +27179,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteMcpServer.Output.Unauthorized.Body + let body: Operations.ListModels.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23781,7 +27201,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteMcpServer.Output.NotFound.Body + let body: Operations.ListModels.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23803,7 +27223,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteMcpServer.Output.MethodNotAllowed.Body + let body: Operations.ListModels.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23825,7 +27245,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteMcpServer.Output.Conflict.Body + let body: Operations.ListModels.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23847,7 +27267,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteMcpServer.Output.ContentTooLarge.Body + let body: Operations.ListModels.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23869,7 +27289,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteMcpServer.Output.InternalServerError.Body + let body: Operations.ListModels.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23891,7 +27311,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteMcpServer.Output.ServiceUnavailable.Body + let body: Operations.ListModels.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23923,44 +27343,35 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/mcp-servers/{id}/oauth`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)`. - public func startMcpOAuth(_ input: Operations.StartMcpOAuth.Input) async throws -> Operations.StartMcpOAuth.Output { + /// Every password manager this server supports, whether it is connected, and which secrets read from it. + /// + /// - Remark: HTTP `GET /v1/password-managers`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)`. + public func listPasswordManagers(_ input: Operations.ListPasswordManagers.Input) async throws -> Operations.ListPasswordManagers.Output { try await client.send( input: input, - forOperation: Operations.StartMcpOAuth.id, + forOperation: Operations.ListPasswordManagers.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/mcp-servers/{}/oauth", - parameters: [ - input.path.id - ] + template: "/v1/password-managers", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartMcpOAuth.Output.Ok.Body + let body: Operations.ListPasswordManagers.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -23970,7 +27381,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.McpOAuthStart.self, + Components.Schemas.PasswordManagers.self, from: responseBody, transforming: { value in .json(value) @@ -23982,7 +27393,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartMcpOAuth.Output.BadRequest.Body + let body: Operations.ListPasswordManagers.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24004,7 +27415,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartMcpOAuth.Output.Unauthorized.Body + let body: Operations.ListPasswordManagers.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24026,7 +27437,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartMcpOAuth.Output.NotFound.Body + let body: Operations.ListPasswordManagers.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24048,7 +27459,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartMcpOAuth.Output.MethodNotAllowed.Body + let body: Operations.ListPasswordManagers.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24070,7 +27481,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartMcpOAuth.Output.Conflict.Body + let body: Operations.ListPasswordManagers.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24092,7 +27503,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartMcpOAuth.Output.ContentTooLarge.Body + let body: Operations.ListPasswordManagers.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24114,7 +27525,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartMcpOAuth.Output.InternalServerError.Body + let body: Operations.ListPasswordManagers.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24136,7 +27547,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartMcpOAuth.Output.ServiceUnavailable.Body + let body: Operations.ListPasswordManagers.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24168,35 +27579,46 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `DELETE /v1/mcp-servers/{id}/oauth`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)`. - public func signOutMcpOAuth(_ input: Operations.SignOutMcpOAuth.Input) async throws -> Operations.SignOutMcpOAuth.Output { + /// Signs in with the token to check it, then connects the password manager or replaces its token. A new token drops the values read with the old one. 400 when the password manager rejects the token; 503 when it can't be reached. + /// + /// - Remark: HTTP `PUT /v1/password-managers/{id}`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)`. + public func connectPasswordManager(_ input: Operations.ConnectPasswordManager.Input) async throws -> Operations.ConnectPasswordManager.Output { try await client.send( input: input, - forOperation: Operations.SignOutMcpOAuth.id, + forOperation: Operations.ConnectPasswordManager.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/mcp-servers/{}/oauth", + template: "/v1/password-managers/{}", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutMcpOAuth.Output.Ok.Body + let body: Operations.ConnectPasswordManager.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24206,7 +27628,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.McpServerStatus.self, + Components.Schemas.PasswordManager.self, from: responseBody, transforming: { value in .json(value) @@ -24218,7 +27640,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutMcpOAuth.Output.BadRequest.Body + let body: Operations.ConnectPasswordManager.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24240,7 +27662,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutMcpOAuth.Output.Unauthorized.Body + let body: Operations.ConnectPasswordManager.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24262,7 +27684,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutMcpOAuth.Output.NotFound.Body + let body: Operations.ConnectPasswordManager.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24284,7 +27706,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutMcpOAuth.Output.MethodNotAllowed.Body + let body: Operations.ConnectPasswordManager.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24306,7 +27728,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutMcpOAuth.Output.Conflict.Body + let body: Operations.ConnectPasswordManager.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24328,7 +27750,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutMcpOAuth.Output.ContentTooLarge.Body + let body: Operations.ConnectPasswordManager.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24350,7 +27772,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutMcpOAuth.Output.InternalServerError.Body + let body: Operations.ConnectPasswordManager.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24372,7 +27794,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SignOutMcpOAuth.Output.ServiceUnavailable.Body + let body: Operations.ConnectPasswordManager.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24404,66 +27826,39 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/mcp-servers/{id}/oauth/callback`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)`. - public func finishMcpOAuth(_ input: Operations.FinishMcpOAuth.Input) async throws -> Operations.FinishMcpOAuth.Output { + /// Disconnects the password manager and drops its token. 409 while any secret still reads from it; `usedBy` in the list names them. + /// + /// - Remark: HTTP `DELETE /v1/password-managers/{id}`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)`. + public func disconnectPasswordManager(_ input: Operations.DisconnectPasswordManager.Input) async throws -> Operations.DisconnectPasswordManager.Output { try await client.send( input: input, - forOperation: Operations.FinishMcpOAuth.id, + forOperation: Operations.DisconnectPasswordManager.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/mcp-servers/{}/oauth/callback", + template: "/v1/password-managers/{}", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.FinishMcpOAuth.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.McpServerStatus.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.FinishMcpOAuth.Output.BadRequest.Body + let body: Operations.DisconnectPasswordManager.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24485,7 +27880,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.FinishMcpOAuth.Output.Unauthorized.Body + let body: Operations.DisconnectPasswordManager.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24507,7 +27902,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.FinishMcpOAuth.Output.NotFound.Body + let body: Operations.DisconnectPasswordManager.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24529,7 +27924,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.FinishMcpOAuth.Output.MethodNotAllowed.Body + let body: Operations.DisconnectPasswordManager.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24551,7 +27946,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.FinishMcpOAuth.Output.Conflict.Body + let body: Operations.DisconnectPasswordManager.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24573,7 +27968,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.FinishMcpOAuth.Output.ContentTooLarge.Body + let body: Operations.DisconnectPasswordManager.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24595,7 +27990,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.FinishMcpOAuth.Output.InternalServerError.Body + let body: Operations.DisconnectPasswordManager.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24617,7 +28012,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.FinishMcpOAuth.Output.ServiceUnavailable.Body + let body: Operations.DisconnectPasswordManager.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24649,15 +28044,17 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/memories`. - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)`. - public func listSharedMemories(_ input: Operations.ListSharedMemories.Input) async throws -> Operations.ListSharedMemories.Output { + /// Each plugin that has settings, and whether each setting has a value. Values are never returned. + /// + /// - Remark: HTTP `GET /v1/plugin-settings`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)`. + public func listPluginSettings(_ input: Operations.ListPluginSettings.Input) async throws -> Operations.ListPluginSettings.Output { try await client.send( input: input, - forOperation: Operations.ListSharedMemories.id, + forOperation: Operations.ListPluginSettings.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/memories", + template: "/v1/plugin-settings", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( @@ -24675,7 +28072,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSharedMemories.Output.Ok.Body + let body: Operations.ListPluginSettings.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24685,7 +28082,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.Memory].self, + Components.Schemas.PluginSettings.self, from: responseBody, transforming: { value in .json(value) @@ -24697,7 +28094,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSharedMemories.Output.BadRequest.Body + let body: Operations.ListPluginSettings.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24719,7 +28116,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSharedMemories.Output.Unauthorized.Body + let body: Operations.ListPluginSettings.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24741,7 +28138,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSharedMemories.Output.NotFound.Body + let body: Operations.ListPluginSettings.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24763,7 +28160,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSharedMemories.Output.MethodNotAllowed.Body + let body: Operations.ListPluginSettings.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24785,7 +28182,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSharedMemories.Output.Conflict.Body + let body: Operations.ListPluginSettings.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24807,7 +28204,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSharedMemories.Output.ContentTooLarge.Body + let body: Operations.ListPluginSettings.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24829,7 +28226,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSharedMemories.Output.InternalServerError.Body + let body: Operations.ListPluginSettings.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24851,7 +28248,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSharedMemories.Output.ServiceUnavailable.Body + let body: Operations.ListPluginSettings.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24883,20 +28280,25 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/memories`. - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)`. - public func createSharedMemory(_ input: Operations.CreateSharedMemory.Input) async throws -> Operations.CreateSharedMemory.Output { + /// Sets a plugin setting to a `value` stored in Crumble, or to a `reference` read from a connected password manager, replacing the one before; send exactly one. A reference is checked by reading it once; 400 when it can't be read. 404 for a plugin or key the server doesn't have. + /// + /// - Remark: HTTP `PUT /v1/plugin-settings/{pluginId}/{key}`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)`. + public func setPluginSetting(_ input: Operations.SetPluginSetting.Input) async throws -> Operations.SetPluginSetting.Output { try await client.send( input: input, - forOperation: Operations.CreateSharedMemory.id, + forOperation: Operations.SetPluginSetting.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/memories", - parameters: [] + template: "/v1/plugin-settings/{}/{}", + parameters: [ + input.path.pluginId, + input.path.key + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -24916,9 +28318,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSharedMemory.Output.Created.Body + let body: Operations.SetPluginSetting.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24928,7 +28330,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Memory.self, + Components.Schemas.PluginSetting.self, from: responseBody, transforming: { value in .json(value) @@ -24937,10 +28339,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSharedMemory.Output.BadRequest.Body + let body: Operations.SetPluginSetting.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24962,7 +28364,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSharedMemory.Output.Unauthorized.Body + let body: Operations.SetPluginSetting.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -24984,7 +28386,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSharedMemory.Output.NotFound.Body + let body: Operations.SetPluginSetting.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25006,7 +28408,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSharedMemory.Output.MethodNotAllowed.Body + let body: Operations.SetPluginSetting.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25028,7 +28430,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSharedMemory.Output.Conflict.Body + let body: Operations.SetPluginSetting.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25050,7 +28452,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSharedMemory.Output.ContentTooLarge.Body + let body: Operations.SetPluginSetting.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25072,7 +28474,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSharedMemory.Output.InternalServerError.Body + let body: Operations.SetPluginSetting.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25094,7 +28496,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSharedMemory.Output.ServiceUnavailable.Body + let body: Operations.SetPluginSetting.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25126,44 +28528,38 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `PATCH /v1/memories/{id}`. - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)`. - public func updateSharedMemory(_ input: Operations.UpdateSharedMemory.Input) async throws -> Operations.UpdateSharedMemory.Output { + /// Removes a plugin setting's value. 404 for a plugin or key the server doesn't have. + /// + /// - Remark: HTTP `DELETE /v1/plugin-settings/{pluginId}/{key}`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)`. + public func deletePluginSetting(_ input: Operations.DeletePluginSetting.Input) async throws -> Operations.DeletePluginSetting.Output { try await client.send( input: input, - forOperation: Operations.UpdateSharedMemory.id, + forOperation: Operations.DeletePluginSetting.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/memories/{}", + template: "/v1/plugin-settings/{}/{}", parameters: [ - input.path.id + input.path.pluginId, + input.path.key ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .patch + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSharedMemory.Output.Ok.Body + let body: Operations.DeletePluginSetting.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25173,7 +28569,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload?.self, + Components.Schemas.PluginSetting.self, from: responseBody, transforming: { value in .json(value) @@ -25185,7 +28581,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSharedMemory.Output.BadRequest.Body + let body: Operations.DeletePluginSetting.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25207,7 +28603,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSharedMemory.Output.Unauthorized.Body + let body: Operations.DeletePluginSetting.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25229,7 +28625,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSharedMemory.Output.NotFound.Body + let body: Operations.DeletePluginSetting.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25251,7 +28647,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSharedMemory.Output.MethodNotAllowed.Body + let body: Operations.DeletePluginSetting.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25273,7 +28669,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSharedMemory.Output.Conflict.Body + let body: Operations.DeletePluginSetting.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25295,7 +28691,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSharedMemory.Output.ContentTooLarge.Body + let body: Operations.DeletePluginSetting.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25317,7 +28713,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSharedMemory.Output.InternalServerError.Body + let body: Operations.DeletePluginSetting.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25339,7 +28735,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSharedMemory.Output.ServiceUnavailable.Body + let body: Operations.DeletePluginSetting.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25371,22 +28767,22 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `DELETE /v1/memories/{id}`. - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)`. - public func deleteSharedMemory(_ input: Operations.DeleteSharedMemory.Input) async throws -> Operations.DeleteSharedMemory.Output { + /// - Remark: HTTP `GET /v1/provider-logins/{id}`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)`. + public func getProviderLogin(_ input: Operations.GetProviderLogin.Input) async throws -> Operations.GetProviderLogin.Output { try await client.send( input: input, - forOperation: Operations.DeleteSharedMemory.id, + forOperation: Operations.GetProviderLogin.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/memories/{}", + template: "/v1/provider-logins/{}", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -25397,11 +28793,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.GetProviderLogin.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ProviderLoginSession.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSharedMemory.Output.BadRequest.Body + let body: Operations.GetProviderLogin.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25423,7 +28839,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSharedMemory.Output.Unauthorized.Body + let body: Operations.GetProviderLogin.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25445,7 +28861,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSharedMemory.Output.NotFound.Body + let body: Operations.GetProviderLogin.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25467,7 +28883,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSharedMemory.Output.MethodNotAllowed.Body + let body: Operations.GetProviderLogin.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25489,7 +28905,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSharedMemory.Output.Conflict.Body + let body: Operations.GetProviderLogin.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25509,9 +28925,31 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .conflict(.init(body: body)) + case 410: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.GetProviderLogin.Output.Gone.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .gone(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSharedMemory.Output.ContentTooLarge.Body + let body: Operations.GetProviderLogin.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25533,7 +28971,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSharedMemory.Output.InternalServerError.Body + let body: Operations.GetProviderLogin.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25555,7 +28993,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSharedMemory.Output.ServiceUnavailable.Body + let body: Operations.GetProviderLogin.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25587,20 +29025,22 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/message-gateways`. - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)`. - public func messageGateways(_ input: Operations.MessageGateways.Input) async throws -> Operations.MessageGateways.Output { + /// - Remark: HTTP `DELETE /v1/provider-logins/{id}`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)`. + public func cancelProviderLogin(_ input: Operations.CancelProviderLogin.Input) async throws -> Operations.CancelProviderLogin.Output { try await client.send( input: input, - forOperation: Operations.MessageGateways.id, + forOperation: Operations.CancelProviderLogin.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/message-gateways", - parameters: [] + template: "/v1/provider-logins/{}", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -25613,7 +29053,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.MessageGateways.Output.Ok.Body + let body: Operations.CancelProviderLogin.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25623,7 +29063,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.MessageGateways.Output.Ok.Body.JsonPayload.self, + Components.Schemas.ProviderLoginSession.self, from: responseBody, transforming: { value in .json(value) @@ -25635,7 +29075,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.MessageGateways.Output.BadRequest.Body + let body: Operations.CancelProviderLogin.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25657,7 +29097,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.MessageGateways.Output.Unauthorized.Body + let body: Operations.CancelProviderLogin.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25679,7 +29119,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.MessageGateways.Output.NotFound.Body + let body: Operations.CancelProviderLogin.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25701,7 +29141,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.MessageGateways.Output.MethodNotAllowed.Body + let body: Operations.CancelProviderLogin.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25723,7 +29163,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.MessageGateways.Output.Conflict.Body + let body: Operations.CancelProviderLogin.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25743,9 +29183,31 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .conflict(.init(body: body)) + case 410: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.CancelProviderLogin.Output.Gone.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .gone(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.MessageGateways.Output.ContentTooLarge.Body + let body: Operations.CancelProviderLogin.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25767,7 +29229,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.MessageGateways.Output.InternalServerError.Body + let body: Operations.CancelProviderLogin.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25789,7 +29251,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.MessageGateways.Output.ServiceUnavailable.Body + let body: Operations.CancelProviderLogin.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25821,22 +29283,22 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `PUT /v1/message-gateways/{id}`. - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)`. - public func updateMessageGateway(_ input: Operations.UpdateMessageGateway.Input) async throws -> Operations.UpdateMessageGateway.Output { + /// - Remark: HTTP `POST /v1/provider-logins/{id}/responses`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)`. + public func answerProviderLogin(_ input: Operations.AnswerProviderLogin.Input) async throws -> Operations.AnswerProviderLogin.Output { try await client.send( input: input, - forOperation: Operations.UpdateMessageGateway.id, + forOperation: Operations.AnswerProviderLogin.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/message-gateways/{}", + template: "/v1/provider-logins/{}/responses", parameters: [ input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -25858,7 +29320,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMessageGateway.Output.Ok.Body + let body: Operations.AnswerProviderLogin.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25868,7 +29330,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.self, + Components.Schemas.ProviderLoginSession.self, from: responseBody, transforming: { value in .json(value) @@ -25880,7 +29342,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMessageGateway.Output.BadRequest.Body + let body: Operations.AnswerProviderLogin.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25902,7 +29364,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMessageGateway.Output.Unauthorized.Body + let body: Operations.AnswerProviderLogin.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25924,7 +29386,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMessageGateway.Output.NotFound.Body + let body: Operations.AnswerProviderLogin.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25946,7 +29408,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMessageGateway.Output.MethodNotAllowed.Body + let body: Operations.AnswerProviderLogin.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25968,7 +29430,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMessageGateway.Output.Conflict.Body + let body: Operations.AnswerProviderLogin.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -25988,9 +29450,31 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .conflict(.init(body: body)) + case 410: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.AnswerProviderLogin.Output.Gone.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .gone(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMessageGateway.Output.ContentTooLarge.Body + let body: Operations.AnswerProviderLogin.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26012,7 +29496,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMessageGateway.Output.InternalServerError.Body + let body: Operations.AnswerProviderLogin.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26034,7 +29518,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateMessageGateway.Output.ServiceUnavailable.Body + let body: Operations.AnswerProviderLogin.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26066,15 +29550,15 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/models`. - /// - Remark: Generated from `#/paths//v1/models/get(listModels)`. - public func listModels(_ input: Operations.ListModels.Input) async throws -> Operations.ListModels.Output { + /// - Remark: HTTP `GET /v1/providers`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)`. + public func listProviders(_ input: Operations.ListProviders.Input) async throws -> Operations.ListProviders.Output { try await client.send( input: input, - forOperation: Operations.ListModels.id, + forOperation: Operations.ListProviders.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/models", + template: "/v1/providers", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( @@ -26082,13 +29566,6 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "provider", - value: input.query.provider - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -26099,7 +29576,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListModels.Output.Ok.Body + let body: Operations.ListProviders.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26109,7 +29586,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.Model].self, + [Components.Schemas.Provider].self, from: responseBody, transforming: { value in .json(value) @@ -26121,7 +29598,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListModels.Output.BadRequest.Body + let body: Operations.ListProviders.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26143,7 +29620,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListModels.Output.Unauthorized.Body + let body: Operations.ListProviders.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26165,7 +29642,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListModels.Output.NotFound.Body + let body: Operations.ListProviders.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26187,7 +29664,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListModels.Output.MethodNotAllowed.Body + let body: Operations.ListProviders.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26209,7 +29686,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListModels.Output.Conflict.Body + let body: Operations.ListProviders.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26231,7 +29708,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListModels.Output.ContentTooLarge.Body + let body: Operations.ListProviders.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26253,7 +29730,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListModels.Output.InternalServerError.Body + let body: Operations.ListProviders.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26275,7 +29752,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListModels.Output.ServiceUnavailable.Body + let body: Operations.ListProviders.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26307,35 +29784,46 @@ public struct Client: APIProtocol { } ) } - /// Every password manager this server supports, whether it is connected, and which secrets read from it. + /// Saves the provider's API key, or a password manager reference to read it from. A reference is read once to check it; 400 when it can't be read, keeping the previous credential. /// - /// - Remark: HTTP `GET /v1/password-managers`. - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)`. - public func listPasswordManagers(_ input: Operations.ListPasswordManagers.Input) async throws -> Operations.ListPasswordManagers.Output { + /// - Remark: HTTP `PUT /v1/providers/{provider}`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)`. + public func putProviderKey(_ input: Operations.PutProviderKey.Input) async throws -> Operations.PutProviderKey.Output { try await client.send( input: input, - forOperation: Operations.ListPasswordManagers.id, + forOperation: Operations.PutProviderKey.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/password-managers", - parameters: [] + template: "/v1/providers/{}", + parameters: [ + input.path.provider + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPasswordManagers.Output.Ok.Body + let body: Operations.PutProviderKey.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26345,7 +29833,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.PasswordManagers.self, + Components.Schemas.ProviderConfigured.self, from: responseBody, transforming: { value in .json(value) @@ -26357,7 +29845,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPasswordManagers.Output.BadRequest.Body + let body: Operations.PutProviderKey.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26379,7 +29867,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPasswordManagers.Output.Unauthorized.Body + let body: Operations.PutProviderKey.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26401,7 +29889,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPasswordManagers.Output.NotFound.Body + let body: Operations.PutProviderKey.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26423,7 +29911,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPasswordManagers.Output.MethodNotAllowed.Body + let body: Operations.PutProviderKey.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26445,7 +29933,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPasswordManagers.Output.Conflict.Body + let body: Operations.PutProviderKey.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26467,7 +29955,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPasswordManagers.Output.ContentTooLarge.Body + let body: Operations.PutProviderKey.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26489,7 +29977,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPasswordManagers.Output.InternalServerError.Body + let body: Operations.PutProviderKey.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26511,7 +29999,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPasswordManagers.Output.ServiceUnavailable.Body + let body: Operations.PutProviderKey.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26543,68 +30031,39 @@ public struct Client: APIProtocol { } ) } - /// Signs in with the token to check it, then connects the password manager or replaces its token. A new token drops the values read with the old one. 400 when the password manager rejects the token; 503 when it can't be reached. + /// Remove the provider's saved credential. 409 for a provider that signs in outside Crumble; the message names its sign-out command. /// - /// - Remark: HTTP `PUT /v1/password-managers/{id}`. - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)`. - public func connectPasswordManager(_ input: Operations.ConnectPasswordManager.Input) async throws -> Operations.ConnectPasswordManager.Output { + /// - Remark: HTTP `DELETE /v1/providers/{provider}`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)`. + public func deleteProviderKey(_ input: Operations.DeleteProviderKey.Input) async throws -> Operations.DeleteProviderKey.Output { try await client.send( input: input, - forOperation: Operations.ConnectPasswordManager.id, + forOperation: Operations.DeleteProviderKey.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/password-managers/{}", + template: "/v1/providers/{}", parameters: [ - input.path.id + input.path.provider ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectPasswordManager.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.PasswordManager.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectPasswordManager.Output.BadRequest.Body + let body: Operations.DeleteProviderKey.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26626,7 +30085,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectPasswordManager.Output.Unauthorized.Body + let body: Operations.DeleteProviderKey.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26648,7 +30107,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectPasswordManager.Output.NotFound.Body + let body: Operations.DeleteProviderKey.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26670,7 +30129,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectPasswordManager.Output.MethodNotAllowed.Body + let body: Operations.DeleteProviderKey.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26692,7 +30151,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectPasswordManager.Output.Conflict.Body + let body: Operations.DeleteProviderKey.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26714,7 +30173,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectPasswordManager.Output.ContentTooLarge.Body + let body: Operations.DeleteProviderKey.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26736,7 +30195,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectPasswordManager.Output.InternalServerError.Body + let body: Operations.DeleteProviderKey.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26758,7 +30217,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ConnectPasswordManager.Output.ServiceUnavailable.Body + let body: Operations.DeleteProviderKey.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26790,39 +30249,66 @@ public struct Client: APIProtocol { } ) } - /// Disconnects the password manager and drops its token. 409 while any secret still reads from it; `usedBy` in the list names them. - /// - /// - Remark: HTTP `DELETE /v1/password-managers/{id}`. - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)`. - public func disconnectPasswordManager(_ input: Operations.DisconnectPasswordManager.Input) async throws -> Operations.DisconnectPasswordManager.Output { + /// - Remark: HTTP `POST /v1/providers/{provider}/login`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)`. + public func startProviderLogin(_ input: Operations.StartProviderLogin.Input) async throws -> Operations.StartProviderLogin.Output { try await client.send( input: input, - forOperation: Operations.DisconnectPasswordManager.id, + forOperation: Operations.StartProviderLogin.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/password-managers/{}", + template: "/v1/providers/{}/login", parameters: [ - input.path.id + input.path.provider ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 202: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.StartProviderLogin.Output.Accepted.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ProviderLoginSession.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .accepted(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DisconnectPasswordManager.Output.BadRequest.Body + let body: Operations.StartProviderLogin.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26844,7 +30330,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DisconnectPasswordManager.Output.Unauthorized.Body + let body: Operations.StartProviderLogin.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26866,7 +30352,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DisconnectPasswordManager.Output.NotFound.Body + let body: Operations.StartProviderLogin.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26888,7 +30374,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DisconnectPasswordManager.Output.MethodNotAllowed.Body + let body: Operations.StartProviderLogin.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26910,7 +30396,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DisconnectPasswordManager.Output.Conflict.Body + let body: Operations.StartProviderLogin.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26932,7 +30418,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DisconnectPasswordManager.Output.ContentTooLarge.Body + let body: Operations.StartProviderLogin.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26954,7 +30440,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DisconnectPasswordManager.Output.InternalServerError.Body + let body: Operations.StartProviderLogin.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -26976,7 +30462,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DisconnectPasswordManager.Output.ServiceUnavailable.Body + let body: Operations.StartProviderLogin.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27008,17 +30494,15 @@ public struct Client: APIProtocol { } ) } - /// Each plugin that has settings, and whether each setting has a value. Values are never returned. - /// - /// - Remark: HTTP `GET /v1/plugin-settings`. - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)`. - public func listPluginSettings(_ input: Operations.ListPluginSettings.Input) async throws -> Operations.ListPluginSettings.Output { + /// - Remark: HTTP `GET /v1/push`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)`. + public func getPushStatus(_ input: Operations.GetPushStatus.Input) async throws -> Operations.GetPushStatus.Output { try await client.send( input: input, - forOperation: Operations.ListPluginSettings.id, + forOperation: Operations.GetPushStatus.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/plugin-settings", + template: "/v1/push", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( @@ -27036,7 +30520,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPluginSettings.Output.Ok.Body + let body: Operations.GetPushStatus.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27046,7 +30530,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.PluginSettings.self, + Components.Schemas.PushStatus.self, from: responseBody, transforming: { value in .json(value) @@ -27058,7 +30542,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPluginSettings.Output.BadRequest.Body + let body: Operations.GetPushStatus.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27080,7 +30564,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPluginSettings.Output.Unauthorized.Body + let body: Operations.GetPushStatus.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27102,7 +30586,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPluginSettings.Output.NotFound.Body + let body: Operations.GetPushStatus.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27124,7 +30608,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPluginSettings.Output.MethodNotAllowed.Body + let body: Operations.GetPushStatus.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27146,7 +30630,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPluginSettings.Output.Conflict.Body + let body: Operations.GetPushStatus.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27168,7 +30652,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPluginSettings.Output.ContentTooLarge.Body + let body: Operations.GetPushStatus.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27190,7 +30674,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPluginSettings.Output.InternalServerError.Body + let body: Operations.GetPushStatus.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27212,7 +30696,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListPluginSettings.Output.ServiceUnavailable.Body + let body: Operations.GetPushStatus.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27244,20 +30728,17 @@ public struct Client: APIProtocol { } ) } - /// Sets a plugin setting to a `value` stored in Crumble, or to a `reference` read from a connected password manager, replacing the one before; send exactly one. A reference is checked by reading it once; 400 when it can't be read. 404 for a plugin or key the server doesn't have. - /// - /// - Remark: HTTP `PUT /v1/plugin-settings/{pluginId}/{key}`. - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)`. - public func setPluginSetting(_ input: Operations.SetPluginSetting.Input) async throws -> Operations.SetPluginSetting.Output { + /// - Remark: HTTP `PUT /v1/push/devices/{installationId}`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)`. + public func putPushDevice(_ input: Operations.PutPushDevice.Input) async throws -> Operations.PutPushDevice.Output { try await client.send( input: input, - forOperation: Operations.SetPluginSetting.id, + forOperation: Operations.PutPushDevice.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/plugin-settings/{}/{}", + template: "/v1/push/devices/{}", parameters: [ - input.path.pluginId, - input.path.key + input.path.installationId ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -27284,7 +30765,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetPluginSetting.Output.Ok.Body + let body: Operations.PutPushDevice.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27294,7 +30775,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.PluginSetting.self, + Components.Schemas.PushDeviceRegistration.self, from: responseBody, transforming: { value in .json(value) @@ -27306,7 +30787,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetPluginSetting.Output.BadRequest.Body + let body: Operations.PutPushDevice.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27328,7 +30809,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetPluginSetting.Output.Unauthorized.Body + let body: Operations.PutPushDevice.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27350,7 +30831,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetPluginSetting.Output.NotFound.Body + let body: Operations.PutPushDevice.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27372,7 +30853,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetPluginSetting.Output.MethodNotAllowed.Body + let body: Operations.PutPushDevice.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27394,7 +30875,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetPluginSetting.Output.Conflict.Body + let body: Operations.PutPushDevice.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27416,7 +30897,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetPluginSetting.Output.ContentTooLarge.Body + let body: Operations.PutPushDevice.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27438,7 +30919,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetPluginSetting.Output.InternalServerError.Body + let body: Operations.PutPushDevice.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27460,7 +30941,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.SetPluginSetting.Output.ServiceUnavailable.Body + let body: Operations.PutPushDevice.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27492,20 +30973,17 @@ public struct Client: APIProtocol { } ) } - /// Removes a plugin setting's value. 404 for a plugin or key the server doesn't have. - /// - /// - Remark: HTTP `DELETE /v1/plugin-settings/{pluginId}/{key}`. - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)`. - public func deletePluginSetting(_ input: Operations.DeletePluginSetting.Input) async throws -> Operations.DeletePluginSetting.Output { + /// - Remark: HTTP `DELETE /v1/push/devices/{installationId}`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)`. + public func deletePushDevice(_ input: Operations.DeletePushDevice.Input) async throws -> Operations.DeletePushDevice.Output { try await client.send( input: input, - forOperation: Operations.DeletePluginSetting.id, + forOperation: Operations.DeletePushDevice.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/plugin-settings/{}/{}", + template: "/v1/push/devices/{}", parameters: [ - input.path.pluginId, - input.path.key + input.path.installationId ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -27521,31 +30999,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePluginSetting.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.PluginSetting.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePluginSetting.Output.BadRequest.Body + let body: Operations.DeletePushDevice.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27567,7 +31025,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePluginSetting.Output.Unauthorized.Body + let body: Operations.DeletePushDevice.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27589,7 +31047,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePluginSetting.Output.NotFound.Body + let body: Operations.DeletePushDevice.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27611,7 +31069,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePluginSetting.Output.MethodNotAllowed.Body + let body: Operations.DeletePushDevice.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27633,7 +31091,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePluginSetting.Output.Conflict.Body + let body: Operations.DeletePushDevice.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27655,7 +31113,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePluginSetting.Output.ContentTooLarge.Body + let body: Operations.DeletePushDevice.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27677,7 +31135,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePluginSetting.Output.InternalServerError.Body + let body: Operations.DeletePushDevice.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27699,7 +31157,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePluginSetting.Output.ServiceUnavailable.Body + let body: Operations.DeletePushDevice.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27731,57 +31189,46 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/provider-logins/{id}`. - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)`. - public func getProviderLogin(_ input: Operations.GetProviderLogin.Input) async throws -> Operations.GetProviderLogin.Output { + /// - Remark: HTTP `PUT /v1/push/devices/{installationId}/presence`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)`. + public func putPushPresence(_ input: Operations.PutPushPresence.Input) async throws -> Operations.PutPushPresence.Output { try await client.send( input: input, - forOperation: Operations.GetProviderLogin.id, + forOperation: Operations.PutPushPresence.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/provider-logins/{}", + template: "/v1/push/devices/{}/presence", parameters: [ - input.path.id + input.path.installationId ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetProviderLogin.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ProviderLoginSession.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetProviderLogin.Output.BadRequest.Body + let body: Operations.PutPushPresence.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27803,7 +31250,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetProviderLogin.Output.Unauthorized.Body + let body: Operations.PutPushPresence.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27825,7 +31272,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetProviderLogin.Output.NotFound.Body + let body: Operations.PutPushPresence.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27847,7 +31294,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetProviderLogin.Output.MethodNotAllowed.Body + let body: Operations.PutPushPresence.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27869,7 +31316,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetProviderLogin.Output.Conflict.Body + let body: Operations.PutPushPresence.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27889,31 +31336,9 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .conflict(.init(body: body)) - case 410: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetProviderLogin.Output.Gone.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas._Error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .gone(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetProviderLogin.Output.ContentTooLarge.Body + let body: Operations.PutPushPresence.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27935,7 +31360,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetProviderLogin.Output.InternalServerError.Body + let body: Operations.PutPushPresence.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27957,7 +31382,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetProviderLogin.Output.ServiceUnavailable.Body + let body: Operations.PutPushPresence.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -27989,24 +31414,29 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `DELETE /v1/provider-logins/{id}`. - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)`. - public func cancelProviderLogin(_ input: Operations.CancelProviderLogin.Input) async throws -> Operations.CancelProviderLogin.Output { + /// - Remark: HTTP `GET /v1/schedules`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)`. + public func listSchedules(_ input: Operations.ListSchedules.Input) async throws -> Operations.ListSchedules.Output { try await client.send( input: input, - forOperation: Operations.CancelProviderLogin.id, + forOperation: Operations.ListSchedules.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/provider-logins/{}", - parameters: [ - input.path.id - ] + template: "/v1/schedules", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "agentId", + value: input.query.agentId + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -28017,7 +31447,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CancelProviderLogin.Output.Ok.Body + let body: Operations.ListSchedules.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28027,7 +31457,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ProviderLoginSession.self, + [Components.Schemas.Schedule].self, from: responseBody, transforming: { value in .json(value) @@ -28039,7 +31469,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CancelProviderLogin.Output.BadRequest.Body + let body: Operations.ListSchedules.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28061,7 +31491,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CancelProviderLogin.Output.Unauthorized.Body + let body: Operations.ListSchedules.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28083,7 +31513,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CancelProviderLogin.Output.NotFound.Body + let body: Operations.ListSchedules.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28105,7 +31535,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CancelProviderLogin.Output.MethodNotAllowed.Body + let body: Operations.ListSchedules.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28127,7 +31557,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CancelProviderLogin.Output.Conflict.Body + let body: Operations.ListSchedules.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28147,31 +31577,9 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .conflict(.init(body: body)) - case 410: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CancelProviderLogin.Output.Gone.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas._Error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .gone(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CancelProviderLogin.Output.ContentTooLarge.Body + let body: Operations.ListSchedules.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28193,7 +31601,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CancelProviderLogin.Output.InternalServerError.Body + let body: Operations.ListSchedules.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28215,7 +31623,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CancelProviderLogin.Output.ServiceUnavailable.Body + let body: Operations.ListSchedules.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28247,18 +31655,16 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/provider-logins/{id}/responses`. - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)`. - public func answerProviderLogin(_ input: Operations.AnswerProviderLogin.Input) async throws -> Operations.AnswerProviderLogin.Output { + /// - Remark: HTTP `POST /v1/schedules`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)`. + public func createSchedule(_ input: Operations.CreateSchedule.Input) async throws -> Operations.CreateSchedule.Output { try await client.send( input: input, - forOperation: Operations.AnswerProviderLogin.id, + forOperation: Operations.CreateSchedule.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/provider-logins/{}/responses", - parameters: [ - input.path.id - ] + template: "/v1/schedules", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, @@ -28282,9 +31688,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerProviderLogin.Output.Ok.Body + let body: Operations.CreateSchedule.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28294,7 +31700,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ProviderLoginSession.self, + Components.Schemas.Schedule.self, from: responseBody, transforming: { value in .json(value) @@ -28303,10 +31709,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerProviderLogin.Output.BadRequest.Body + let body: Operations.CreateSchedule.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28328,7 +31734,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerProviderLogin.Output.Unauthorized.Body + let body: Operations.CreateSchedule.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28348,9 +31754,9 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .unauthorized(.init(body: body)) - case 404: + case 403: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerProviderLogin.Output.NotFound.Body + let body: Operations.CreateSchedule.Output.Forbidden.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28369,10 +31775,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .notFound(.init(body: body)) - case 405: + return .forbidden(.init(body: body)) + case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerProviderLogin.Output.MethodNotAllowed.Body + let body: Operations.CreateSchedule.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28391,10 +31797,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .methodNotAllowed(.init(body: body)) - case 409: + return .notFound(.init(body: body)) + case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerProviderLogin.Output.Conflict.Body + let body: Operations.CreateSchedule.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28413,10 +31819,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .conflict(.init(body: body)) - case 410: + return .methodNotAllowed(.init(body: body)) + case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerProviderLogin.Output.Gone.Body + let body: Operations.CreateSchedule.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28435,10 +31841,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .gone(.init(body: body)) + return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerProviderLogin.Output.ContentTooLarge.Body + let body: Operations.CreateSchedule.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28460,7 +31866,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerProviderLogin.Output.InternalServerError.Body + let body: Operations.CreateSchedule.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28482,7 +31888,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AnswerProviderLogin.Output.ServiceUnavailable.Body + let body: Operations.CreateSchedule.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28514,33 +31920,44 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/providers`. - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)`. - public func listProviders(_ input: Operations.ListProviders.Input) async throws -> Operations.ListProviders.Output { + /// - Remark: HTTP `PATCH /v1/schedules/{id}`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)`. + public func updateSchedule(_ input: Operations.UpdateSchedule.Input) async throws -> Operations.UpdateSchedule.Output { try await client.send( input: input, - forOperation: Operations.ListProviders.id, + forOperation: Operations.UpdateSchedule.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/providers", - parameters: [] + template: "/v1/schedules/{}", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .patch ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListProviders.Output.Ok.Body + let body: Operations.UpdateSchedule.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28550,7 +31967,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.Provider].self, + Operations.UpdateSchedule.Output.Ok.Body.JsonPayload?.self, from: responseBody, transforming: { value in .json(value) @@ -28562,7 +31979,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListProviders.Output.BadRequest.Body + let body: Operations.UpdateSchedule.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28584,7 +32001,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListProviders.Output.Unauthorized.Body + let body: Operations.UpdateSchedule.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28604,9 +32021,31 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.UpdateSchedule.Output.Forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListProviders.Output.NotFound.Body + let body: Operations.UpdateSchedule.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28628,7 +32067,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListProviders.Output.MethodNotAllowed.Body + let body: Operations.UpdateSchedule.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28650,7 +32089,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListProviders.Output.Conflict.Body + let body: Operations.UpdateSchedule.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28672,7 +32111,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListProviders.Output.ContentTooLarge.Body + let body: Operations.UpdateSchedule.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28694,7 +32133,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListProviders.Output.InternalServerError.Body + let body: Operations.UpdateSchedule.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28716,7 +32155,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListProviders.Output.ServiceUnavailable.Body + let body: Operations.UpdateSchedule.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28748,68 +32187,37 @@ public struct Client: APIProtocol { } ) } - /// Saves the provider's API key, or a password manager reference to read it from. A reference is read once to check it; 400 when it can't be read, keeping the previous credential. - /// - /// - Remark: HTTP `PUT /v1/providers/{provider}`. - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)`. - public func putProviderKey(_ input: Operations.PutProviderKey.Input) async throws -> Operations.PutProviderKey.Output { + /// - Remark: HTTP `DELETE /v1/schedules/{id}`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)`. + public func deleteSchedule(_ input: Operations.DeleteSchedule.Input) async throws -> Operations.DeleteSchedule.Output { try await client.send( input: input, - forOperation: Operations.PutProviderKey.id, + forOperation: Operations.DeleteSchedule.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/providers/{}", + template: "/v1/schedules/{}", parameters: [ - input.path.provider + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutProviderKey.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ProviderConfigured.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) + case 204: + return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutProviderKey.Output.BadRequest.Body + let body: Operations.DeleteSchedule.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28831,7 +32239,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutProviderKey.Output.Unauthorized.Body + let body: Operations.DeleteSchedule.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28853,7 +32261,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutProviderKey.Output.NotFound.Body + let body: Operations.DeleteSchedule.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28875,7 +32283,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutProviderKey.Output.MethodNotAllowed.Body + let body: Operations.DeleteSchedule.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28897,7 +32305,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutProviderKey.Output.Conflict.Body + let body: Operations.DeleteSchedule.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28919,7 +32327,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutProviderKey.Output.ContentTooLarge.Body + let body: Operations.DeleteSchedule.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28941,7 +32349,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutProviderKey.Output.InternalServerError.Body + let body: Operations.DeleteSchedule.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28963,7 +32371,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutProviderKey.Output.ServiceUnavailable.Body + let body: Operations.DeleteSchedule.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -28995,24 +32403,22 @@ public struct Client: APIProtocol { } ) } - /// Remove the provider's saved credential. 409 for a provider that signs in outside Crumble; the message names its sign-out command. - /// - /// - Remark: HTTP `DELETE /v1/providers/{provider}`. - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)`. - public func deleteProviderKey(_ input: Operations.DeleteProviderKey.Input) async throws -> Operations.DeleteProviderKey.Output { + /// - Remark: HTTP `POST /v1/schedules/{id}/run`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)`. + public func runSchedule(_ input: Operations.RunSchedule.Input) async throws -> Operations.RunSchedule.Output { try await client.send( input: input, - forOperation: Operations.DeleteProviderKey.id, + forOperation: Operations.RunSchedule.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/providers/{}", + template: "/v1/schedules/{}/run", parameters: [ - input.path.provider + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -29023,11 +32429,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 202: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.RunSchedule.Output.Accepted.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ScheduleRun.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .accepted(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteProviderKey.Output.BadRequest.Body + let body: Operations.RunSchedule.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29049,7 +32475,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteProviderKey.Output.Unauthorized.Body + let body: Operations.RunSchedule.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29071,7 +32497,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteProviderKey.Output.NotFound.Body + let body: Operations.RunSchedule.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29093,7 +32519,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteProviderKey.Output.MethodNotAllowed.Body + let body: Operations.RunSchedule.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29115,7 +32541,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteProviderKey.Output.Conflict.Body + let body: Operations.RunSchedule.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29137,7 +32563,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteProviderKey.Output.ContentTooLarge.Body + let body: Operations.RunSchedule.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29159,7 +32585,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteProviderKey.Output.InternalServerError.Body + let body: Operations.RunSchedule.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29181,7 +32607,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteProviderKey.Output.ServiceUnavailable.Body + let body: Operations.RunSchedule.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29213,44 +32639,51 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/providers/{provider}/login`. - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)`. - public func startProviderLogin(_ input: Operations.StartProviderLogin.Input) async throws -> Operations.StartProviderLogin.Output { + /// Script task runs from the last 90 days, newest first. Page with `before` set to the last run's ID. An unknown ID returns an empty list. + /// + /// - Remark: HTTP `GET /v1/schedules/{id}/runs`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)`. + public func listScriptRuns(_ input: Operations.ListScriptRuns.Input) async throws -> Operations.ListScriptRuns.Output { try await client.send( input: input, - forOperation: Operations.StartProviderLogin.id, + forOperation: Operations.ListScriptRuns.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/providers/{}/login", + template: "/v1/schedules/{}/runs", parameters: [ - input.path.provider + input.path.id ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 202: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartProviderLogin.Output.Accepted.Body + let body: Operations.ListScriptRuns.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29260,7 +32693,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ProviderLoginSession.self, + [Components.Schemas.ScriptRun].self, from: responseBody, transforming: { value in .json(value) @@ -29269,10 +32702,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .accepted(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartProviderLogin.Output.BadRequest.Body + let body: Operations.ListScriptRuns.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29294,7 +32727,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartProviderLogin.Output.Unauthorized.Body + let body: Operations.ListScriptRuns.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29316,7 +32749,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartProviderLogin.Output.NotFound.Body + let body: Operations.ListScriptRuns.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29338,7 +32771,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartProviderLogin.Output.MethodNotAllowed.Body + let body: Operations.ListScriptRuns.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29360,7 +32793,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartProviderLogin.Output.Conflict.Body + let body: Operations.ListScriptRuns.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29382,7 +32815,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartProviderLogin.Output.ContentTooLarge.Body + let body: Operations.ListScriptRuns.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29404,7 +32837,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartProviderLogin.Output.InternalServerError.Body + let body: Operations.ListScriptRuns.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29426,7 +32859,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.StartProviderLogin.Output.ServiceUnavailable.Body + let body: Operations.ListScriptRuns.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29458,15 +32891,15 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/push`. - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)`. - public func getPushStatus(_ input: Operations.GetPushStatus.Input) async throws -> Operations.GetPushStatus.Output { + /// - Remark: HTTP `GET /v1/skills`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)`. + public func listSkills(_ input: Operations.ListSkills.Input) async throws -> Operations.ListSkills.Output { try await client.send( input: input, - forOperation: Operations.GetPushStatus.id, + forOperation: Operations.ListSkills.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/push", + template: "/v1/skills", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( @@ -29484,7 +32917,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPushStatus.Output.Ok.Body + let body: Operations.ListSkills.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29494,7 +32927,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.PushStatus.self, + [Components.Schemas.ListedSkill].self, from: responseBody, transforming: { value in .json(value) @@ -29506,7 +32939,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPushStatus.Output.BadRequest.Body + let body: Operations.ListSkills.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29528,7 +32961,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPushStatus.Output.Unauthorized.Body + let body: Operations.ListSkills.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29550,7 +32983,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPushStatus.Output.NotFound.Body + let body: Operations.ListSkills.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29572,7 +33005,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPushStatus.Output.MethodNotAllowed.Body + let body: Operations.ListSkills.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29594,7 +33027,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPushStatus.Output.Conflict.Body + let body: Operations.ListSkills.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29616,7 +33049,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPushStatus.Output.ContentTooLarge.Body + let body: Operations.ListSkills.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29638,7 +33071,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPushStatus.Output.InternalServerError.Body + let body: Operations.ListSkills.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29660,7 +33093,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPushStatus.Output.ServiceUnavailable.Body + let body: Operations.ListSkills.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29692,22 +33125,20 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `PUT /v1/push/devices/{installationId}`. - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)`. - public func putPushDevice(_ input: Operations.PutPushDevice.Input) async throws -> Operations.PutPushDevice.Output { + /// - Remark: HTTP `POST /v1/skills`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)`. + public func createSkill(_ input: Operations.CreateSkill.Input) async throws -> Operations.CreateSkill.Output { try await client.send( input: input, - forOperation: Operations.PutPushDevice.id, + forOperation: Operations.CreateSkill.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/push/devices/{}", - parameters: [ - input.path.installationId - ] + template: "/v1/skills", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -29727,9 +33158,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushDevice.Output.Ok.Body + let body: Operations.CreateSkill.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29739,7 +33170,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.PushDeviceRegistration.self, + Components.Schemas.Skill.self, from: responseBody, transforming: { value in .json(value) @@ -29748,10 +33179,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushDevice.Output.BadRequest.Body + let body: Operations.CreateSkill.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29773,7 +33204,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushDevice.Output.Unauthorized.Body + let body: Operations.CreateSkill.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29795,7 +33226,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushDevice.Output.NotFound.Body + let body: Operations.CreateSkill.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29817,7 +33248,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushDevice.Output.MethodNotAllowed.Body + let body: Operations.CreateSkill.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29839,7 +33270,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushDevice.Output.Conflict.Body + let body: Operations.CreateSkill.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29861,7 +33292,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushDevice.Output.ContentTooLarge.Body + let body: Operations.CreateSkill.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29883,7 +33314,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushDevice.Output.InternalServerError.Body + let body: Operations.CreateSkill.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29905,7 +33336,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushDevice.Output.ServiceUnavailable.Body + let body: Operations.CreateSkill.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29937,37 +33368,66 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `DELETE /v1/push/devices/{installationId}`. - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)`. - public func deletePushDevice(_ input: Operations.DeletePushDevice.Input) async throws -> Operations.DeletePushDevice.Output { + /// Lists the skills in a public GitHub repository: every folder with a SKILL.md, and whether each can be installed. + /// + /// - Remark: HTTP `POST /v1/skills/github/browse`. + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)`. + public func browseSkillRepository(_ input: Operations.BrowseSkillRepository.Input) async throws -> Operations.BrowseSkillRepository.Output { try await client.send( input: input, - forOperation: Operations.DeletePushDevice.id, + forOperation: Operations.BrowseSkillRepository.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/push/devices/{}", - parameters: [ - input.path.installationId - ] + template: "/v1/skills/github/browse", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BrowseSkillRepository.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.SkillListing.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePushDevice.Output.BadRequest.Body + let body: Operations.BrowseSkillRepository.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -29989,7 +33449,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePushDevice.Output.Unauthorized.Body + let body: Operations.BrowseSkillRepository.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30011,7 +33471,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePushDevice.Output.NotFound.Body + let body: Operations.BrowseSkillRepository.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30033,7 +33493,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePushDevice.Output.MethodNotAllowed.Body + let body: Operations.BrowseSkillRepository.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30055,7 +33515,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePushDevice.Output.Conflict.Body + let body: Operations.BrowseSkillRepository.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30077,7 +33537,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePushDevice.Output.ContentTooLarge.Body + let body: Operations.BrowseSkillRepository.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30099,7 +33559,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePushDevice.Output.InternalServerError.Body + let body: Operations.BrowseSkillRepository.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30121,7 +33581,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeletePushDevice.Output.ServiceUnavailable.Body + let body: Operations.BrowseSkillRepository.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30153,22 +33613,22 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `PUT /v1/push/devices/{installationId}/presence`. - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)`. - public func putPushPresence(_ input: Operations.PutPushPresence.Input) async throws -> Operations.PutPushPresence.Output { + /// Installs skills from one commit of a public GitHub repository as read-only shared skills, all or none, and turns them on for `botIds`. + /// + /// - Remark: HTTP `POST /v1/skills/github/install`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)`. + public func installSkills(_ input: Operations.InstallSkills.Input) async throws -> Operations.InstallSkills.Output { try await client.send( input: input, - forOperation: Operations.PutPushPresence.id, + forOperation: Operations.InstallSkills.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/push/devices/{}/presence", - parameters: [ - input.path.installationId - ] + template: "/v1/skills/github/install", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -30188,11 +33648,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.InstallSkills.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.SkillPackage].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushPresence.Output.BadRequest.Body + let body: Operations.InstallSkills.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30214,7 +33694,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushPresence.Output.Unauthorized.Body + let body: Operations.InstallSkills.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30236,7 +33716,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushPresence.Output.NotFound.Body + let body: Operations.InstallSkills.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30258,7 +33738,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushPresence.Output.MethodNotAllowed.Body + let body: Operations.InstallSkills.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30280,7 +33760,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushPresence.Output.Conflict.Body + let body: Operations.InstallSkills.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30302,7 +33782,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushPresence.Output.ContentTooLarge.Body + let body: Operations.InstallSkills.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30324,7 +33804,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushPresence.Output.InternalServerError.Body + let body: Operations.InstallSkills.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30346,7 +33826,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.PutPushPresence.Output.ServiceUnavailable.Body + let body: Operations.InstallSkills.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30378,29 +33858,24 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/schedules`. - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)`. - public func listSchedules(_ input: Operations.ListSchedules.Input) async throws -> Operations.ListSchedules.Output { + /// Checks every installed skill's branch for changes now. The server also checks daily; GET /v1/skills shows the results as `update`. + /// + /// - Remark: HTTP `POST /v1/skills/updates/check`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)`. + public func checkSkillUpdates(_ input: Operations.CheckSkillUpdates.Input) async throws -> Operations.CheckSkillUpdates.Output { try await client.send( input: input, - forOperation: Operations.ListSchedules.id, + forOperation: Operations.CheckSkillUpdates.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/schedules", + template: "/v1/skills/updates/check", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "agentId", - value: input.query.agentId - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -30411,7 +33886,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSchedules.Output.Ok.Body + let body: Operations.CheckSkillUpdates.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30421,7 +33896,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.Schedule].self, + Components.Schemas.SkillCheck.self, from: responseBody, transforming: { value in .json(value) @@ -30433,7 +33908,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSchedules.Output.BadRequest.Body + let body: Operations.CheckSkillUpdates.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30455,7 +33930,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSchedules.Output.Unauthorized.Body + let body: Operations.CheckSkillUpdates.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30477,7 +33952,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSchedules.Output.NotFound.Body + let body: Operations.CheckSkillUpdates.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30499,7 +33974,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSchedules.Output.MethodNotAllowed.Body + let body: Operations.CheckSkillUpdates.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30521,7 +33996,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSchedules.Output.Conflict.Body + let body: Operations.CheckSkillUpdates.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30543,7 +34018,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSchedules.Output.ContentTooLarge.Body + let body: Operations.CheckSkillUpdates.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30565,7 +34040,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSchedules.Output.InternalServerError.Body + let body: Operations.CheckSkillUpdates.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30587,7 +34062,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSchedules.Output.ServiceUnavailable.Body + let body: Operations.CheckSkillUpdates.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30619,42 +34094,37 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/schedules`. - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)`. - public func createSchedule(_ input: Operations.CreateSchedule.Input) async throws -> Operations.CreateSchedule.Output { + /// One shared skill as a full package. GET /v1/skills keeps its earlier item shapes; the full records are here and in the create and update responses. + /// + /// - Remark: HTTP `GET /v1/skills/{id}`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)`. + public func getSkill(_ input: Operations.GetSkill.Input) async throws -> Operations.GetSkill.Output { try await client.send( input: input, - forOperation: Operations.CreateSchedule.id, + forOperation: Operations.GetSkill.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/schedules", - parameters: [] + template: "/v1/skills/{}", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSchedule.Output.Created.Body + let body: Operations.GetSkill.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30664,7 +34134,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Schedule.self, + Components.Schemas.SkillPackage.self, from: responseBody, transforming: { value in .json(value) @@ -30673,10 +34143,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSchedule.Output.BadRequest.Body + let body: Operations.GetSkill.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30698,7 +34168,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSchedule.Output.Unauthorized.Body + let body: Operations.GetSkill.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30718,31 +34188,9 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .unauthorized(.init(body: body)) - case 403: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSchedule.Output.Forbidden.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas._Error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .forbidden(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSchedule.Output.NotFound.Body + let body: Operations.GetSkill.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30764,7 +34212,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSchedule.Output.MethodNotAllowed.Body + let body: Operations.GetSkill.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30786,7 +34234,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSchedule.Output.Conflict.Body + let body: Operations.GetSkill.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30808,7 +34256,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSchedule.Output.ContentTooLarge.Body + let body: Operations.GetSkill.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30830,7 +34278,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSchedule.Output.InternalServerError.Body + let body: Operations.GetSkill.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30852,7 +34300,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSchedule.Output.ServiceUnavailable.Body + let body: Operations.GetSkill.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30884,15 +34332,15 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `PATCH /v1/schedules/{id}`. - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)`. - public func updateSchedule(_ input: Operations.UpdateSchedule.Input) async throws -> Operations.UpdateSchedule.Output { + /// - Remark: HTTP `PATCH /v1/skills/{id}`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)`. + public func updateSkill(_ input: Operations.UpdateSkill.Input) async throws -> Operations.UpdateSkill.Output { try await client.send( input: input, - forOperation: Operations.UpdateSchedule.id, + forOperation: Operations.UpdateSkill.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/schedules/{}", + template: "/v1/skills/{}", parameters: [ input.path.id ] @@ -30921,7 +34369,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSchedule.Output.Ok.Body + let body: Operations.UpdateSkill.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30931,7 +34379,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.UpdateSchedule.Output.Ok.Body.JsonPayload?.self, + Operations.UpdateSkill.Output.Ok.Body.JsonPayload?.self, from: responseBody, transforming: { value in .json(value) @@ -30943,7 +34391,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSchedule.Output.BadRequest.Body + let body: Operations.UpdateSkill.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30965,7 +34413,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSchedule.Output.Unauthorized.Body + let body: Operations.UpdateSkill.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -30985,31 +34433,9 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .unauthorized(.init(body: body)) - case 403: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSchedule.Output.Forbidden.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas._Error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .forbidden(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSchedule.Output.NotFound.Body + let body: Operations.UpdateSkill.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31031,7 +34457,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSchedule.Output.MethodNotAllowed.Body + let body: Operations.UpdateSkill.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31053,7 +34479,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSchedule.Output.Conflict.Body + let body: Operations.UpdateSkill.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31075,7 +34501,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSchedule.Output.ContentTooLarge.Body + let body: Operations.UpdateSkill.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31097,7 +34523,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSchedule.Output.InternalServerError.Body + let body: Operations.UpdateSkill.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31119,7 +34545,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSchedule.Output.ServiceUnavailable.Body + let body: Operations.UpdateSkill.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31151,15 +34577,15 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `DELETE /v1/schedules/{id}`. - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)`. - public func deleteSchedule(_ input: Operations.DeleteSchedule.Input) async throws -> Operations.DeleteSchedule.Output { + /// - Remark: HTTP `DELETE /v1/skills/{id}`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)`. + public func deleteSkill(_ input: Operations.DeleteSkill.Input) async throws -> Operations.DeleteSkill.Output { try await client.send( input: input, - forOperation: Operations.DeleteSchedule.id, + forOperation: Operations.DeleteSkill.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/schedules/{}", + template: "/v1/skills/{}", parameters: [ input.path.id ] @@ -31181,7 +34607,7 @@ public struct Client: APIProtocol { return .noContent(.init()) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSchedule.Output.BadRequest.Body + let body: Operations.DeleteSkill.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31203,7 +34629,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSchedule.Output.Unauthorized.Body + let body: Operations.DeleteSkill.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31225,7 +34651,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSchedule.Output.NotFound.Body + let body: Operations.DeleteSkill.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31247,7 +34673,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSchedule.Output.MethodNotAllowed.Body + let body: Operations.DeleteSkill.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31269,7 +34695,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSchedule.Output.Conflict.Body + let body: Operations.DeleteSkill.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31291,7 +34717,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSchedule.Output.ContentTooLarge.Body + let body: Operations.DeleteSkill.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31313,7 +34739,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSchedule.Output.InternalServerError.Body + let body: Operations.DeleteSkill.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31335,7 +34761,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSchedule.Output.ServiceUnavailable.Body + let body: Operations.DeleteSkill.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31367,15 +34793,17 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/schedules/{id}/run`. - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)`. - public func runSchedule(_ input: Operations.RunSchedule.Input) async throws -> Operations.RunSchedule.Output { + /// Turns a shared skill on or off for one bot. For a bot-owned skill, assignment copies the full package and records its source ID; an existing linked copy is left unchanged. Removal deletes only direct linked copies, never name matches or the source. Source deletion leaves copies and their provenance intact. Default skills cannot be assigned. Each request is independent, so clients can report partial failures and retry safely. + /// + /// - Remark: HTTP `POST /v1/skills/{id}/assignment`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)`. + public func assignSkillBot(_ input: Operations.AssignSkillBot.Input) async throws -> Operations.AssignSkillBot.Output { try await client.send( input: input, - forOperation: Operations.RunSchedule.id, + forOperation: Operations.AssignSkillBot.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/schedules/{}/run", + template: "/v1/skills/{}/assignment", parameters: [ input.path.id ] @@ -31389,13 +34817,22 @@ public struct Client: APIProtocol { in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 202: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RunSchedule.Output.Accepted.Body + let body: Operations.AssignSkillBot.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31405,7 +34842,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ScheduleRun.self, + Operations.AssignSkillBot.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -31414,10 +34851,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .accepted(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RunSchedule.Output.BadRequest.Body + let body: Operations.AssignSkillBot.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31439,7 +34876,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RunSchedule.Output.Unauthorized.Body + let body: Operations.AssignSkillBot.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31461,7 +34898,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RunSchedule.Output.NotFound.Body + let body: Operations.AssignSkillBot.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31483,7 +34920,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RunSchedule.Output.MethodNotAllowed.Body + let body: Operations.AssignSkillBot.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31505,7 +34942,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RunSchedule.Output.Conflict.Body + let body: Operations.AssignSkillBot.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31527,7 +34964,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RunSchedule.Output.ContentTooLarge.Body + let body: Operations.AssignSkillBot.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31549,7 +34986,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RunSchedule.Output.InternalServerError.Body + let body: Operations.AssignSkillBot.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31571,7 +35008,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.RunSchedule.Output.ServiceUnavailable.Body + let body: Operations.AssignSkillBot.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31603,17 +35040,17 @@ public struct Client: APIProtocol { } ) } - /// Script task runs from the last 90 days, newest first. Page with `before` set to the last run's ID. An unknown ID returns an empty list. + /// The upstream version an installed skill would update to. /// - /// - Remark: HTTP `GET /v1/schedules/{id}/runs`. - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)`. - public func listScriptRuns(_ input: Operations.ListScriptRuns.Input) async throws -> Operations.ListScriptRuns.Output { + /// - Remark: HTTP `GET /v1/skills/{id}/update`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)`. + public func getPendingSkillUpdate(_ input: Operations.GetPendingSkillUpdate.Input) async throws -> Operations.GetPendingSkillUpdate.Output { try await client.send( input: input, - forOperation: Operations.ListScriptRuns.id, + forOperation: Operations.GetPendingSkillUpdate.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/schedules/{}/runs", + template: "/v1/skills/{}/update", parameters: [ input.path.id ] @@ -31623,20 +35060,6 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "limit", - value: input.query.limit - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "before", - value: input.query.before - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -31647,7 +35070,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListScriptRuns.Output.Ok.Body + let body: Operations.GetPendingSkillUpdate.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31657,7 +35080,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.ScriptRun].self, + Components.Schemas.PendingSkillUpdate.self, from: responseBody, transforming: { value in .json(value) @@ -31669,7 +35092,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListScriptRuns.Output.BadRequest.Body + let body: Operations.GetPendingSkillUpdate.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31691,7 +35114,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListScriptRuns.Output.Unauthorized.Body + let body: Operations.GetPendingSkillUpdate.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31713,7 +35136,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListScriptRuns.Output.NotFound.Body + let body: Operations.GetPendingSkillUpdate.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31735,7 +35158,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListScriptRuns.Output.MethodNotAllowed.Body + let body: Operations.GetPendingSkillUpdate.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31757,7 +35180,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListScriptRuns.Output.Conflict.Body + let body: Operations.GetPendingSkillUpdate.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31779,7 +35202,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListScriptRuns.Output.ContentTooLarge.Body + let body: Operations.GetPendingSkillUpdate.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31801,7 +35224,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListScriptRuns.Output.InternalServerError.Body + let body: Operations.GetPendingSkillUpdate.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31823,7 +35246,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListScriptRuns.Output.ServiceUnavailable.Body + let body: Operations.GetPendingSkillUpdate.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31855,20 +35278,24 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `GET /v1/skills`. - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)`. - public func listSkills(_ input: Operations.ListSkills.Input) async throws -> Operations.ListSkills.Output { + /// Replaces an installed skill with its upstream version, recorded as a change the owner can revert. + /// + /// - Remark: HTTP `POST /v1/skills/{id}/update`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)`. + public func applySkillUpdate(_ input: Operations.ApplySkillUpdate.Input) async throws -> Operations.ApplySkillUpdate.Output { try await client.send( input: input, - forOperation: Operations.ListSkills.id, + forOperation: Operations.ApplySkillUpdate.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills", - parameters: [] + template: "/v1/skills/{}/update", + parameters: [ + input.path.id + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -31881,7 +35308,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSkills.Output.Ok.Body + let body: Operations.ApplySkillUpdate.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31891,7 +35318,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.ListedSkill].self, + Components.Schemas.SkillPackage.self, from: responseBody, transforming: { value in .json(value) @@ -31903,7 +35330,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSkills.Output.BadRequest.Body + let body: Operations.ApplySkillUpdate.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31925,7 +35352,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSkills.Output.Unauthorized.Body + let body: Operations.ApplySkillUpdate.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31947,7 +35374,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSkills.Output.NotFound.Body + let body: Operations.ApplySkillUpdate.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31969,7 +35396,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSkills.Output.MethodNotAllowed.Body + let body: Operations.ApplySkillUpdate.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -31991,7 +35418,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSkills.Output.Conflict.Body + let body: Operations.ApplySkillUpdate.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32013,7 +35440,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSkills.Output.ContentTooLarge.Body + let body: Operations.ApplySkillUpdate.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32035,7 +35462,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSkills.Output.InternalServerError.Body + let body: Operations.ApplySkillUpdate.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32057,7 +35484,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ListSkills.Output.ServiceUnavailable.Body + let body: Operations.ApplySkillUpdate.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32089,42 +35516,35 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `POST /v1/skills`. - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)`. - public func createSkill(_ input: Operations.CreateSkill.Input) async throws -> Operations.CreateSkill.Output { + /// The account's vision model, which describes images for bots whose model can't read them, and the models that read images the account's provider keys reach. + /// + /// - Remark: HTTP `GET /v1/vision-model`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)`. + public func getVisionModel(_ input: Operations.GetVisionModel.Input) async throws -> Operations.GetVisionModel.Output { try await client.send( input: input, - forOperation: Operations.CreateSkill.id, + forOperation: Operations.GetVisionModel.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills", + template: "/v1/vision-model", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSkill.Output.Created.Body + let body: Operations.GetVisionModel.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32134,7 +35554,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Skill.self, + Components.Schemas.VisionModel.self, from: responseBody, transforming: { value in .json(value) @@ -32143,10 +35563,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSkill.Output.BadRequest.Body + let body: Operations.GetVisionModel.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32168,7 +35588,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSkill.Output.Unauthorized.Body + let body: Operations.GetVisionModel.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32190,7 +35610,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSkill.Output.NotFound.Body + let body: Operations.GetVisionModel.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32212,7 +35632,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSkill.Output.MethodNotAllowed.Body + let body: Operations.GetVisionModel.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32234,7 +35654,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSkill.Output.Conflict.Body + let body: Operations.GetVisionModel.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32256,7 +35676,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSkill.Output.ContentTooLarge.Body + let body: Operations.GetVisionModel.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32278,7 +35698,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSkill.Output.InternalServerError.Body + let body: Operations.GetVisionModel.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32300,7 +35720,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CreateSkill.Output.ServiceUnavailable.Body + let body: Operations.GetVisionModel.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32332,22 +35752,22 @@ public struct Client: APIProtocol { } ) } - /// Lists the skills in a public GitHub repository: every folder with a SKILL.md, and whether each can be installed. + /// Choose the account's vision model, or turn it off with null. It must be one of the choices `getVisionModel` lists. /// - /// - Remark: HTTP `POST /v1/skills/github/browse`. - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)`. - public func browseSkillRepository(_ input: Operations.BrowseSkillRepository.Input) async throws -> Operations.BrowseSkillRepository.Output { + /// - Remark: HTTP `PUT /v1/vision-model`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)`. + public func updateVisionModel(_ input: Operations.UpdateVisionModel.Input) async throws -> Operations.UpdateVisionModel.Output { try await client.send( input: input, - forOperation: Operations.BrowseSkillRepository.id, + forOperation: Operations.UpdateVisionModel.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills/github/browse", + template: "/v1/vision-model", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -32369,7 +35789,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.BrowseSkillRepository.Output.Ok.Body + let body: Operations.UpdateVisionModel.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32379,7 +35799,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.SkillListing.self, + Components.Schemas.VisionModel.self, from: responseBody, transforming: { value in .json(value) @@ -32391,7 +35811,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.BrowseSkillRepository.Output.BadRequest.Body + let body: Operations.UpdateVisionModel.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32413,7 +35833,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.BrowseSkillRepository.Output.Unauthorized.Body + let body: Operations.UpdateVisionModel.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32435,7 +35855,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.BrowseSkillRepository.Output.NotFound.Body + let body: Operations.UpdateVisionModel.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32457,7 +35877,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.BrowseSkillRepository.Output.MethodNotAllowed.Body + let body: Operations.UpdateVisionModel.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32479,7 +35899,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.BrowseSkillRepository.Output.Conflict.Body + let body: Operations.UpdateVisionModel.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32501,7 +35921,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.BrowseSkillRepository.Output.ContentTooLarge.Body + let body: Operations.UpdateVisionModel.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32523,7 +35943,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.BrowseSkillRepository.Output.InternalServerError.Body + let body: Operations.UpdateVisionModel.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32545,7 +35965,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.BrowseSkillRepository.Output.ServiceUnavailable.Body + let body: Operations.UpdateVisionModel.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32577,44 +35997,35 @@ public struct Client: APIProtocol { } ) } - /// Installs skills from one commit of a public GitHub repository as read-only shared skills, all or none, and turns them on for `botIds`. + /// The account's voice gateway: its lines and the owner's numbers, when its token was issued, and the connection status. /// - /// - Remark: HTTP `POST /v1/skills/github/install`. - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)`. - public func installSkills(_ input: Operations.InstallSkills.Input) async throws -> Operations.InstallSkills.Output { + /// - Remark: HTTP `GET /v1/voice-gateway`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)`. + public func getVoiceGateway(_ input: Operations.GetVoiceGateway.Input) async throws -> Operations.GetVoiceGateway.Output { try await client.send( input: input, - forOperation: Operations.InstallSkills.id, + forOperation: Operations.GetVoiceGateway.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills/github/install", + template: "/v1/voice-gateway", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.InstallSkills.Output.Created.Body + let body: Operations.GetVoiceGateway.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32624,7 +36035,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.SkillPackage].self, + Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -32633,10 +36044,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.InstallSkills.Output.BadRequest.Body + let body: Operations.GetVoiceGateway.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32658,7 +36069,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.InstallSkills.Output.Unauthorized.Body + let body: Operations.GetVoiceGateway.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32680,7 +36091,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.InstallSkills.Output.NotFound.Body + let body: Operations.GetVoiceGateway.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32702,7 +36113,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.InstallSkills.Output.MethodNotAllowed.Body + let body: Operations.GetVoiceGateway.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32724,7 +36135,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.InstallSkills.Output.Conflict.Body + let body: Operations.GetVoiceGateway.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32746,7 +36157,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.InstallSkills.Output.ContentTooLarge.Body + let body: Operations.GetVoiceGateway.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32768,7 +36179,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.InstallSkills.Output.InternalServerError.Body + let body: Operations.GetVoiceGateway.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32790,7 +36201,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.InstallSkills.Output.ServiceUnavailable.Body + let body: Operations.GetVoiceGateway.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32822,35 +36233,44 @@ public struct Client: APIProtocol { } ) } - /// Checks every installed skill's branch for changes now. The server also checks daily; GET /v1/skills shows the results as `update`. + /// Saves the voice gateway's lines and the owner's numbers. 400 for an unknown bot. /// - /// - Remark: HTTP `POST /v1/skills/updates/check`. - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)`. - public func checkSkillUpdates(_ input: Operations.CheckSkillUpdates.Input) async throws -> Operations.CheckSkillUpdates.Output { + /// - Remark: HTTP `PUT /v1/voice-gateway`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)`. + public func updateVoiceGateway(_ input: Operations.UpdateVoiceGateway.Input) async throws -> Operations.UpdateVoiceGateway.Output { try await client.send( input: input, - forOperation: Operations.CheckSkillUpdates.id, + forOperation: Operations.UpdateVoiceGateway.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills/updates/check", + template: "/v1/voice-gateway", parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CheckSkillUpdates.Output.Ok.Body + let body: Operations.UpdateVoiceGateway.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32860,7 +36280,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.SkillCheck.self, + Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -32872,7 +36292,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CheckSkillUpdates.Output.BadRequest.Body + let body: Operations.UpdateVoiceGateway.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32894,7 +36314,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CheckSkillUpdates.Output.Unauthorized.Body + let body: Operations.UpdateVoiceGateway.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32916,7 +36336,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CheckSkillUpdates.Output.NotFound.Body + let body: Operations.UpdateVoiceGateway.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32938,7 +36358,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CheckSkillUpdates.Output.MethodNotAllowed.Body + let body: Operations.UpdateVoiceGateway.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32960,7 +36380,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CheckSkillUpdates.Output.Conflict.Body + let body: Operations.UpdateVoiceGateway.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -32982,7 +36402,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CheckSkillUpdates.Output.ContentTooLarge.Body + let body: Operations.UpdateVoiceGateway.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33004,7 +36424,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CheckSkillUpdates.Output.InternalServerError.Body + let body: Operations.UpdateVoiceGateway.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33026,7 +36446,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.CheckSkillUpdates.Output.ServiceUnavailable.Body + let body: Operations.UpdateVoiceGateway.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33058,24 +36478,22 @@ public struct Client: APIProtocol { } ) } - /// One shared skill as a full package. GET /v1/skills keeps its earlier item shapes; the full records are here and in the create and update responses. + /// Issues the voice gateway token, returned only once. An earlier token stops working at once. /// - /// - Remark: HTTP `GET /v1/skills/{id}`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)`. - public func getSkill(_ input: Operations.GetSkill.Input) async throws -> Operations.GetSkill.Output { + /// - Remark: HTTP `POST /v1/voice-gateway/token`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)`. + public func issueVoiceGatewayToken(_ input: Operations.IssueVoiceGatewayToken.Input) async throws -> Operations.IssueVoiceGatewayToken.Output { try await client.send( input: input, - forOperation: Operations.GetSkill.id, + forOperation: Operations.IssueVoiceGatewayToken.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills/{}", - parameters: [ - input.path.id - ] + template: "/v1/voice-gateway/token", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -33086,9 +36504,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetSkill.Output.Ok.Body + let body: Operations.IssueVoiceGatewayToken.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33098,7 +36516,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.SkillPackage.self, + Operations.IssueVoiceGatewayToken.Output.Created.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -33107,10 +36525,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetSkill.Output.BadRequest.Body + let body: Operations.IssueVoiceGatewayToken.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33132,7 +36550,7 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetSkill.Output.Unauthorized.Body + let body: Operations.IssueVoiceGatewayToken.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33154,7 +36572,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetSkill.Output.NotFound.Body + let body: Operations.IssueVoiceGatewayToken.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33176,7 +36594,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetSkill.Output.MethodNotAllowed.Body + let body: Operations.IssueVoiceGatewayToken.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33198,7 +36616,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetSkill.Output.Conflict.Body + let body: Operations.IssueVoiceGatewayToken.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33220,7 +36638,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetSkill.Output.ContentTooLarge.Body + let body: Operations.IssueVoiceGatewayToken.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33242,7 +36660,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetSkill.Output.InternalServerError.Body + let body: Operations.IssueVoiceGatewayToken.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33264,7 +36682,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetSkill.Output.ServiceUnavailable.Body + let body: Operations.IssueVoiceGatewayToken.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33296,44 +36714,37 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `PATCH /v1/skills/{id}`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)`. - public func updateSkill(_ input: Operations.UpdateSkill.Input) async throws -> Operations.UpdateSkill.Output { + /// Revokes the voice gateway token. 404 when none is issued. + /// + /// - Remark: HTTP `DELETE /v1/voice-gateway/token`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)`. + public func revokeVoiceGatewayToken(_ input: Operations.RevokeVoiceGatewayToken.Input) async throws -> Operations.RevokeVoiceGatewayToken.Output { try await client.send( input: input, - forOperation: Operations.UpdateSkill.id, + forOperation: Operations.RevokeVoiceGatewayToken.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills/{}", - parameters: [ - input.path.id - ] + template: "/v1/voice-gateway/token", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .patch + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 204: + return .noContent(.init()) + case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSkill.Output.Ok.Body + let body: Operations.RevokeVoiceGatewayToken.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33343,7 +36754,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.UpdateSkill.Output.Ok.Body.JsonPayload?.self, + Components.Schemas._Error.self, from: responseBody, transforming: { value in .json(value) @@ -33352,10 +36763,32 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) - case 400: + return .badRequest(.init(body: body)) + case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSkill.Output.BadRequest.Body + let body: Operations.RevokeVoiceGatewayToken.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/plain" + ] + ) + switch chosenContentType { + case "text/plain": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .plainText(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.RevokeVoiceGatewayToken.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33374,10 +36807,54 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .badRequest(.init(body: body)) - case 401: + return .notFound(.init(body: body)) + case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSkill.Output.Unauthorized.Body + let body: Operations.RevokeVoiceGatewayToken.Output.MethodNotAllowed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .methodNotAllowed(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.RevokeVoiceGatewayToken.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 413: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.RevokeVoiceGatewayToken.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33396,10 +36873,149 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } + return .contentTooLarge(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.RevokeVoiceGatewayToken.Output.InternalServerError.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.RevokeVoiceGatewayToken.Output.ServiceUnavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Reports a call a bot placed: ringing as soon as dialing starts, then how it settled. A call not acknowledged within 15 seconds, or not settled within 3 minutes 30 seconds of its call event, is cancelled. 404 for a call that is neither waiting to settle nor active: hang up. ended reports that a started call ended, and answers 204 for any callId. + /// + /// - Remark: HTTP `POST /v1/voice/calls/{callId}`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)`. + public func reportVoiceCall(_ input: Operations.ReportVoiceCall.Input) async throws -> Operations.ReportVoiceCall.Output { + try await client.send( + input: input, + forOperation: Operations.ReportVoiceCall.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/voice/calls/{}", + parameters: [ + input.path.callId + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ReportVoiceCall.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.ReportVoiceCall.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSkill.Output.NotFound.Body + let body: Operations.ReportVoiceCall.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33421,7 +37037,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSkill.Output.MethodNotAllowed.Body + let body: Operations.ReportVoiceCall.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33443,7 +37059,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSkill.Output.Conflict.Body + let body: Operations.ReportVoiceCall.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33465,7 +37081,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSkill.Output.ContentTooLarge.Body + let body: Operations.ReportVoiceCall.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33487,7 +37103,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSkill.Output.InternalServerError.Body + let body: Operations.ReportVoiceCall.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33509,7 +37125,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateSkill.Output.ServiceUnavailable.Body + let body: Operations.ReportVoiceCall.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33541,24 +37157,31 @@ public struct Client: APIProtocol { } ) } - /// - Remark: HTTP `DELETE /v1/skills/{id}`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)`. - public func deleteSkill(_ input: Operations.DeleteSkill.Input) async throws -> Operations.DeleteSkill.Output { + /// Server-sent events for the voice gateway. A config event comes first and after every change to lines, owner numbers, or their bots. With calls=true, call and cancel events ask the gateway to place and hang up calls to the owner. One stream is live per account: a new connection sends replaced to the older one and closes it. Revoking or replacing the token closes the stream. + /// + /// - Remark: HTTP `GET /v1/voice/events`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)`. + public func streamVoiceGatewayEvents(_ input: Operations.StreamVoiceGatewayEvents.Input) async throws -> Operations.StreamVoiceGatewayEvents.Output { try await client.send( input: input, - forOperation: Operations.DeleteSkill.id, + forOperation: Operations.StreamVoiceGatewayEvents.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills/{}", - parameters: [ - input.path.id - ] + template: "/v1/voice/events", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "calls", + value: input.query.calls + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -33567,11 +37190,31 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 204: - return .noContent(.init()) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.StreamVoiceGatewayEvents.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "text/event-stream" + ] + ) + switch chosenContentType { + case "text/event-stream": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, + from: responseBody, + transforming: { value in + .textEventStream(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSkill.Output.BadRequest.Body + let body: Operations.StreamVoiceGatewayEvents.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33593,20 +37236,20 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSkill.Output.Unauthorized.Body + let body: Operations.StreamVoiceGatewayEvents.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "text/plain" + "application/json" ] ) switch chosenContentType { - case "text/plain": - body = try converter.getResponseBodyAsBinary( - OpenAPIRuntime.HTTPBody.self, + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, from: responseBody, transforming: { value in - .plainText(value) + .json(value) } ) default: @@ -33615,7 +37258,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSkill.Output.NotFound.Body + let body: Operations.StreamVoiceGatewayEvents.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33637,7 +37280,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSkill.Output.MethodNotAllowed.Body + let body: Operations.StreamVoiceGatewayEvents.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33659,7 +37302,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSkill.Output.Conflict.Body + let body: Operations.StreamVoiceGatewayEvents.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33681,7 +37324,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSkill.Output.ContentTooLarge.Body + let body: Operations.StreamVoiceGatewayEvents.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33703,7 +37346,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSkill.Output.InternalServerError.Body + let body: Operations.StreamVoiceGatewayEvents.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33725,7 +37368,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.DeleteSkill.Output.ServiceUnavailable.Body + let body: Operations.StreamVoiceGatewayEvents.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33757,24 +37400,22 @@ public struct Client: APIProtocol { } ) } - /// Turns a shared skill on or off for one bot. For a bot-owned skill, assignment copies the full package and records its source ID; an existing linked copy is left unchanged. Removal deletes only direct linked copies, never name matches or the source. Source deletion leaves copies and their provenance intact. Default skills cannot be assigned. Each request is independent, so clients can report partial failures and retry safely. + /// Reports which lines the voice gateway registered with the telephone system. Accepted only while this token's /v1/voice/events stream is live, 409 otherwise; the owner sees the report in settings until that stream closes. /// - /// - Remark: HTTP `POST /v1/skills/{id}/assignment`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)`. - public func assignSkillBot(_ input: Operations.AssignSkillBot.Input) async throws -> Operations.AssignSkillBot.Output { + /// - Remark: HTTP `PUT /v1/voice/lines`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)`. + public func reportVoiceLines(_ input: Operations.ReportVoiceLines.Input) async throws -> Operations.ReportVoiceLines.Output { try await client.send( input: input, - forOperation: Operations.AssignSkillBot.id, + forOperation: Operations.ReportVoiceLines.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills/{}/assignment", - parameters: [ - input.path.id - ] + template: "/v1/voice/lines", + parameters: [] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -33794,9 +37435,11 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 204: + return .noContent(.init()) + case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AssignSkillBot.Output.Ok.Body + let body: Operations.ReportVoiceLines.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33806,7 +37449,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.AssignSkillBot.Output.Ok.Body.JsonPayload.self, + Components.Schemas._Error.self, from: responseBody, transforming: { value in .json(value) @@ -33815,10 +37458,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) - case 400: + return .badRequest(.init(body: body)) + case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AssignSkillBot.Output.BadRequest.Body + let body: Operations.ReportVoiceLines.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33837,32 +37480,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .badRequest(.init(body: body)) - case 401: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AssignSkillBot.Output.Unauthorized.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "text/plain" - ] - ) - switch chosenContentType { - case "text/plain": - body = try converter.getResponseBodyAsBinary( - OpenAPIRuntime.HTTPBody.self, - from: responseBody, - transforming: { value in - .plainText(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AssignSkillBot.Output.NotFound.Body + let body: Operations.ReportVoiceLines.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33884,7 +37505,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AssignSkillBot.Output.MethodNotAllowed.Body + let body: Operations.ReportVoiceLines.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33906,7 +37527,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AssignSkillBot.Output.Conflict.Body + let body: Operations.ReportVoiceLines.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33928,7 +37549,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AssignSkillBot.Output.ContentTooLarge.Body + let body: Operations.ReportVoiceLines.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33950,7 +37571,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AssignSkillBot.Output.InternalServerError.Body + let body: Operations.ReportVoiceLines.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -33972,7 +37593,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.AssignSkillBot.Output.ServiceUnavailable.Body + let body: Operations.ReportVoiceLines.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34004,37 +37625,49 @@ public struct Client: APIProtocol { } ) } - /// The upstream version an installed skill would update to. + /// Reports that a call on the line started, before the greeting is spoken; send it again after every config event while the call runs. For a call a bot placed, it also settles the call as answered. A call nobody confirms within 15 seconds of a new events stream, or 60 seconds without one, ends. 409 when the call ended, another call is active on the line, or the callId is an outside call's that no longer rings: hang up. /// - /// - Remark: HTTP `GET /v1/skills/{id}/update`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)`. - public func getPendingSkillUpdate(_ input: Operations.GetPendingSkillUpdate.Input) async throws -> Operations.GetPendingSkillUpdate.Output { + /// - Remark: HTTP `PUT /v1/voice/lines/{username}/calls/{callId}`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)`. + public func startVoiceCall(_ input: Operations.StartVoiceCall.Input) async throws -> Operations.StartVoiceCall.Output { try await client.send( input: input, - forOperation: Operations.GetPendingSkillUpdate.id, + forOperation: Operations.StartVoiceCall.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills/{}/update", + template: "/v1/voice/lines/{}/calls/{}", parameters: [ - input.path.id + input.path.username, + input.path.callId ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .put ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 204: + return .noContent(.init()) + case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPendingSkillUpdate.Output.Ok.Body + let body: Operations.StartVoiceCall.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34044,7 +37677,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.PendingSkillUpdate.self, + Components.Schemas._Error.self, from: responseBody, transforming: { value in .json(value) @@ -34053,10 +37686,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) - case 400: + return .badRequest(.init(body: body)) + case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPendingSkillUpdate.Output.BadRequest.Body + let body: Operations.StartVoiceCall.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34075,32 +37708,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .badRequest(.init(body: body)) - case 401: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPendingSkillUpdate.Output.Unauthorized.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "text/plain" - ] - ) - switch chosenContentType { - case "text/plain": - body = try converter.getResponseBodyAsBinary( - OpenAPIRuntime.HTTPBody.self, - from: responseBody, - transforming: { value in - .plainText(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPendingSkillUpdate.Output.NotFound.Body + let body: Operations.StartVoiceCall.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34122,7 +37733,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPendingSkillUpdate.Output.MethodNotAllowed.Body + let body: Operations.StartVoiceCall.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34144,7 +37755,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPendingSkillUpdate.Output.Conflict.Body + let body: Operations.StartVoiceCall.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34166,7 +37777,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPendingSkillUpdate.Output.ContentTooLarge.Body + let body: Operations.StartVoiceCall.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34188,7 +37799,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPendingSkillUpdate.Output.InternalServerError.Body + let body: Operations.StartVoiceCall.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34210,7 +37821,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetPendingSkillUpdate.Output.ServiceUnavailable.Body + let body: Operations.StartVoiceCall.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34242,26 +37853,47 @@ public struct Client: APIProtocol { } ) } - /// Replaces an installed skill with its upstream version, recorded as a change the owner can revert. + /// The line's bot chat as server-sent events, the same as /v1/agents/{id}/events. While the line's active call is an outside call, the snapshots are that call's conversation instead. The stream closes when the line gets another bot, is removed, or its bot is deleted or disabled. /// - /// - Remark: HTTP `POST /v1/skills/{id}/update`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)`. - public func applySkillUpdate(_ input: Operations.ApplySkillUpdate.Input) async throws -> Operations.ApplySkillUpdate.Output { + /// - Remark: HTTP `GET /v1/voice/lines/{username}/events`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)`. + public func streamVoiceLineEvents(_ input: Operations.StreamVoiceLineEvents.Input) async throws -> Operations.StreamVoiceLineEvents.Output { try await client.send( input: input, - forOperation: Operations.ApplySkillUpdate.id, + forOperation: Operations.StreamVoiceLineEvents.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/skills/{}/update", + template: "/v1/voice/lines/{}/events", parameters: [ - input.path.id + input.path.username ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "limit", + value: input.query.limit + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "partial", + value: input.query.partial + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "callId", + value: input.query.callId + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -34272,20 +37904,20 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApplySkillUpdate.Output.Ok.Body + let body: Operations.StreamVoiceLineEvents.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "application/json" + "text/event-stream" ] ) switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.SkillPackage.self, + case "text/event-stream": + body = try converter.getResponseBodyAsBinary( + OpenAPIRuntime.HTTPBody.self, from: responseBody, transforming: { value in - .json(value) + .textEventStream(value) } ) default: @@ -34294,7 +37926,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApplySkillUpdate.Output.BadRequest.Body + let body: Operations.StreamVoiceLineEvents.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34316,20 +37948,20 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApplySkillUpdate.Output.Unauthorized.Body + let body: Operations.StreamVoiceLineEvents.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "text/plain" + "application/json" ] ) switch chosenContentType { - case "text/plain": - body = try converter.getResponseBodyAsBinary( - OpenAPIRuntime.HTTPBody.self, + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, from: responseBody, transforming: { value in - .plainText(value) + .json(value) } ) default: @@ -34338,7 +37970,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApplySkillUpdate.Output.NotFound.Body + let body: Operations.StreamVoiceLineEvents.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34360,7 +37992,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApplySkillUpdate.Output.MethodNotAllowed.Body + let body: Operations.StreamVoiceLineEvents.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34382,7 +38014,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApplySkillUpdate.Output.Conflict.Body + let body: Operations.StreamVoiceLineEvents.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34404,7 +38036,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApplySkillUpdate.Output.ContentTooLarge.Body + let body: Operations.StreamVoiceLineEvents.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34426,7 +38058,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApplySkillUpdate.Output.InternalServerError.Body + let body: Operations.StreamVoiceLineEvents.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34448,7 +38080,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ApplySkillUpdate.Output.ServiceUnavailable.Body + let body: Operations.StreamVoiceLineEvents.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34480,18 +38112,21 @@ public struct Client: APIProtocol { } ) } - /// The account's vision model, which describes images for bots whose model can't read them, and the models that read images the account's provider keys reach. + /// A spoken message's execution, the bot's reply to it when its status is done, and whether the bot asked to hang up. Stop polling when the status is failed or cancelled: reply stays null. 404 unless the execution is a spoken message to the line's bot or a callee's message on its outside call; 409 for a callee's message whose outside call is not the line's active call. /// - /// - Remark: HTTP `GET /v1/vision-model`. - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)`. - public func getVisionModel(_ input: Operations.GetVisionModel.Input) async throws -> Operations.GetVisionModel.Output { + /// - Remark: HTTP `GET /v1/voice/lines/{username}/executions/{executionId}`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)`. + public func getSpokenExecution(_ input: Operations.GetSpokenExecution.Input) async throws -> Operations.GetSpokenExecution.Output { try await client.send( input: input, - forOperation: Operations.GetVisionModel.id, + forOperation: Operations.GetSpokenExecution.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/vision-model", - parameters: [] + template: "/v1/voice/lines/{}/executions/{}", + parameters: [ + input.path.username, + input.path.executionId + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, @@ -34508,7 +38143,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetVisionModel.Output.Ok.Body + let body: Operations.GetSpokenExecution.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34518,7 +38153,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.VisionModel.self, + Components.Schemas.SpokenExecution.self, from: responseBody, transforming: { value in .json(value) @@ -34530,7 +38165,7 @@ public struct Client: APIProtocol { return .ok(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetVisionModel.Output.BadRequest.Body + let body: Operations.GetSpokenExecution.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34552,20 +38187,20 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetVisionModel.Output.Unauthorized.Body + let body: Operations.GetSpokenExecution.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "text/plain" + "application/json" ] ) switch chosenContentType { - case "text/plain": - body = try converter.getResponseBodyAsBinary( - OpenAPIRuntime.HTTPBody.self, + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, from: responseBody, transforming: { value in - .plainText(value) + .json(value) } ) default: @@ -34574,7 +38209,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetVisionModel.Output.NotFound.Body + let body: Operations.GetSpokenExecution.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34596,7 +38231,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetVisionModel.Output.MethodNotAllowed.Body + let body: Operations.GetSpokenExecution.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34618,7 +38253,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetVisionModel.Output.Conflict.Body + let body: Operations.GetSpokenExecution.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34640,7 +38275,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetVisionModel.Output.ContentTooLarge.Body + let body: Operations.GetSpokenExecution.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34662,7 +38297,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetVisionModel.Output.InternalServerError.Body + let body: Operations.GetSpokenExecution.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34684,7 +38319,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.GetVisionModel.Output.ServiceUnavailable.Body + let body: Operations.GetSpokenExecution.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34716,22 +38351,24 @@ public struct Client: APIProtocol { } ) } - /// Choose the account's vision model, or turn it off with null. It must be one of the choices `getVisionModel` lists. + /// Sends what the owner said on a call to the line's bot. On the line's active outside call, what the callee said goes to that call's conversation instead, never the bot chat, under requestId outside-call:{callId}:{requestId}. The same IDs with other content answer 409, and so do a callId whose call ended and an outside call's ID that is not the line's active call: hang up. A callId the server doesn't know is accepted. /// - /// - Remark: HTTP `PUT /v1/vision-model`. - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)`. - public func updateVisionModel(_ input: Operations.UpdateVisionModel.Input) async throws -> Operations.UpdateVisionModel.Output { + /// - Remark: HTTP `POST /v1/voice/lines/{username}/messages`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)`. + public func sendSpokenMessage(_ input: Operations.SendSpokenMessage.Input) async throws -> Operations.SendSpokenMessage.Output { try await client.send( input: input, - forOperation: Operations.UpdateVisionModel.id, + forOperation: Operations.SendSpokenMessage.id, serializer: { input in let path = try converter.renderedPath( - template: "/v1/vision-model", - parameters: [] + template: "/v1/voice/lines/{}/messages", + parameters: [ + input.path.username + ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .put + method: .post ) suppressMutabilityWarning(&request) converter.setAcceptHeader( @@ -34751,9 +38388,9 @@ public struct Client: APIProtocol { }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 202: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateVisionModel.Output.Ok.Body + let body: Operations.SendSpokenMessage.Output.Accepted.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34763,7 +38400,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.VisionModel.self, + Components.Schemas.Execution.self, from: responseBody, transforming: { value in .json(value) @@ -34772,10 +38409,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .accepted(.init(body: body)) case 400: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateVisionModel.Output.BadRequest.Body + let body: Operations.SendSpokenMessage.Output.BadRequest.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34797,20 +38434,20 @@ public struct Client: APIProtocol { return .badRequest(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateVisionModel.Output.Unauthorized.Body + let body: Operations.SendSpokenMessage.Output.Unauthorized.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "text/plain" + "application/json" ] ) switch chosenContentType { - case "text/plain": - body = try converter.getResponseBodyAsBinary( - OpenAPIRuntime.HTTPBody.self, + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas._Error.self, from: responseBody, transforming: { value in - .plainText(value) + .json(value) } ) default: @@ -34819,7 +38456,7 @@ public struct Client: APIProtocol { return .unauthorized(.init(body: body)) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateVisionModel.Output.NotFound.Body + let body: Operations.SendSpokenMessage.Output.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34841,7 +38478,7 @@ public struct Client: APIProtocol { return .notFound(.init(body: body)) case 405: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateVisionModel.Output.MethodNotAllowed.Body + let body: Operations.SendSpokenMessage.Output.MethodNotAllowed.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34863,7 +38500,7 @@ public struct Client: APIProtocol { return .methodNotAllowed(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateVisionModel.Output.Conflict.Body + let body: Operations.SendSpokenMessage.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34885,7 +38522,7 @@ public struct Client: APIProtocol { return .conflict(.init(body: body)) case 413: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateVisionModel.Output.ContentTooLarge.Body + let body: Operations.SendSpokenMessage.Output.ContentTooLarge.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34907,7 +38544,7 @@ public struct Client: APIProtocol { return .contentTooLarge(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateVisionModel.Output.InternalServerError.Body + let body: Operations.SendSpokenMessage.Output.InternalServerError.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -34929,7 +38566,7 @@ public struct Client: APIProtocol { return .internalServerError(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.UpdateVisionModel.Output.ServiceUnavailable.Body + let body: Operations.SendSpokenMessage.Output.ServiceUnavailable.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ diff --git a/apfelkern/Sources/apfelkern/Generated/Types+Components+Schemas.swift b/apfelkern/Sources/apfelkern/Generated/Types+Components+Schemas.swift index 2590585..1697b6a 100644 --- a/apfelkern/Sources/apfelkern/Generated/Types+Components+Schemas.swift +++ b/apfelkern/Sources/apfelkern/Generated/Types+Components+Schemas.swift @@ -1314,6 +1314,132 @@ extension Components { case status } } + /// - Remark: Generated from `#/components/schemas/CallRequest`. + public struct CallRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CallRequest/agentId`. + public var agentId: Swift.String + /// - Remark: Generated from `#/components/schemas/CallRequest/callId`. + public var callId: Swift.String? + /// Who the bot calls. + /// + /// - Remark: Generated from `#/components/schemas/CallRequest/callee`. + public var callee: Swift.String + /// - Remark: Generated from `#/components/schemas/CallRequest/conversationId`. + public var conversationId: Swift.String? + /// - Remark: Generated from `#/components/schemas/CallRequest/decidedAt`. + public var decidedAt: Swift.String? + /// - Remark: Generated from `#/components/schemas/CallRequest/endedAt`. + public var endedAt: Swift.String? + /// Why a failed call failed. + /// + /// - Remark: Generated from `#/components/schemas/CallRequest/error`. + public var error: Swift.String? + /// - Remark: Generated from `#/components/schemas/CallRequest/goal`. + public var goal: Swift.String + /// - Remark: Generated from `#/components/schemas/CallRequest/id`. + public var id: Swift.String + /// The number to dial, normalized: digits with an optional leading +. + /// + /// - Remark: Generated from `#/components/schemas/CallRequest/number`. + public var number: Swift.String + /// What the bot says first when the callee answers. + /// + /// - Remark: Generated from `#/components/schemas/CallRequest/opening`. + public var opening: Swift.String + /// Set once the status is ended. + /// + /// - Remark: Generated from `#/components/schemas/CallRequest/outcome`. + @frozen public enum OutcomePayload: String, Codable, Hashable, Sendable, CaseIterable { + case answered = "answered" + case unanswered = "unanswered" + case busy = "busy" + case failed = "failed" + case _empty_ = "" + } + /// Set once the status is ended. + /// + /// - Remark: Generated from `#/components/schemas/CallRequest/outcome`. + public var outcome: Components.Schemas.CallRequest.OutcomePayload? + /// - Remark: Generated from `#/components/schemas/CallRequest/requestedAt`. + public var requestedAt: Swift.String + /// pending: waiting for the owner. calling: approved, and the call rings or runs. ended: see outcome. + /// + /// - Remark: Generated from `#/components/schemas/CallRequest/status`. + @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { + case pending = "pending" + case declined = "declined" + case calling = "calling" + case ended = "ended" + } + /// pending: waiting for the owner. calling: approved, and the call rings or runs. ended: see outcome. + /// + /// - Remark: Generated from `#/components/schemas/CallRequest/status`. + public var status: Components.Schemas.CallRequest.StatusPayload + /// Creates a new `CallRequest`. + /// + /// - Parameters: + /// - agentId: + /// - callId: + /// - callee: Who the bot calls. + /// - conversationId: + /// - decidedAt: + /// - endedAt: + /// - error: Why a failed call failed. + /// - goal: + /// - id: + /// - number: The number to dial, normalized: digits with an optional leading +. + /// - opening: What the bot says first when the callee answers. + /// - outcome: Set once the status is ended. + /// - requestedAt: + /// - status: pending: waiting for the owner. calling: approved, and the call rings or runs. ended: see outcome. + public init( + agentId: Swift.String, + callId: Swift.String? = nil, + callee: Swift.String, + conversationId: Swift.String? = nil, + decidedAt: Swift.String? = nil, + endedAt: Swift.String? = nil, + error: Swift.String? = nil, + goal: Swift.String, + id: Swift.String, + number: Swift.String, + opening: Swift.String, + outcome: Components.Schemas.CallRequest.OutcomePayload? = nil, + requestedAt: Swift.String, + status: Components.Schemas.CallRequest.StatusPayload + ) { + self.agentId = agentId + self.callId = callId + self.callee = callee + self.conversationId = conversationId + self.decidedAt = decidedAt + self.endedAt = endedAt + self.error = error + self.goal = goal + self.id = id + self.number = number + self.opening = opening + self.outcome = outcome + self.requestedAt = requestedAt + self.status = status + } + public enum CodingKeys: String, CodingKey { + case agentId + case callId + case callee + case conversationId + case decidedAt + case endedAt + case error + case goal + case id + case number + case opening + case outcome + case requestedAt + case status + } + } /// - Remark: Generated from `#/components/schemas/Capabilities`. public struct Capabilities: Codable, Hashable, Sendable { /// Whether bots can be given the coding tool on this server. @@ -1486,6 +1612,8 @@ extension Components { /// /// - Remark: Generated from `#/components/schemas/ChatSnapshot/value2/live`. public var live: OpenAPIRuntime.OpenAPIValueContainer? + /// Text of the reply the bot is writing now. Empty unless the event stream was opened with partial=true. + /// /// - Remark: Generated from `#/components/schemas/ChatSnapshot/value2/partial`. public var partial: Swift.String /// - Remark: Generated from `#/components/schemas/ChatSnapshot/value2/status`. @@ -1510,7 +1638,7 @@ extension Components { /// - conversationId: /// - error: /// - live: Pi Durable live progress state. In-flight assistant message content is omitted. - /// - partial: + /// - partial: Text of the reply the bot is writing now. Empty unless the event stream was opened with partial=true. /// - status: /// - updatedAt: /// - usage: Pi Durable usage document. @@ -2995,6 +3123,83 @@ extension Components { public var attachments: Components.Schemas.EventChatSnapshot.MessagesPayloadPayload.AttachmentsPayload? /// - Remark: Generated from `#/components/schemas/EventChatSnapshot/MessagesPayload/blocks`. public var blocks: OpenAPIRuntime.OpenAPIValueContainer? + /// - Remark: Generated from `#/components/schemas/EventChatSnapshot/MessagesPayload/call`. + public struct CallPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/EventChatSnapshot/MessagesPayload/call/callId`. + public var callId: Swift.String + /// - Remark: Generated from `#/components/schemas/EventChatSnapshot/MessagesPayload/call/callee`. + public var callee: Swift.String? + /// - Remark: Generated from `#/components/schemas/EventChatSnapshot/MessagesPayload/call/direction`. + @frozen public enum DirectionPayload: String, Codable, Hashable, Sendable, CaseIterable { + case inbound = "inbound" + case outbound = "outbound" + } + /// - Remark: Generated from `#/components/schemas/EventChatSnapshot/MessagesPayload/call/direction`. + public var direction: Components.Schemas.EventChatSnapshot.MessagesPayloadPayload.CallPayload.DirectionPayload + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `CallPayload`. + /// + /// - Parameters: + /// - callId: + /// - callee: + /// - direction: + /// - additionalProperties: A container of undocumented properties. + public init( + callId: Swift.String, + callee: Swift.String? = nil, + direction: Components.Schemas.EventChatSnapshot.MessagesPayloadPayload.CallPayload.DirectionPayload, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() + ) { + self.callId = callId + self.callee = callee + self.direction = direction + self.additionalProperties = additionalProperties + } + public enum CodingKeys: String, CodingKey { + case callId + case callee + case direction + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.callId = try container.decode( + Swift.String.self, + forKey: .callId + ) + self.callee = try container.decodeIfPresent( + Swift.String.self, + forKey: .callee + ) + self.direction = try container.decode( + Components.Schemas.EventChatSnapshot.MessagesPayloadPayload.CallPayload.DirectionPayload.self, + forKey: .direction + ) + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "callId", + "callee", + "direction" + ]) + } + public func encode(to encoder: any Swift.Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode( + self.callId, + forKey: .callId + ) + try container.encodeIfPresent( + self.callee, + forKey: .callee + ) + try container.encode( + self.direction, + forKey: .direction + ) + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/components/schemas/EventChatSnapshot/MessagesPayload/call`. + public var call: Components.Schemas.EventChatSnapshot.MessagesPayloadPayload.CallPayload? /// - Remark: Generated from `#/components/schemas/EventChatSnapshot/MessagesPayload/communication`. public struct CommunicationPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/EventChatSnapshot/MessagesPayload/communication/executionId`. @@ -3474,6 +3679,7 @@ extension Components { /// - Parameters: /// - attachments: /// - blocks: + /// - call: /// - communication: /// - content: /// - entryId: @@ -3497,6 +3703,7 @@ extension Components { public init( attachments: Components.Schemas.EventChatSnapshot.MessagesPayloadPayload.AttachmentsPayload? = nil, blocks: OpenAPIRuntime.OpenAPIValueContainer? = nil, + call: Components.Schemas.EventChatSnapshot.MessagesPayloadPayload.CallPayload? = nil, communication: Components.Schemas.EventChatSnapshot.MessagesPayloadPayload.CommunicationPayload? = nil, content: Swift.String, entryId: Swift.String, @@ -3520,6 +3727,7 @@ extension Components { ) { self.attachments = attachments self.blocks = blocks + self.call = call self.communication = communication self.content = content self.entryId = entryId @@ -3544,6 +3752,7 @@ extension Components { public enum CodingKeys: String, CodingKey { case attachments case blocks + case call case communication case content case entryId @@ -3574,6 +3783,10 @@ extension Components { OpenAPIRuntime.OpenAPIValueContainer.self, forKey: .blocks ) + self.call = try container.decodeIfPresent( + Components.Schemas.EventChatSnapshot.MessagesPayloadPayload.CallPayload.self, + forKey: .call + ) self.communication = try container.decodeIfPresent( Components.Schemas.EventChatSnapshot.MessagesPayloadPayload.CommunicationPayload.self, forKey: .communication @@ -3653,6 +3866,7 @@ extension Components { additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ "attachments", "blocks", + "call", "communication", "content", "entryId", @@ -3684,6 +3898,10 @@ extension Components { self.blocks, forKey: .blocks ) + try container.encodeIfPresent( + self.call, + forKey: .call + ) try container.encodeIfPresent( self.communication, forKey: .communication @@ -4392,6 +4610,83 @@ extension Components { public var attachments: Components.Schemas.EventGroupChatSnapshot.MessagesPayloadPayload.AttachmentsPayload? /// - Remark: Generated from `#/components/schemas/EventGroupChatSnapshot/MessagesPayload/blocks`. public var blocks: OpenAPIRuntime.OpenAPIValueContainer? + /// - Remark: Generated from `#/components/schemas/EventGroupChatSnapshot/MessagesPayload/call`. + public struct CallPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/EventGroupChatSnapshot/MessagesPayload/call/callId`. + public var callId: Swift.String + /// - Remark: Generated from `#/components/schemas/EventGroupChatSnapshot/MessagesPayload/call/callee`. + public var callee: Swift.String? + /// - Remark: Generated from `#/components/schemas/EventGroupChatSnapshot/MessagesPayload/call/direction`. + @frozen public enum DirectionPayload: String, Codable, Hashable, Sendable, CaseIterable { + case inbound = "inbound" + case outbound = "outbound" + } + /// - Remark: Generated from `#/components/schemas/EventGroupChatSnapshot/MessagesPayload/call/direction`. + public var direction: Components.Schemas.EventGroupChatSnapshot.MessagesPayloadPayload.CallPayload.DirectionPayload + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `CallPayload`. + /// + /// - Parameters: + /// - callId: + /// - callee: + /// - direction: + /// - additionalProperties: A container of undocumented properties. + public init( + callId: Swift.String, + callee: Swift.String? = nil, + direction: Components.Schemas.EventGroupChatSnapshot.MessagesPayloadPayload.CallPayload.DirectionPayload, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() + ) { + self.callId = callId + self.callee = callee + self.direction = direction + self.additionalProperties = additionalProperties + } + public enum CodingKeys: String, CodingKey { + case callId + case callee + case direction + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.callId = try container.decode( + Swift.String.self, + forKey: .callId + ) + self.callee = try container.decodeIfPresent( + Swift.String.self, + forKey: .callee + ) + self.direction = try container.decode( + Components.Schemas.EventGroupChatSnapshot.MessagesPayloadPayload.CallPayload.DirectionPayload.self, + forKey: .direction + ) + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "callId", + "callee", + "direction" + ]) + } + public func encode(to encoder: any Swift.Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode( + self.callId, + forKey: .callId + ) + try container.encodeIfPresent( + self.callee, + forKey: .callee + ) + try container.encode( + self.direction, + forKey: .direction + ) + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/components/schemas/EventGroupChatSnapshot/MessagesPayload/call`. + public var call: Components.Schemas.EventGroupChatSnapshot.MessagesPayloadPayload.CallPayload? /// - Remark: Generated from `#/components/schemas/EventGroupChatSnapshot/MessagesPayload/communication`. public struct CommunicationPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/EventGroupChatSnapshot/MessagesPayload/communication/executionId`. @@ -4871,6 +5166,7 @@ extension Components { /// - Parameters: /// - attachments: /// - blocks: + /// - call: /// - communication: /// - content: /// - entryId: @@ -4894,6 +5190,7 @@ extension Components { public init( attachments: Components.Schemas.EventGroupChatSnapshot.MessagesPayloadPayload.AttachmentsPayload? = nil, blocks: OpenAPIRuntime.OpenAPIValueContainer? = nil, + call: Components.Schemas.EventGroupChatSnapshot.MessagesPayloadPayload.CallPayload? = nil, communication: Components.Schemas.EventGroupChatSnapshot.MessagesPayloadPayload.CommunicationPayload? = nil, content: Swift.String, entryId: Swift.String, @@ -4917,6 +5214,7 @@ extension Components { ) { self.attachments = attachments self.blocks = blocks + self.call = call self.communication = communication self.content = content self.entryId = entryId @@ -4941,6 +5239,7 @@ extension Components { public enum CodingKeys: String, CodingKey { case attachments case blocks + case call case communication case content case entryId @@ -4971,6 +5270,10 @@ extension Components { OpenAPIRuntime.OpenAPIValueContainer.self, forKey: .blocks ) + self.call = try container.decodeIfPresent( + Components.Schemas.EventGroupChatSnapshot.MessagesPayloadPayload.CallPayload.self, + forKey: .call + ) self.communication = try container.decodeIfPresent( Components.Schemas.EventGroupChatSnapshot.MessagesPayloadPayload.CommunicationPayload.self, forKey: .communication @@ -5050,6 +5353,7 @@ extension Components { additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ "attachments", "blocks", + "call", "communication", "content", "entryId", @@ -5081,6 +5385,10 @@ extension Components { self.blocks, forKey: .blocks ) + try container.encodeIfPresent( + self.call, + forKey: .call + ) try container.encodeIfPresent( self.communication, forKey: .communication @@ -7044,7 +7352,7 @@ extension Components { public struct MessageOrigin: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/MessageOrigin/agentId`. public var agentId: Swift.String? - /// Where the message came from: owner, task, event (an event automation's prompt), script (a script task's result), credential, bot, or group. Clients may receive other values later. + /// Where the message came from: owner, task, event (an event automation's prompt), script (a script task's result), credential, bot, group, call (a voice gateway call ended, which starts a bot turn), call_request (the owner declined a call request), or callee (what the callee of an outside call said, in that call's conversation only). Clients may receive other values later. /// /// - Remark: Generated from `#/components/schemas/MessageOrigin/kind`. public var kind: Swift.String @@ -7054,7 +7362,7 @@ extension Components { /// /// - Remark: Generated from `#/components/schemas/MessageOrigin/source`. public var source: Swift.String? - /// On an owner message sent through a message gateway: the gateway's ID, such as `discord`. + /// On an owner message sent through a message gateway: the gateway's ID, such as `discord`. On a spoken message from a voice gateway call: `voice`. /// /// - Remark: Generated from `#/components/schemas/MessageOrigin/via`. public var via: Swift.String? @@ -7062,10 +7370,10 @@ extension Components { /// /// - Parameters: /// - agentId: - /// - kind: Where the message came from: owner, task, event (an event automation's prompt), script (a script task's result), credential, bot, or group. Clients may receive other values later. + /// - kind: Where the message came from: owner, task, event (an event automation's prompt), script (a script task's result), credential, bot, group, call (a voice gateway call ended, which starts a bot turn), call_request (the owner declined a call request), or callee (what the callee of an outside call said, in that call's conversation only). Clients may receive other values later. /// - name: /// - source: On an event automation's message: the name of the event source whose event started it. - /// - via: On an owner message sent through a message gateway: the gateway's ID, such as `discord`. + /// - via: On an owner message sent through a message gateway: the gateway's ID, such as `discord`. On a spoken message from a voice gateway call: `voice`. public init( agentId: Swift.String? = nil, kind: Swift.String, @@ -8129,7 +8437,7 @@ extension Components { } /// - Remark: Generated from `#/components/schemas/ReplyEvent/type`. public var _type: Components.Schemas.ReplyEvent._TypePayload - /// Set when the bot waits for the owner's answer: approval (a desktop job action held by an intent check), credential, or login (a request the owner saves or declines). Clients may receive other values later. + /// Set when the bot waits for the owner's answer: approval (a desktop job action held by an intent check, or a call request), credential, or login (a request the owner saves or declines). Clients may receive other values later. /// /// - Remark: Generated from `#/components/schemas/ReplyEvent/waitingFor`. @frozen public enum WaitingForPayload: String, Codable, Hashable, Sendable, CaseIterable { @@ -8137,7 +8445,7 @@ extension Components { case credential = "credential" case login = "login" } - /// Set when the bot waits for the owner's answer: approval (a desktop job action held by an intent check), credential, or login (a request the owner saves or declines). Clients may receive other values later. + /// Set when the bot waits for the owner's answer: approval (a desktop job action held by an intent check, or a call request), credential, or login (a request the owner saves or declines). Clients may receive other values later. /// /// - Remark: Generated from `#/components/schemas/ReplyEvent/waitingFor`. public var waitingFor: Components.Schemas.ReplyEvent.WaitingForPayload? @@ -8157,7 +8465,7 @@ extension Components { /// - preview: /// - serverId: /// - _type: - /// - waitingFor: Set when the bot waits for the owner's answer: approval (a desktop job action held by an intent check), credential, or login (a request the owner saves or declines). Clients may receive other values later. + /// - waitingFor: Set when the bot waits for the owner's answer: approval (a desktop job action held by an intent check, or a call request), credential, or login (a request the owner saves or declines). Clients may receive other values later. public init( agentId: Swift.String, agentName: Swift.String, @@ -9197,6 +9505,39 @@ extension Components { case removed } } + /// - Remark: Generated from `#/components/schemas/SpokenExecution`. + public struct SpokenExecution: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/SpokenExecution/execution`. + public var execution: Components.Schemas.Execution + /// True when the bot asked to end the call: hang up once the reply was read aloud, then report the end with reason hungUp. + /// + /// - Remark: Generated from `#/components/schemas/SpokenExecution/hangUp`. + public var hangUp: Swift.Bool + /// The bot's reply, read by the message's submission; null unless the execution's status is done. A failed or cancelled execution never gets one. + /// + /// - Remark: Generated from `#/components/schemas/SpokenExecution/reply`. + public var reply: [Swift.String]? + /// Creates a new `SpokenExecution`. + /// + /// - Parameters: + /// - execution: + /// - hangUp: True when the bot asked to end the call: hang up once the reply was read aloud, then report the end with reason hungUp. + /// - reply: The bot's reply, read by the message's submission; null unless the execution's status is done. A failed or cancelled execution never gets one. + public init( + execution: Components.Schemas.Execution, + hangUp: Swift.Bool, + reply: [Swift.String]? = nil + ) { + self.execution = execution + self.hangUp = hangUp + self.reply = reply + } + public enum CodingKeys: String, CodingKey { + case execution + case hangUp + case reply + } + } /// - Remark: Generated from `#/components/schemas/TranscriptMessage`. public struct TranscriptMessage: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/TranscriptMessage/attachments`. @@ -9205,6 +9546,52 @@ extension Components { /// /// - Remark: Generated from `#/components/schemas/TranscriptMessage/blocks`. public var blocks: OpenAPIRuntime.OpenAPIValueContainer? + /// On a `call-started` or `call-ended` event: the call. + /// + /// - Remark: Generated from `#/components/schemas/TranscriptMessage/call`. + public struct CallPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/TranscriptMessage/call/callId`. + public var callId: Swift.String + /// Set on an outside call, which the bot placed to someone other than the owner: who it called. A call-started event then reads as the bot calling the callee, its content the opening. + /// + /// - Remark: Generated from `#/components/schemas/TranscriptMessage/call/callee`. + public var callee: Swift.String? + /// outbound: the bot called the owner, or the callee of an outside call. + /// + /// - Remark: Generated from `#/components/schemas/TranscriptMessage/call/direction`. + @frozen public enum DirectionPayload: String, Codable, Hashable, Sendable, CaseIterable { + case inbound = "inbound" + case outbound = "outbound" + } + /// outbound: the bot called the owner, or the callee of an outside call. + /// + /// - Remark: Generated from `#/components/schemas/TranscriptMessage/call/direction`. + public var direction: Components.Schemas.TranscriptMessage.CallPayload.DirectionPayload + /// Creates a new `CallPayload`. + /// + /// - Parameters: + /// - callId: + /// - callee: Set on an outside call, which the bot placed to someone other than the owner: who it called. A call-started event then reads as the bot calling the callee, its content the opening. + /// - direction: outbound: the bot called the owner, or the callee of an outside call. + public init( + callId: Swift.String, + callee: Swift.String? = nil, + direction: Components.Schemas.TranscriptMessage.CallPayload.DirectionPayload + ) { + self.callId = callId + self.callee = callee + self.direction = direction + } + public enum CodingKeys: String, CodingKey { + case callId + case callee + case direction + } + } + /// On a `call-started` or `call-ended` event: the call. + /// + /// - Remark: Generated from `#/components/schemas/TranscriptMessage/call`. + public var call: Components.Schemas.TranscriptMessage.CallPayload? /// - Remark: Generated from `#/components/schemas/TranscriptMessage/communication`. public var communication: Components.Schemas.BotCommunication? /// - Remark: Generated from `#/components/schemas/TranscriptMessage/content`. @@ -9291,6 +9678,8 @@ extension Components { /// /// - Remark: Generated from `#/components/schemas/TranscriptMessage/jobQuestion`. public var jobQuestion: Components.Schemas.TranscriptMessage.JobQuestionPayload? + /// The entry's kind. Events include bot-message, job-question, held-action, job-failure, reset, compaction, call-started (content: the greeting of a call the bot placed, or Call started), and call-ended (content: how the call ended, when it woke no bot turn). Clients may receive other values later. + /// /// - Remark: Generated from `#/components/schemas/TranscriptMessage/kind`. public var kind: Swift.String? /// - Remark: Generated from `#/components/schemas/TranscriptMessage/origin`. @@ -9351,6 +9740,7 @@ extension Components { /// - Parameters: /// - attachments: /// - blocks: Provider content blocks, with inline image bytes removed. + /// - call: On a `call-started` or `call-ended` event: the call. /// - communication: /// - content: /// - entryId: @@ -9358,7 +9748,7 @@ extension Components { /// - id: /// - isError: /// - jobQuestion: On a `job-question` event: the job that asked the owner the question in `content`. Whether it still waits is the job's `question` in its listing. - /// - kind: + /// - kind: The entry's kind. Events include bot-message, job-question, held-action, job-failure, reset, compaction, call-started (content: the greeting of a call the bot placed, or Call started), and call-ended (content: how the call ended, when it woke no bot turn). Clients may receive other values later. /// - origin: /// - replyPreview: /// - replyTo: @@ -9373,6 +9763,7 @@ extension Components { public init( attachments: [Components.Schemas.AttachmentInfo]? = nil, blocks: OpenAPIRuntime.OpenAPIValueContainer? = nil, + call: Components.Schemas.TranscriptMessage.CallPayload? = nil, communication: Components.Schemas.BotCommunication? = nil, content: Swift.String, entryId: Swift.String, @@ -9395,6 +9786,7 @@ extension Components { ) { self.attachments = attachments self.blocks = blocks + self.call = call self.communication = communication self.content = content self.entryId = entryId @@ -9418,6 +9810,7 @@ extension Components { public enum CodingKeys: String, CodingKey { case attachments case blocks + case call case communication case content case entryId @@ -9549,5 +9942,315 @@ extension Components { case visionModel } } + /// The call's turn was aborted or its wait ran out: hang up if it still rings. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallCancelEvent`. + public struct VoiceCallCancelEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/VoiceCallCancelEvent/callId`. + public var callId: Swift.String + /// Creates a new `VoiceCallCancelEvent`. + /// + /// - Parameters: + /// - callId: + public init(callId: Swift.String) { + self.callId = callId + } + public enum CodingKeys: String, CodingKey { + case callId + } + } + /// A bot asks to call the owner, or someone else after the owner approved it. Sent only to a stream opened with calls=true, and sent again after a reconnect until the call is acknowledged; ignore a callId you already dial. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallEvent`. + public struct VoiceCallEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/VoiceCallEvent/callId`. + public var callId: Swift.String + /// What the bot says when the call is answered: for an outside call, the opening the owner approved, to be spoken verbatim. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallEvent/greeting`. + public var greeting: Swift.String + /// Who is called: owner, or outside, someone other than the owner after the owner approved the bot's call request. Absent means owner. Dial an outside call only when the voice gateway's own config allows it, else report it failed. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallEvent/party`. + @frozen public enum PartyPayload: String, Codable, Hashable, Sendable, CaseIterable { + case owner = "owner" + case outside = "outside" + } + /// Who is called: owner, or outside, someone other than the owner after the owner approved the bot's call request. Absent means owner. Dial an outside call only when the voice gateway's own config allows it, else report it failed. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallEvent/party`. + public var party: Components.Schemas.VoiceCallEvent.PartyPayload? + /// The number to dial: for a call to the owner, the first in the owner's list; for an outside call, the number the owner approved, digits with an optional leading +. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallEvent/to`. + public var to: Swift.String + /// The line the call is placed from. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallEvent/username`. + public var username: Swift.String + /// Creates a new `VoiceCallEvent`. + /// + /// - Parameters: + /// - callId: + /// - greeting: What the bot says when the call is answered: for an outside call, the opening the owner approved, to be spoken verbatim. + /// - party: Who is called: owner, or outside, someone other than the owner after the owner approved the bot's call request. Absent means owner. Dial an outside call only when the voice gateway's own config allows it, else report it failed. + /// - to: The number to dial: for a call to the owner, the first in the owner's list; for an outside call, the number the owner approved, digits with an optional leading +. + /// - username: The line the call is placed from. + public init( + callId: Swift.String, + greeting: Swift.String, + party: Components.Schemas.VoiceCallEvent.PartyPayload? = nil, + to: Swift.String, + username: Swift.String + ) { + self.callId = callId + self.greeting = greeting + self.party = party + self.to = to + self.username = username + } + public enum CodingKeys: String, CodingKey { + case callId + case greeting + case party + case to + case username + } + } + /// - Remark: Generated from `#/components/schemas/VoiceCallReport`. + @frozen public enum VoiceCallReport: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case1`. + public struct Case1Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case1/error`. + public var error: Swift.String? + /// For a call a bot placed: ringing acknowledges it as soon as dialing starts; the others settle it. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case1/outcome`. + @frozen public enum OutcomePayload: String, Codable, Hashable, Sendable, CaseIterable { + case ringing = "ringing" + case answered = "answered" + case unanswered = "unanswered" + case busy = "busy" + case failed = "failed" + } + /// For a call a bot placed: ringing acknowledges it as soon as dialing starts; the others settle it. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case1/outcome`. + public var outcome: Components.Schemas.VoiceCallReport.Case1Payload.OutcomePayload + /// Creates a new `Case1Payload`. + /// + /// - Parameters: + /// - error: + /// - outcome: For a call a bot placed: ringing acknowledges it as soon as dialing starts; the others settle it. + public init( + error: Swift.String? = nil, + outcome: Components.Schemas.VoiceCallReport.Case1Payload.OutcomePayload + ) { + self.error = error + self.outcome = outcome + } + public enum CodingKeys: String, CodingKey { + case error + case outcome + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.error = try container.decodeIfPresent( + Swift.String.self, + forKey: .error + ) + self.outcome = try container.decode( + Components.Schemas.VoiceCallReport.Case1Payload.OutcomePayload.self, + forKey: .outcome + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "error", + "outcome" + ]) + } + } + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case1`. + case case1(Components.Schemas.VoiceCallReport.Case1Payload) + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case2`. + public struct Case2Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case2/error`. + public var error: Swift.String? + /// A started call ended. Accepted for an active, ended, or unknown call; an unknown one can't be started afterwards. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case2/outcome`. + @frozen public enum OutcomePayload: String, Codable, Hashable, Sendable, CaseIterable { + case ended = "ended" + } + /// A started call ended. Accepted for an active, ended, or unknown call; an unknown one can't be started afterwards. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case2/outcome`. + public var outcome: Components.Schemas.VoiceCallReport.Case2Payload.OutcomePayload + /// hungUp: the media ended or the dialog closed. maxDuration: the call reached its maximum length. failed: any other error. stopping: the voice gateway shut down. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case2/reason`. + @frozen public enum ReasonPayload: String, Codable, Hashable, Sendable, CaseIterable { + case hungUp = "hungUp" + case maxDuration = "maxDuration" + case failed = "failed" + case stopping = "stopping" + } + /// hungUp: the media ended or the dialog closed. maxDuration: the call reached its maximum length. failed: any other error. stopping: the voice gateway shut down. + /// + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case2/reason`. + public var reason: Components.Schemas.VoiceCallReport.Case2Payload.ReasonPayload + /// Creates a new `Case2Payload`. + /// + /// - Parameters: + /// - error: + /// - outcome: A started call ended. Accepted for an active, ended, or unknown call; an unknown one can't be started afterwards. + /// - reason: hungUp: the media ended or the dialog closed. maxDuration: the call reached its maximum length. failed: any other error. stopping: the voice gateway shut down. + public init( + error: Swift.String? = nil, + outcome: Components.Schemas.VoiceCallReport.Case2Payload.OutcomePayload, + reason: Components.Schemas.VoiceCallReport.Case2Payload.ReasonPayload + ) { + self.error = error + self.outcome = outcome + self.reason = reason + } + public enum CodingKeys: String, CodingKey { + case error + case outcome + case reason + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.error = try container.decodeIfPresent( + Swift.String.self, + forKey: .error + ) + self.outcome = try container.decode( + Components.Schemas.VoiceCallReport.Case2Payload.OutcomePayload.self, + forKey: .outcome + ) + self.reason = try container.decode( + Components.Schemas.VoiceCallReport.Case2Payload.ReasonPayload.self, + forKey: .reason + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "error", + "outcome", + "reason" + ]) + } + } + /// - Remark: Generated from `#/components/schemas/VoiceCallReport/case2`. + case case2(Components.Schemas.VoiceCallReport.Case2Payload) + public init(from decoder: any Swift.Decoder) throws { + var errors: [any Swift.Error] = [] + do { + self = .case1(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .case2(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Swift.Encoder) throws { + switch self { + case let .case1(value): + try value.encode(to: encoder) + case let .case2(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent`. + public struct VoiceGatewayConfigEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent/LinesPayload`. + public struct LinesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent/LinesPayload/botId`. + public var botId: Swift.String + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent/LinesPayload/botName`. + public var botName: Swift.String + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent/LinesPayload/callsOwner`. + public var callsOwner: Swift.Bool + /// The line's display name, or the bot's name. + /// + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent/LinesPayload/displayName`. + public var displayName: Swift.String + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent/LinesPayload/username`. + public var username: Swift.String + /// Creates a new `LinesPayloadPayload`. + /// + /// - Parameters: + /// - botId: + /// - botName: + /// - callsOwner: + /// - displayName: The line's display name, or the bot's name. + /// - username: + public init( + botId: Swift.String, + botName: Swift.String, + callsOwner: Swift.Bool, + displayName: Swift.String, + username: Swift.String + ) { + self.botId = botId + self.botName = botName + self.callsOwner = callsOwner + self.displayName = displayName + self.username = username + } + public enum CodingKeys: String, CodingKey { + case botId + case botName + case callsOwner + case displayName + case username + } + } + /// Lines whose bot is enabled; empty while the voice gateway is disabled. + /// + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent/lines`. + public typealias LinesPayload = [Components.Schemas.VoiceGatewayConfigEvent.LinesPayloadPayload] + /// Lines whose bot is enabled; empty while the voice gateway is disabled. + /// + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent/lines`. + public var lines: Components.Schemas.VoiceGatewayConfigEvent.LinesPayload + /// - Remark: Generated from `#/components/schemas/VoiceGatewayConfigEvent/ownerNumbers`. + public var ownerNumbers: [Swift.String] + /// Creates a new `VoiceGatewayConfigEvent`. + /// + /// - Parameters: + /// - enabled: + /// - lines: Lines whose bot is enabled; empty while the voice gateway is disabled. + /// - ownerNumbers: + public init( + enabled: Swift.Bool, + lines: Components.Schemas.VoiceGatewayConfigEvent.LinesPayload, + ownerNumbers: [Swift.String] + ) { + self.enabled = enabled + self.lines = lines + self.ownerNumbers = ownerNumbers + } + public enum CodingKeys: String, CodingKey { + case enabled + case lines + case ownerNumbers + } + } + /// Another connection with the same voice gateway token took over; sent before this stream closes. + /// + /// - Remark: Generated from `#/components/schemas/VoiceGatewayReplacedEvent`. + public typealias VoiceGatewayReplacedEvent = OpenAPIRuntime.OpenAPIObjectContainer } } diff --git a/apfelkern/Sources/apfelkern/Generated/Types+Operations.swift b/apfelkern/Sources/apfelkern/Generated/Types+Operations.swift index 9e7b777..e78390e 100644 --- a/apfelkern/Sources/apfelkern/Generated/Types+Operations.swift +++ b/apfelkern/Sources/apfelkern/Generated/Types+Operations.swift @@ -113,6 +113,156 @@ public enum Operations { } } } + /// This document, generated by the running server. + /// + /// - Remark: HTTP `GET /openapi.json`. + /// - Remark: Generated from `#/paths//openapi.json/get(getOpenAPI)`. + public enum GetOpenAPI { + public static let id: Swift.String = "getOpenAPI" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/openapi.json/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.GetOpenAPI.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + public init(headers: Operations.GetOpenAPI.Input.Headers = .init()) { + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/openapi.json/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/openapi.json/GET/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/openapi.json/GET/responses/200/content/json/openapi`. + public var openapi: Swift.String + /// A container of undocumented properties. + public var additionalProperties: [String: OpenAPIRuntime.OpenAPIValueContainer] + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - openapi: + /// - additionalProperties: A container of undocumented properties. + public init( + openapi: Swift.String, + additionalProperties: [String: OpenAPIRuntime.OpenAPIValueContainer] = .init() + ) { + self.openapi = openapi + self.additionalProperties = additionalProperties + } + public enum CodingKeys: String, CodingKey { + case openapi + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.openapi = try container.decode( + Swift.String.self, + forKey: .openapi + ) + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "openapi" + ]) + } + public func encode(to encoder: any Swift.Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode( + self.openapi, + forKey: .openapi + ) + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/openapi.json/GET/responses/200/content/application\/json`. + case json(Operations.GetOpenAPI.Output.Ok.Body.JsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.GetOpenAPI.Output.Ok.Body.JsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetOpenAPI.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetOpenAPI.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//openapi.json/get(getOpenAPI)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.GetOpenAPI.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetOpenAPI.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// Bots' tool calls, tool results, MCP calls, and bot messages, and skill and memory changes, newest first. Page with `cursor` set to the previous page's `nextCursor`. A page may hold fewer than `limit` items while `hasMore` is true. /// /// - Remark: HTTP `GET /v1/activity/feed`. @@ -12706,14 +12856,16 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/agents/{id}/chat`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)`. - public enum GetChat { - public static let id: Swift.String = "getChat" + /// The bot's call requests, newest first: its proposals to phone someone other than the owner, and how each call went. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/call-requests`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)`. + public enum ListCallRequests { + public static let id: Swift.String = "listCallRequests" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -12723,59 +12875,43 @@ public enum Operations { self.id = id } } - public var path: Operations.GetChat.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/query/limit`. - public var limit: Swift.Int? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - public init(limit: Swift.Int? = nil) { - self.limit = limit - } - } - public var query: Operations.GetChat.Input.Query - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/header`. + public var path: Operations.ListCallRequests.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetChat.Input.Headers + public var headers: Operations.ListCallRequests.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: public init( - path: Operations.GetChat.Input.Path, - query: Operations.GetChat.Input.Query = .init(), - headers: Operations.GetChat.Input.Headers = .init() + path: Operations.ListCallRequests.Input.Path, + headers: Operations.ListCallRequests.Input.Headers = .init() ) { self.path = path - self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/200/content/application\/json`. - case json(Components.Schemas.ChatSnapshot) + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/200/content/application\/json`. + case json([Components.Schemas.CallRequest]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.ChatSnapshot { + public var json: [Components.Schemas.CallRequest] { get throws { switch self { case let .json(body): @@ -12785,26 +12921,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChat.Output.Ok.Body + public var body: Operations.ListCallRequests.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChat.Output.Ok.Body) { + public init(body: Operations.ListCallRequests.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.GetChat.Output.Ok) + case ok(Operations.ListCallRequests.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.GetChat.Output.Ok { + public var ok: Operations.ListCallRequests.Output.Ok { get throws { switch self { case let .ok(response): @@ -12818,9 +12954,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -12836,26 +12972,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChat.Output.BadRequest.Body + public var body: Operations.ListCallRequests.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChat.Output.BadRequest.Body) { + public init(body: Operations.ListCallRequests.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetChat.Output.BadRequest) + case badRequest(Operations.ListCallRequests.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetChat.Output.BadRequest { + public var badRequest: Operations.ListCallRequests.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -12869,9 +13005,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -12887,26 +13023,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChat.Output.Unauthorized.Body + public var body: Operations.ListCallRequests.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChat.Output.Unauthorized.Body) { + public init(body: Operations.ListCallRequests.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetChat.Output.Unauthorized) + case unauthorized(Operations.ListCallRequests.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetChat.Output.Unauthorized { + public var unauthorized: Operations.ListCallRequests.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -12920,9 +13056,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -12938,26 +13074,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChat.Output.NotFound.Body + public var body: Operations.ListCallRequests.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChat.Output.NotFound.Body) { + public init(body: Operations.ListCallRequests.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetChat.Output.NotFound) + case notFound(Operations.ListCallRequests.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetChat.Output.NotFound { + public var notFound: Operations.ListCallRequests.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -12971,9 +13107,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -12989,26 +13125,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChat.Output.MethodNotAllowed.Body + public var body: Operations.ListCallRequests.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChat.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListCallRequests.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetChat.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListCallRequests.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetChat.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListCallRequests.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -13022,9 +13158,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -13040,26 +13176,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChat.Output.Conflict.Body + public var body: Operations.ListCallRequests.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChat.Output.Conflict.Body) { + public init(body: Operations.ListCallRequests.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetChat.Output.Conflict) + case conflict(Operations.ListCallRequests.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetChat.Output.Conflict { + public var conflict: Operations.ListCallRequests.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -13073,9 +13209,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -13091,26 +13227,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChat.Output.ContentTooLarge.Body + public var body: Operations.ListCallRequests.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChat.Output.ContentTooLarge.Body) { + public init(body: Operations.ListCallRequests.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetChat.Output.ContentTooLarge) + case contentTooLarge(Operations.ListCallRequests.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetChat.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListCallRequests.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -13124,9 +13260,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -13142,26 +13278,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChat.Output.InternalServerError.Body + public var body: Operations.ListCallRequests.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChat.Output.InternalServerError.Body) { + public init(body: Operations.ListCallRequests.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetChat.Output.InternalServerError) + case internalServerError(Operations.ListCallRequests.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetChat.Output.InternalServerError { + public var internalServerError: Operations.ListCallRequests.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -13175,9 +13311,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -13193,26 +13329,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChat.Output.ServiceUnavailable.Body + public var body: Operations.ListCallRequests.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChat.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListCallRequests.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetChat.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListCallRequests.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetChat.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListCallRequests.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -13262,83 +13398,69 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/agents/{id}/chat/history`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)`. - public enum GetChatHistory { - public static let id: Swift.String = "getChatHistory" + /// Approves a pending call request and dials at once; returns once the voice gateway was asked to call, with the status calling. 409, with the request still pending, when the request is not pending, the number no longer passes the number rules, calls to other people are switched off for the line, no voice gateway that places calls is connected, or the line has a call. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/call-requests/{requestId}/approve`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)`. + public enum ApproveCallRequest { + public static let id: Swift.String = "approveCallRequest" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/path/requestId`. + public var requestId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.GetChatHistory.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/query/limit`. - public var limit: Swift.Int? - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/query/before`. - public var before: Swift.String? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - /// - before: + /// - requestId: public init( - limit: Swift.Int? = nil, - before: Swift.String? = nil + id: Swift.String, + requestId: Swift.String ) { - self.limit = limit - self.before = before + self.id = id + self.requestId = requestId } } - public var query: Operations.GetChatHistory.Input.Query - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/header`. + public var path: Operations.ApproveCallRequest.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetChatHistory.Input.Headers + public var headers: Operations.ApproveCallRequest.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: public init( - path: Operations.GetChatHistory.Input.Path, - query: Operations.GetChatHistory.Input.Query = .init(), - headers: Operations.GetChatHistory.Input.Headers = .init() + path: Operations.ApproveCallRequest.Input.Path, + headers: Operations.ApproveCallRequest.Input.Headers = .init() ) { self.path = path - self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/200/content/application\/json`. - case json(Components.Schemas.TranscriptPage) + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/200/content/application\/json`. + case json(Components.Schemas.CallRequest) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.TranscriptPage { + public var json: Components.Schemas.CallRequest { get throws { switch self { case let .json(body): @@ -13348,26 +13470,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChatHistory.Output.Ok.Body + public var body: Operations.ApproveCallRequest.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChatHistory.Output.Ok.Body) { + public init(body: Operations.ApproveCallRequest.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.GetChatHistory.Output.Ok) + case ok(Operations.ApproveCallRequest.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.GetChatHistory.Output.Ok { + public var ok: Operations.ApproveCallRequest.Output.Ok { get throws { switch self { case let .ok(response): @@ -13381,9 +13503,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -13399,26 +13521,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChatHistory.Output.BadRequest.Body + public var body: Operations.ApproveCallRequest.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChatHistory.Output.BadRequest.Body) { + public init(body: Operations.ApproveCallRequest.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetChatHistory.Output.BadRequest) + case badRequest(Operations.ApproveCallRequest.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetChatHistory.Output.BadRequest { + public var badRequest: Operations.ApproveCallRequest.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -13432,9 +13554,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -13450,26 +13572,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChatHistory.Output.Unauthorized.Body + public var body: Operations.ApproveCallRequest.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChatHistory.Output.Unauthorized.Body) { + public init(body: Operations.ApproveCallRequest.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetChatHistory.Output.Unauthorized) + case unauthorized(Operations.ApproveCallRequest.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetChatHistory.Output.Unauthorized { + public var unauthorized: Operations.ApproveCallRequest.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -13483,9 +13605,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -13501,26 +13623,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChatHistory.Output.NotFound.Body + public var body: Operations.ApproveCallRequest.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChatHistory.Output.NotFound.Body) { + public init(body: Operations.ApproveCallRequest.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetChatHistory.Output.NotFound) + case notFound(Operations.ApproveCallRequest.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetChatHistory.Output.NotFound { + public var notFound: Operations.ApproveCallRequest.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -13534,9 +13656,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -13552,26 +13674,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChatHistory.Output.MethodNotAllowed.Body + public var body: Operations.ApproveCallRequest.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChatHistory.Output.MethodNotAllowed.Body) { + public init(body: Operations.ApproveCallRequest.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetChatHistory.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ApproveCallRequest.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetChatHistory.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ApproveCallRequest.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -13585,9 +13707,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -13603,26 +13725,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChatHistory.Output.Conflict.Body + public var body: Operations.ApproveCallRequest.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChatHistory.Output.Conflict.Body) { + public init(body: Operations.ApproveCallRequest.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetChatHistory.Output.Conflict) + case conflict(Operations.ApproveCallRequest.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetChatHistory.Output.Conflict { + public var conflict: Operations.ApproveCallRequest.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -13636,9 +13758,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -13654,26 +13776,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChatHistory.Output.ContentTooLarge.Body + public var body: Operations.ApproveCallRequest.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChatHistory.Output.ContentTooLarge.Body) { + public init(body: Operations.ApproveCallRequest.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetChatHistory.Output.ContentTooLarge) + case contentTooLarge(Operations.ApproveCallRequest.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetChatHistory.Output.ContentTooLarge { + public var contentTooLarge: Operations.ApproveCallRequest.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -13687,9 +13809,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -13705,26 +13827,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChatHistory.Output.InternalServerError.Body + public var body: Operations.ApproveCallRequest.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChatHistory.Output.InternalServerError.Body) { + public init(body: Operations.ApproveCallRequest.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetChatHistory.Output.InternalServerError) + case internalServerError(Operations.ApproveCallRequest.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetChatHistory.Output.InternalServerError { + public var internalServerError: Operations.ApproveCallRequest.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -13738,9 +13860,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/approve/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -13756,26 +13878,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetChatHistory.Output.ServiceUnavailable.Body + public var body: Operations.ApproveCallRequest.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetChatHistory.Output.ServiceUnavailable.Body) { + public init(body: Operations.ApproveCallRequest.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetChatHistory.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ApproveCallRequest.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetChatHistory.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ApproveCallRequest.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -13825,44 +13947,53 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/agents/{id}/coding-jobs`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)`. - public enum ListCodingJobs { - public static let id: Swift.String = "listCodingJobs" + /// Declines a pending call request; the bot gets a notice. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/call-requests/{requestId}/decline`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)`. + public enum DeclineCallRequest { + public static let id: Swift.String = "declineCallRequest" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/path/requestId`. + public var requestId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - requestId: + public init( + id: Swift.String, + requestId: Swift.String + ) { self.id = id + self.requestId = requestId } } - public var path: Operations.ListCodingJobs.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/header`. + public var path: Operations.DeclineCallRequest.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListCodingJobs.Input.Headers + public var headers: Operations.DeclineCallRequest.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.ListCodingJobs.Input.Path, - headers: Operations.ListCodingJobs.Input.Headers = .init() + path: Operations.DeclineCallRequest.Input.Path, + headers: Operations.DeclineCallRequest.Input.Headers = .init() ) { self.path = path self.headers = headers @@ -13870,15 +14001,15 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/200/content/application\/json`. - case json(Components.Schemas.CodingJobs) + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/200/content/application\/json`. + case json(Components.Schemas.CallRequest) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.CodingJobs { + public var json: Components.Schemas.CallRequest { get throws { switch self { case let .json(body): @@ -13888,26 +14019,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListCodingJobs.Output.Ok.Body + public var body: Operations.DeclineCallRequest.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListCodingJobs.Output.Ok.Body) { + public init(body: Operations.DeclineCallRequest.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListCodingJobs.Output.Ok) + case ok(Operations.DeclineCallRequest.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListCodingJobs.Output.Ok { + public var ok: Operations.DeclineCallRequest.Output.Ok { get throws { switch self { case let .ok(response): @@ -13921,9 +14052,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -13939,26 +14070,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListCodingJobs.Output.BadRequest.Body + public var body: Operations.DeclineCallRequest.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListCodingJobs.Output.BadRequest.Body) { + public init(body: Operations.DeclineCallRequest.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListCodingJobs.Output.BadRequest) + case badRequest(Operations.DeclineCallRequest.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListCodingJobs.Output.BadRequest { + public var badRequest: Operations.DeclineCallRequest.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -13972,9 +14103,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -13990,26 +14121,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListCodingJobs.Output.Unauthorized.Body + public var body: Operations.DeclineCallRequest.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListCodingJobs.Output.Unauthorized.Body) { + public init(body: Operations.DeclineCallRequest.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListCodingJobs.Output.Unauthorized) + case unauthorized(Operations.DeclineCallRequest.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListCodingJobs.Output.Unauthorized { + public var unauthorized: Operations.DeclineCallRequest.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -14023,9 +14154,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14041,26 +14172,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListCodingJobs.Output.NotFound.Body + public var body: Operations.DeclineCallRequest.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListCodingJobs.Output.NotFound.Body) { + public init(body: Operations.DeclineCallRequest.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListCodingJobs.Output.NotFound) + case notFound(Operations.DeclineCallRequest.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListCodingJobs.Output.NotFound { + public var notFound: Operations.DeclineCallRequest.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -14074,9 +14205,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14092,26 +14223,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListCodingJobs.Output.MethodNotAllowed.Body + public var body: Operations.DeclineCallRequest.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListCodingJobs.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeclineCallRequest.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListCodingJobs.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeclineCallRequest.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListCodingJobs.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeclineCallRequest.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -14125,9 +14256,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14143,26 +14274,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListCodingJobs.Output.Conflict.Body + public var body: Operations.DeclineCallRequest.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListCodingJobs.Output.Conflict.Body) { + public init(body: Operations.DeclineCallRequest.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListCodingJobs.Output.Conflict) + case conflict(Operations.DeclineCallRequest.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListCodingJobs.Output.Conflict { + public var conflict: Operations.DeclineCallRequest.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -14176,9 +14307,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -14194,26 +14325,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListCodingJobs.Output.ContentTooLarge.Body + public var body: Operations.DeclineCallRequest.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListCodingJobs.Output.ContentTooLarge.Body) { + public init(body: Operations.DeclineCallRequest.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListCodingJobs.Output.ContentTooLarge) + case contentTooLarge(Operations.DeclineCallRequest.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListCodingJobs.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeclineCallRequest.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -14227,9 +14358,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14245,26 +14376,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListCodingJobs.Output.InternalServerError.Body + public var body: Operations.DeclineCallRequest.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListCodingJobs.Output.InternalServerError.Body) { + public init(body: Operations.DeclineCallRequest.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListCodingJobs.Output.InternalServerError) + case internalServerError(Operations.DeclineCallRequest.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListCodingJobs.Output.InternalServerError { + public var internalServerError: Operations.DeclineCallRequest.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -14278,9 +14409,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/decline/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14296,26 +14427,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListCodingJobs.Output.ServiceUnavailable.Body + public var body: Operations.DeclineCallRequest.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListCodingJobs.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeclineCallRequest.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListCodingJobs.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeclineCallRequest.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListCodingJobs.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeclineCallRequest.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -14365,130 +14496,137 @@ public enum Operations { } } } - /// Answers the coding job's open question, which resumes the job. 409 when the job no longer waits on that question. + /// The messages of the call's conversation: the callee's words as user messages and the bot's replies. Empty before the call, and when the callee objected to the call. /// - /// - Remark: HTTP `POST /v1/agents/{id}/coding-jobs/{name}/answer`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)`. - public enum AnswerCodingJob { - public static let id: Swift.String = "answerCodingJob" + /// - Remark: HTTP `GET /v1/agents/{id}/call-requests/{requestId}/transcript`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)`. + public enum GetCallRequestTranscript { + public static let id: Swift.String = "getCallRequestTranscript" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/path/name`. - public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/path/requestId`. + public var requestId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - name: + /// - requestId: public init( id: Swift.String, - name: Swift.String + requestId: Swift.String ) { self.id = id - self.name = name + self.requestId = requestId } } - public var path: Operations.AnswerCodingJob.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/header`. + public var path: Operations.GetCallRequestTranscript.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/query/limit`. + public var limit: Swift.Int? + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/query/before`. + public var before: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - before: + public init( + limit: Swift.Int? = nil, + before: Swift.String? = nil + ) { + self.limit = limit + self.before = before + } + } + public var query: Operations.GetCallRequestTranscript.Input.Query + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.AnswerCodingJob.Input.Headers - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/requestBody/json/questionId`. - public var questionId: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/requestBody/json/text`. - public var text: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - questionId: - /// - text: - public init( - questionId: Swift.String, - text: Swift.String - ) { - self.questionId = questionId - self.text = text - } - public enum CodingKeys: String, CodingKey { - case questionId - case text - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/requestBody/content/application\/json`. - case json(Operations.AnswerCodingJob.Input.Body.JsonPayload) - } - public var body: Operations.AnswerCodingJob.Input.Body + public var headers: Operations.GetCallRequestTranscript.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: - /// - body: public init( - path: Operations.AnswerCodingJob.Input.Path, - headers: Operations.AnswerCodingJob.Input.Headers = .init(), - body: Operations.AnswerCodingJob.Input.Body + path: Operations.GetCallRequestTranscript.Input.Path, + query: Operations.GetCallRequestTranscript.Input.Query = .init(), + headers: Operations.GetCallRequestTranscript.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/200/content/application\/json`. + case json(Components.Schemas.TranscriptPage) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.TranscriptPage { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetCallRequestTranscript.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetCallRequestTranscript.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.AnswerCodingJob.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/204`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.GetCallRequestTranscript.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.AnswerCodingJob.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetCallRequestTranscript.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14504,26 +14642,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerCodingJob.Output.BadRequest.Body + public var body: Operations.GetCallRequestTranscript.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerCodingJob.Output.BadRequest.Body) { + public init(body: Operations.GetCallRequestTranscript.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.AnswerCodingJob.Output.BadRequest) + case badRequest(Operations.GetCallRequestTranscript.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.AnswerCodingJob.Output.BadRequest { + public var badRequest: Operations.GetCallRequestTranscript.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -14537,9 +14675,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -14555,26 +14693,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerCodingJob.Output.Unauthorized.Body + public var body: Operations.GetCallRequestTranscript.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerCodingJob.Output.Unauthorized.Body) { + public init(body: Operations.GetCallRequestTranscript.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.AnswerCodingJob.Output.Unauthorized) + case unauthorized(Operations.GetCallRequestTranscript.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.AnswerCodingJob.Output.Unauthorized { + public var unauthorized: Operations.GetCallRequestTranscript.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -14588,9 +14726,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14606,26 +14744,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerCodingJob.Output.NotFound.Body + public var body: Operations.GetCallRequestTranscript.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerCodingJob.Output.NotFound.Body) { + public init(body: Operations.GetCallRequestTranscript.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.AnswerCodingJob.Output.NotFound) + case notFound(Operations.GetCallRequestTranscript.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.AnswerCodingJob.Output.NotFound { + public var notFound: Operations.GetCallRequestTranscript.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -14639,9 +14777,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14657,26 +14795,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerCodingJob.Output.MethodNotAllowed.Body + public var body: Operations.GetCallRequestTranscript.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerCodingJob.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetCallRequestTranscript.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.AnswerCodingJob.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetCallRequestTranscript.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.AnswerCodingJob.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetCallRequestTranscript.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -14690,9 +14828,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14708,26 +14846,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerCodingJob.Output.Conflict.Body + public var body: Operations.GetCallRequestTranscript.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerCodingJob.Output.Conflict.Body) { + public init(body: Operations.GetCallRequestTranscript.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.AnswerCodingJob.Output.Conflict) + case conflict(Operations.GetCallRequestTranscript.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.AnswerCodingJob.Output.Conflict { + public var conflict: Operations.GetCallRequestTranscript.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -14741,9 +14879,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -14759,26 +14897,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerCodingJob.Output.ContentTooLarge.Body + public var body: Operations.GetCallRequestTranscript.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerCodingJob.Output.ContentTooLarge.Body) { + public init(body: Operations.GetCallRequestTranscript.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.AnswerCodingJob.Output.ContentTooLarge) + case contentTooLarge(Operations.GetCallRequestTranscript.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.AnswerCodingJob.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetCallRequestTranscript.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -14792,9 +14930,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14810,26 +14948,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerCodingJob.Output.InternalServerError.Body + public var body: Operations.GetCallRequestTranscript.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerCodingJob.Output.InternalServerError.Body) { + public init(body: Operations.GetCallRequestTranscript.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.AnswerCodingJob.Output.InternalServerError) + case internalServerError(Operations.GetCallRequestTranscript.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.AnswerCodingJob.Output.InternalServerError { + public var internalServerError: Operations.GetCallRequestTranscript.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -14843,9 +14981,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/call-requests/{requestId}/transcript/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -14861,26 +14999,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerCodingJob.Output.ServiceUnavailable.Body + public var body: Operations.GetCallRequestTranscript.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerCodingJob.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetCallRequestTranscript.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.AnswerCodingJob.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetCallRequestTranscript.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.AnswerCodingJob.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetCallRequestTranscript.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -14930,63 +15068,49 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/agents/{id}/coding-jobs/{name}/history`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)`. - public enum GetCodingJobHistory { - public static let id: Swift.String = "getCodingJobHistory" + /// - Remark: HTTP `GET /v1/agents/{id}/chat`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)`. + public enum GetChat { + public static let id: Swift.String = "getChat" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/path/name`. - public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - name: - public init( - id: Swift.String, - name: Swift.String - ) { + public init(id: Swift.String) { self.id = id - self.name = name } } - public var path: Operations.GetCodingJobHistory.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/query`. + public var path: Operations.GetChat.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/query`. public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/query/limit`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/query/limit`. public var limit: Swift.Int? - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/query/before`. - public var before: Swift.String? /// Creates a new `Query`. /// /// - Parameters: /// - limit: - /// - before: - public init( - limit: Swift.Int? = nil, - before: Swift.String? = nil - ) { + public init(limit: Swift.Int? = nil) { self.limit = limit - self.before = before } } - public var query: Operations.GetCodingJobHistory.Input.Query - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/header`. + public var query: Operations.GetChat.Input.Query + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetCodingJobHistory.Input.Headers + public var headers: Operations.GetChat.Input.Headers /// Creates a new `Input`. /// /// - Parameters: @@ -14994,9 +15118,9 @@ public enum Operations { /// - query: /// - headers: public init( - path: Operations.GetCodingJobHistory.Input.Path, - query: Operations.GetCodingJobHistory.Input.Query = .init(), - headers: Operations.GetCodingJobHistory.Input.Headers = .init() + path: Operations.GetChat.Input.Path, + query: Operations.GetChat.Input.Query = .init(), + headers: Operations.GetChat.Input.Headers = .init() ) { self.path = path self.query = query @@ -15005,15 +15129,15 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/200/content/application\/json`. - case json(Components.Schemas.TranscriptPage) + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/200/content/application\/json`. + case json(Components.Schemas.ChatSnapshot) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.TranscriptPage { + public var json: Components.Schemas.ChatSnapshot { get throws { switch self { case let .json(body): @@ -15023,26 +15147,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCodingJobHistory.Output.Ok.Body + public var body: Operations.GetChat.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCodingJobHistory.Output.Ok.Body) { + public init(body: Operations.GetChat.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.GetCodingJobHistory.Output.Ok) + case ok(Operations.GetChat.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.GetCodingJobHistory.Output.Ok { + public var ok: Operations.GetChat.Output.Ok { get throws { switch self { case let .ok(response): @@ -15056,9 +15180,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15074,26 +15198,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCodingJobHistory.Output.BadRequest.Body + public var body: Operations.GetChat.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCodingJobHistory.Output.BadRequest.Body) { + public init(body: Operations.GetChat.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetCodingJobHistory.Output.BadRequest) + case badRequest(Operations.GetChat.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetCodingJobHistory.Output.BadRequest { + public var badRequest: Operations.GetChat.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -15107,9 +15231,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -15125,26 +15249,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCodingJobHistory.Output.Unauthorized.Body + public var body: Operations.GetChat.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCodingJobHistory.Output.Unauthorized.Body) { + public init(body: Operations.GetChat.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetCodingJobHistory.Output.Unauthorized) + case unauthorized(Operations.GetChat.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetCodingJobHistory.Output.Unauthorized { + public var unauthorized: Operations.GetChat.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -15158,9 +15282,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15176,26 +15300,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCodingJobHistory.Output.NotFound.Body + public var body: Operations.GetChat.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCodingJobHistory.Output.NotFound.Body) { + public init(body: Operations.GetChat.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetCodingJobHistory.Output.NotFound) + case notFound(Operations.GetChat.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetCodingJobHistory.Output.NotFound { + public var notFound: Operations.GetChat.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -15209,9 +15333,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15227,26 +15351,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCodingJobHistory.Output.MethodNotAllowed.Body + public var body: Operations.GetChat.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCodingJobHistory.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetChat.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetCodingJobHistory.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetChat.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetCodingJobHistory.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetChat.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -15260,9 +15384,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15278,26 +15402,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCodingJobHistory.Output.Conflict.Body + public var body: Operations.GetChat.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCodingJobHistory.Output.Conflict.Body) { + public init(body: Operations.GetChat.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetCodingJobHistory.Output.Conflict) + case conflict(Operations.GetChat.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetCodingJobHistory.Output.Conflict { + public var conflict: Operations.GetChat.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -15311,9 +15435,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -15329,26 +15453,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCodingJobHistory.Output.ContentTooLarge.Body + public var body: Operations.GetChat.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCodingJobHistory.Output.ContentTooLarge.Body) { + public init(body: Operations.GetChat.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetCodingJobHistory.Output.ContentTooLarge) + case contentTooLarge(Operations.GetChat.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetCodingJobHistory.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetChat.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -15362,9 +15486,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15380,26 +15504,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCodingJobHistory.Output.InternalServerError.Body + public var body: Operations.GetChat.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCodingJobHistory.Output.InternalServerError.Body) { + public init(body: Operations.GetChat.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetCodingJobHistory.Output.InternalServerError) + case internalServerError(Operations.GetChat.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetCodingJobHistory.Output.InternalServerError { + public var internalServerError: Operations.GetChat.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -15413,9 +15537,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15431,26 +15555,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCodingJobHistory.Output.ServiceUnavailable.Body + public var body: Operations.GetChat.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCodingJobHistory.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetChat.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetCodingJobHistory.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetChat.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetCodingJobHistory.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetChat.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -15500,14 +15624,14 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/agents/{id}/compact`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)`. - public enum CompactChat { - public static let id: Swift.String = "compactChat" + /// - Remark: HTTP `GET /v1/agents/{id}/chat/history`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)`. + public enum GetChatHistory { + public static let id: Swift.String = "getChatHistory" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -15517,43 +15641,66 @@ public enum Operations { self.id = id } } - public var path: Operations.CompactChat.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/header`. + public var path: Operations.GetChatHistory.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/query/limit`. + public var limit: Swift.Int? + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/query/before`. + public var before: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - before: + public init( + limit: Swift.Int? = nil, + before: Swift.String? = nil + ) { + self.limit = limit + self.before = before + } + } + public var query: Operations.GetChatHistory.Input.Query + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CompactChat.Input.Headers + public var headers: Operations.GetChatHistory.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.CompactChat.Input.Path, - headers: Operations.CompactChat.Input.Headers = .init() + path: Operations.GetChatHistory.Input.Path, + query: Operations.GetChatHistory.Input.Query = .init(), + headers: Operations.GetChatHistory.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Accepted: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/202/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/202/content/application\/json`. - case json(Components.Schemas.Compaction) + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/200/content/application\/json`. + case json(Components.Schemas.TranscriptPage) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.Compaction { + public var json: Components.Schemas.TranscriptPage { get throws { switch self { case let .json(body): @@ -15563,42 +15710,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompactChat.Output.Accepted.Body - /// Creates a new `Accepted`. + public var body: Operations.GetChatHistory.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompactChat.Output.Accepted.Body) { + public init(body: Operations.GetChatHistory.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/202`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/200`. /// - /// HTTP response code: `202 accepted`. - case accepted(Operations.CompactChat.Output.Accepted) - /// The associated value of the enum case if `self` is `.accepted`. + /// HTTP response code: `200 ok`. + case ok(Operations.GetChatHistory.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.accepted`. - /// - SeeAlso: `.accepted`. - public var accepted: Operations.CompactChat.Output.Accepted { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetChatHistory.Output.Ok { get throws { switch self { - case let .accepted(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "accepted", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15614,26 +15761,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompactChat.Output.BadRequest.Body + public var body: Operations.GetChatHistory.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompactChat.Output.BadRequest.Body) { + public init(body: Operations.GetChatHistory.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CompactChat.Output.BadRequest) + case badRequest(Operations.GetChatHistory.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CompactChat.Output.BadRequest { + public var badRequest: Operations.GetChatHistory.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -15647,9 +15794,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -15665,26 +15812,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompactChat.Output.Unauthorized.Body + public var body: Operations.GetChatHistory.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompactChat.Output.Unauthorized.Body) { + public init(body: Operations.GetChatHistory.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CompactChat.Output.Unauthorized) + case unauthorized(Operations.GetChatHistory.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CompactChat.Output.Unauthorized { + public var unauthorized: Operations.GetChatHistory.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -15698,9 +15845,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15716,26 +15863,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompactChat.Output.NotFound.Body + public var body: Operations.GetChatHistory.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompactChat.Output.NotFound.Body) { + public init(body: Operations.GetChatHistory.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CompactChat.Output.NotFound) + case notFound(Operations.GetChatHistory.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CompactChat.Output.NotFound { + public var notFound: Operations.GetChatHistory.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -15749,9 +15896,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15767,26 +15914,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompactChat.Output.MethodNotAllowed.Body + public var body: Operations.GetChatHistory.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompactChat.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetChatHistory.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CompactChat.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetChatHistory.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CompactChat.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetChatHistory.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -15800,9 +15947,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15818,26 +15965,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompactChat.Output.Conflict.Body + public var body: Operations.GetChatHistory.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompactChat.Output.Conflict.Body) { + public init(body: Operations.GetChatHistory.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CompactChat.Output.Conflict) + case conflict(Operations.GetChatHistory.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CompactChat.Output.Conflict { + public var conflict: Operations.GetChatHistory.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -15851,9 +15998,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -15869,26 +16016,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompactChat.Output.ContentTooLarge.Body + public var body: Operations.GetChatHistory.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompactChat.Output.ContentTooLarge.Body) { + public init(body: Operations.GetChatHistory.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CompactChat.Output.ContentTooLarge) + case contentTooLarge(Operations.GetChatHistory.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CompactChat.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetChatHistory.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -15902,9 +16049,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15920,26 +16067,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompactChat.Output.InternalServerError.Body + public var body: Operations.GetChatHistory.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompactChat.Output.InternalServerError.Body) { + public init(body: Operations.GetChatHistory.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CompactChat.Output.InternalServerError) + case internalServerError(Operations.GetChatHistory.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CompactChat.Output.InternalServerError { + public var internalServerError: Operations.GetChatHistory.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -15953,9 +16100,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/chat/history/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -15971,26 +16118,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompactChat.Output.ServiceUnavailable.Body + public var body: Operations.GetChatHistory.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompactChat.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetChatHistory.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/history/get(getChatHistory)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CompactChat.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetChatHistory.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CompactChat.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetChatHistory.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -16040,16 +16187,14 @@ public enum Operations { } } } - /// The bot's credentials and its requests for credentials the owner has not answered. Values are never returned. - /// - /// - Remark: HTTP `GET /v1/agents/{id}/credentials`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)`. - public enum ListAgentCredentials { - public static let id: Swift.String = "listAgentCredentials" + /// - Remark: HTTP `GET /v1/agents/{id}/coding-jobs`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)`. + public enum ListCodingJobs { + public static let id: Swift.String = "listCodingJobs" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -16059,27 +16204,27 @@ public enum Operations { self.id = id } } - public var path: Operations.ListAgentCredentials.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/header`. + public var path: Operations.ListCodingJobs.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListAgentCredentials.Input.Headers + public var headers: Operations.ListCodingJobs.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.ListAgentCredentials.Input.Path, - headers: Operations.ListAgentCredentials.Input.Headers = .init() + path: Operations.ListCodingJobs.Input.Path, + headers: Operations.ListCodingJobs.Input.Headers = .init() ) { self.path = path self.headers = headers @@ -16087,15 +16232,15 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/200/content/application\/json`. - case json(Components.Schemas.Credentials) + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/200/content/application\/json`. + case json(Components.Schemas.CodingJobs) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.Credentials { + public var json: Components.Schemas.CodingJobs { get throws { switch self { case let .json(body): @@ -16105,26 +16250,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentials.Output.Ok.Body + public var body: Operations.ListCodingJobs.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentials.Output.Ok.Body) { + public init(body: Operations.ListCodingJobs.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListAgentCredentials.Output.Ok) + case ok(Operations.ListCodingJobs.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListAgentCredentials.Output.Ok { + public var ok: Operations.ListCodingJobs.Output.Ok { get throws { switch self { case let .ok(response): @@ -16138,9 +16283,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -16156,26 +16301,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentials.Output.BadRequest.Body + public var body: Operations.ListCodingJobs.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentials.Output.BadRequest.Body) { + public init(body: Operations.ListCodingJobs.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListAgentCredentials.Output.BadRequest) + case badRequest(Operations.ListCodingJobs.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListAgentCredentials.Output.BadRequest { + public var badRequest: Operations.ListCodingJobs.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -16189,9 +16334,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -16207,26 +16352,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentials.Output.Unauthorized.Body + public var body: Operations.ListCodingJobs.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentials.Output.Unauthorized.Body) { + public init(body: Operations.ListCodingJobs.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListAgentCredentials.Output.Unauthorized) + case unauthorized(Operations.ListCodingJobs.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListAgentCredentials.Output.Unauthorized { + public var unauthorized: Operations.ListCodingJobs.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -16240,9 +16385,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -16258,26 +16403,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentials.Output.NotFound.Body + public var body: Operations.ListCodingJobs.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentials.Output.NotFound.Body) { + public init(body: Operations.ListCodingJobs.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListAgentCredentials.Output.NotFound) + case notFound(Operations.ListCodingJobs.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListAgentCredentials.Output.NotFound { + public var notFound: Operations.ListCodingJobs.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -16291,9 +16436,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -16309,26 +16454,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentials.Output.MethodNotAllowed.Body + public var body: Operations.ListCodingJobs.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentials.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListCodingJobs.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListAgentCredentials.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListCodingJobs.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListAgentCredentials.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListCodingJobs.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -16342,9 +16487,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -16360,26 +16505,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentials.Output.Conflict.Body + public var body: Operations.ListCodingJobs.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentials.Output.Conflict.Body) { + public init(body: Operations.ListCodingJobs.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListAgentCredentials.Output.Conflict) + case conflict(Operations.ListCodingJobs.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListAgentCredentials.Output.Conflict { + public var conflict: Operations.ListCodingJobs.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -16393,9 +16538,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -16411,26 +16556,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentials.Output.ContentTooLarge.Body + public var body: Operations.ListCodingJobs.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentials.Output.ContentTooLarge.Body) { + public init(body: Operations.ListCodingJobs.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListAgentCredentials.Output.ContentTooLarge) + case contentTooLarge(Operations.ListCodingJobs.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListAgentCredentials.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListCodingJobs.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -16444,9 +16589,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -16462,26 +16607,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentials.Output.InternalServerError.Body + public var body: Operations.ListCodingJobs.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentials.Output.InternalServerError.Body) { + public init(body: Operations.ListCodingJobs.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListAgentCredentials.Output.InternalServerError) + case internalServerError(Operations.ListCodingJobs.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListAgentCredentials.Output.InternalServerError { + public var internalServerError: Operations.ListCodingJobs.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -16495,9 +16640,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -16513,26 +16658,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentials.Output.ServiceUnavailable.Body + public var body: Operations.ListCodingJobs.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentials.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListCodingJobs.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/get(listCodingJobs)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListAgentCredentials.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListCodingJobs.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListAgentCredentials.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListCodingJobs.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -16582,18 +16727,18 @@ public enum Operations { } } } - /// Creates or updates a credential. Saving one the bot requested answers the request and starts a bot turn with a notice. A new value applies from the next request; the placeholder stays the same. + /// Answers the coding job's open question, which resumes the job. 409 when the job no longer waits on that question. /// - /// - Remark: HTTP `PUT /v1/agents/{id}/credentials/{name}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)`. - public enum SaveAgentCredential { - public static let id: Swift.String = "saveAgentCredential" + /// - Remark: HTTP `POST /v1/agents/{id}/coding-jobs/{name}/answer`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)`. + public enum AnswerCodingJob { + public static let id: Swift.String = "answerCodingJob" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/path/name`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/path/name`. public var name: Swift.String /// Creates a new `Path`. /// @@ -16608,114 +16753,48 @@ public enum Operations { self.name = name } } - public var path: Operations.SaveAgentCredential.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/header`. + public var path: Operations.AnswerCodingJob.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SaveAgentCredential.Input.Headers - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody`. + public var headers: Operations.AnswerCodingJob.Input.Headers + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/hosts`. - public var hosts: [Swift.String]? - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret`. - public struct SecretPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/reference/passwordManager`. - public var passwordManager: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/reference`. - public var reference: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/value`. - public var value: Swift.String? - /// Creates a new `SecretPayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret`. - public var secret: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/requestBody/json/questionId`. + public var questionId: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/requestBody/json/text`. + public var text: Swift.String /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - hosts: - /// - secret: + /// - questionId: + /// - text: public init( - hosts: [Swift.String]? = nil, - secret: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload? = nil + questionId: Swift.String, + text: Swift.String ) { - self.hosts = hosts - self.secret = secret + self.questionId = questionId + self.text = text } public enum CodingKeys: String, CodingKey { - case hosts - case secret + case questionId + case text } } - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/content/application\/json`. - case json(Operations.SaveAgentCredential.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/requestBody/content/application\/json`. + case json(Operations.AnswerCodingJob.Input.Body.JsonPayload) } - public var body: Operations.SaveAgentCredential.Input.Body + public var body: Operations.AnswerCodingJob.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -16723,9 +16802,9 @@ public enum Operations { /// - headers: /// - body: public init( - path: Operations.SaveAgentCredential.Input.Path, - headers: Operations.SaveAgentCredential.Input.Headers = .init(), - body: Operations.SaveAgentCredential.Input.Body + path: Operations.AnswerCodingJob.Input.Path, + headers: Operations.AnswerCodingJob.Input.Headers = .init(), + body: Operations.AnswerCodingJob.Input.Body ) { self.path = path self.headers = headers @@ -16733,61 +16812,45 @@ public enum Operations { } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.Credential) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.Credential { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.SaveAgentCredential.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.SaveAgentCredential.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.SaveAgentCredential.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.AnswerCodingJob.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.SaveAgentCredential.Output.Ok { + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.AnswerCodingJob.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -16803,26 +16866,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentCredential.Output.BadRequest.Body + public var body: Operations.AnswerCodingJob.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentCredential.Output.BadRequest.Body) { + public init(body: Operations.AnswerCodingJob.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SaveAgentCredential.Output.BadRequest) + case badRequest(Operations.AnswerCodingJob.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SaveAgentCredential.Output.BadRequest { + public var badRequest: Operations.AnswerCodingJob.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -16836,9 +16899,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -16854,26 +16917,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentCredential.Output.Unauthorized.Body + public var body: Operations.AnswerCodingJob.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentCredential.Output.Unauthorized.Body) { + public init(body: Operations.AnswerCodingJob.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SaveAgentCredential.Output.Unauthorized) + case unauthorized(Operations.AnswerCodingJob.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SaveAgentCredential.Output.Unauthorized { + public var unauthorized: Operations.AnswerCodingJob.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -16887,9 +16950,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -16905,26 +16968,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentCredential.Output.NotFound.Body + public var body: Operations.AnswerCodingJob.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentCredential.Output.NotFound.Body) { + public init(body: Operations.AnswerCodingJob.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SaveAgentCredential.Output.NotFound) + case notFound(Operations.AnswerCodingJob.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SaveAgentCredential.Output.NotFound { + public var notFound: Operations.AnswerCodingJob.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -16938,9 +17001,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -16956,26 +17019,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentCredential.Output.MethodNotAllowed.Body + public var body: Operations.AnswerCodingJob.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentCredential.Output.MethodNotAllowed.Body) { + public init(body: Operations.AnswerCodingJob.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SaveAgentCredential.Output.MethodNotAllowed) + case methodNotAllowed(Operations.AnswerCodingJob.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SaveAgentCredential.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.AnswerCodingJob.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -16989,9 +17052,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17007,26 +17070,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentCredential.Output.Conflict.Body + public var body: Operations.AnswerCodingJob.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentCredential.Output.Conflict.Body) { + public init(body: Operations.AnswerCodingJob.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SaveAgentCredential.Output.Conflict) + case conflict(Operations.AnswerCodingJob.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SaveAgentCredential.Output.Conflict { + public var conflict: Operations.AnswerCodingJob.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -17040,9 +17103,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -17058,26 +17121,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentCredential.Output.ContentTooLarge.Body + public var body: Operations.AnswerCodingJob.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentCredential.Output.ContentTooLarge.Body) { + public init(body: Operations.AnswerCodingJob.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SaveAgentCredential.Output.ContentTooLarge) + case contentTooLarge(Operations.AnswerCodingJob.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SaveAgentCredential.Output.ContentTooLarge { + public var contentTooLarge: Operations.AnswerCodingJob.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -17091,9 +17154,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17109,26 +17172,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentCredential.Output.InternalServerError.Body + public var body: Operations.AnswerCodingJob.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentCredential.Output.InternalServerError.Body) { + public init(body: Operations.AnswerCodingJob.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SaveAgentCredential.Output.InternalServerError) + case internalServerError(Operations.AnswerCodingJob.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SaveAgentCredential.Output.InternalServerError { + public var internalServerError: Operations.AnswerCodingJob.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -17142,9 +17205,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/answer/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17160,26 +17223,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentCredential.Output.ServiceUnavailable.Body + public var body: Operations.AnswerCodingJob.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentCredential.Output.ServiceUnavailable.Body) { + public init(body: Operations.AnswerCodingJob.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/answer/post(answerCodingJob)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SaveAgentCredential.Output.ServiceUnavailable) + case serviceUnavailable(Operations.AnswerCodingJob.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SaveAgentCredential.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.AnswerCodingJob.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -17229,18 +17292,16 @@ public enum Operations { } } } - /// Deletes a credential and its use records, or declines a request for one, which starts a bot turn with a notice. - /// - /// - Remark: HTTP `DELETE /v1/agents/{id}/credentials/{name}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)`. - public enum DeleteAgentCredential { - public static let id: Swift.String = "deleteAgentCredential" + /// - Remark: HTTP `GET /v1/agents/{id}/coding-jobs/{name}/history`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)`. + public enum GetCodingJobHistory { + public static let id: Swift.String = "getCodingJobHistory" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/path/name`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/path/name`. public var name: Swift.String /// Creates a new `Path`. /// @@ -17255,72 +17316,111 @@ public enum Operations { self.name = name } } - public var path: Operations.DeleteAgentCredential.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/header`. + public var path: Operations.GetCodingJobHistory.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/query/limit`. + public var limit: Swift.Int? + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/query/before`. + public var before: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - before: + public init( + limit: Swift.Int? = nil, + before: Swift.String? = nil + ) { + self.limit = limit + self.before = before + } + } + public var query: Operations.GetCodingJobHistory.Input.Query + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteAgentCredential.Input.Headers + public var headers: Operations.GetCodingJobHistory.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.DeleteAgentCredential.Input.Path, - headers: Operations.DeleteAgentCredential.Input.Headers = .init() + path: Operations.GetCodingJobHistory.Input.Path, + query: Operations.GetCodingJobHistory.Input.Query = .init(), + headers: Operations.GetCodingJobHistory.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/200/content/application\/json`. + case json(Components.Schemas.TranscriptPage) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.TranscriptPage { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetCodingJobHistory.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetCodingJobHistory.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteAgentCredential.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/204`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.GetCodingJobHistory.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteAgentCredential.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetCodingJobHistory.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17336,26 +17436,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentCredential.Output.BadRequest.Body + public var body: Operations.GetCodingJobHistory.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentCredential.Output.BadRequest.Body) { + public init(body: Operations.GetCodingJobHistory.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteAgentCredential.Output.BadRequest) + case badRequest(Operations.GetCodingJobHistory.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteAgentCredential.Output.BadRequest { + public var badRequest: Operations.GetCodingJobHistory.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -17369,9 +17469,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -17387,26 +17487,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentCredential.Output.Unauthorized.Body + public var body: Operations.GetCodingJobHistory.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentCredential.Output.Unauthorized.Body) { + public init(body: Operations.GetCodingJobHistory.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteAgentCredential.Output.Unauthorized) + case unauthorized(Operations.GetCodingJobHistory.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteAgentCredential.Output.Unauthorized { + public var unauthorized: Operations.GetCodingJobHistory.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -17420,9 +17520,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17438,26 +17538,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentCredential.Output.NotFound.Body + public var body: Operations.GetCodingJobHistory.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentCredential.Output.NotFound.Body) { + public init(body: Operations.GetCodingJobHistory.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteAgentCredential.Output.NotFound) + case notFound(Operations.GetCodingJobHistory.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteAgentCredential.Output.NotFound { + public var notFound: Operations.GetCodingJobHistory.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -17471,9 +17571,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17489,26 +17589,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentCredential.Output.MethodNotAllowed.Body + public var body: Operations.GetCodingJobHistory.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentCredential.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetCodingJobHistory.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteAgentCredential.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetCodingJobHistory.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteAgentCredential.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetCodingJobHistory.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -17522,9 +17622,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17540,26 +17640,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentCredential.Output.Conflict.Body + public var body: Operations.GetCodingJobHistory.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentCredential.Output.Conflict.Body) { + public init(body: Operations.GetCodingJobHistory.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteAgentCredential.Output.Conflict) + case conflict(Operations.GetCodingJobHistory.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteAgentCredential.Output.Conflict { + public var conflict: Operations.GetCodingJobHistory.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -17573,9 +17673,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -17591,26 +17691,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentCredential.Output.ContentTooLarge.Body + public var body: Operations.GetCodingJobHistory.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentCredential.Output.ContentTooLarge.Body) { + public init(body: Operations.GetCodingJobHistory.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteAgentCredential.Output.ContentTooLarge) + case contentTooLarge(Operations.GetCodingJobHistory.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteAgentCredential.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetCodingJobHistory.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -17624,9 +17724,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17642,26 +17742,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentCredential.Output.InternalServerError.Body + public var body: Operations.GetCodingJobHistory.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentCredential.Output.InternalServerError.Body) { + public init(body: Operations.GetCodingJobHistory.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteAgentCredential.Output.InternalServerError) + case internalServerError(Operations.GetCodingJobHistory.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteAgentCredential.Output.InternalServerError { + public var internalServerError: Operations.GetCodingJobHistory.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -17675,9 +17775,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/coding-jobs/{name}/history/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17693,26 +17793,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentCredential.Output.ServiceUnavailable.Body + public var body: Operations.GetCodingJobHistory.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentCredential.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetCodingJobHistory.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/coding-jobs/{name}/history/get(getCodingJobHistory)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteAgentCredential.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetCodingJobHistory.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteAgentCredential.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetCodingJobHistory.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -17762,98 +17862,105 @@ public enum Operations { } } } - /// Declines a pending credential request without changing a saved credential. - /// - /// - Remark: HTTP `POST /v1/agents/{id}/credentials/{name}/decline`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)`. - public enum DeclineAgentCredential { - public static let id: Swift.String = "declineAgentCredential" + /// - Remark: HTTP `POST /v1/agents/{id}/compact`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)`. + public enum CompactChat { + public static let id: Swift.String = "compactChat" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/path/name`. - public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - name: - public init( - id: Swift.String, - name: Swift.String - ) { + public init(id: Swift.String) { self.id = id - self.name = name } } - public var path: Operations.DeclineAgentCredential.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/header`. + public var path: Operations.CompactChat.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeclineAgentCredential.Input.Headers + public var headers: Operations.CompactChat.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.DeclineAgentCredential.Input.Path, - headers: Operations.DeclineAgentCredential.Input.Headers = .init() + path: Operations.CompactChat.Input.Path, + headers: Operations.CompactChat.Input.Headers = .init() ) { self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Accepted: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/202/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/202/content/application\/json`. + case json(Components.Schemas.Compaction) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.Compaction { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CompactChat.Output.Accepted.Body + /// Creates a new `Accepted`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CompactChat.Output.Accepted.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeclineAgentCredential.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/204`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/202`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `202 accepted`. + case accepted(Operations.CompactChat.Output.Accepted) + /// The associated value of the enum case if `self` is `.accepted`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeclineAgentCredential.Output.NoContent { + /// - Throws: An error if `self` is not `.accepted`. + /// - SeeAlso: `.accepted`. + public var accepted: Operations.CompactChat.Output.Accepted { get throws { switch self { - case let .noContent(response): + case let .accepted(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "accepted", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17869,26 +17976,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentCredential.Output.BadRequest.Body + public var body: Operations.CompactChat.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentCredential.Output.BadRequest.Body) { + public init(body: Operations.CompactChat.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeclineAgentCredential.Output.BadRequest) + case badRequest(Operations.CompactChat.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeclineAgentCredential.Output.BadRequest { + public var badRequest: Operations.CompactChat.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -17902,9 +18009,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -17920,26 +18027,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentCredential.Output.Unauthorized.Body + public var body: Operations.CompactChat.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentCredential.Output.Unauthorized.Body) { + public init(body: Operations.CompactChat.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeclineAgentCredential.Output.Unauthorized) + case unauthorized(Operations.CompactChat.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeclineAgentCredential.Output.Unauthorized { + public var unauthorized: Operations.CompactChat.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -17953,9 +18060,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -17971,26 +18078,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentCredential.Output.NotFound.Body + public var body: Operations.CompactChat.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentCredential.Output.NotFound.Body) { + public init(body: Operations.CompactChat.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeclineAgentCredential.Output.NotFound) + case notFound(Operations.CompactChat.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeclineAgentCredential.Output.NotFound { + public var notFound: Operations.CompactChat.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -18004,9 +18111,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18022,26 +18129,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentCredential.Output.MethodNotAllowed.Body + public var body: Operations.CompactChat.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentCredential.Output.MethodNotAllowed.Body) { + public init(body: Operations.CompactChat.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeclineAgentCredential.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CompactChat.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeclineAgentCredential.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CompactChat.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -18055,9 +18162,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18073,26 +18180,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentCredential.Output.Conflict.Body + public var body: Operations.CompactChat.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentCredential.Output.Conflict.Body) { + public init(body: Operations.CompactChat.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeclineAgentCredential.Output.Conflict) + case conflict(Operations.CompactChat.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeclineAgentCredential.Output.Conflict { + public var conflict: Operations.CompactChat.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -18106,9 +18213,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -18124,26 +18231,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentCredential.Output.ContentTooLarge.Body + public var body: Operations.CompactChat.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentCredential.Output.ContentTooLarge.Body) { + public init(body: Operations.CompactChat.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeclineAgentCredential.Output.ContentTooLarge) + case contentTooLarge(Operations.CompactChat.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeclineAgentCredential.Output.ContentTooLarge { + public var contentTooLarge: Operations.CompactChat.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -18157,9 +18264,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18175,26 +18282,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentCredential.Output.InternalServerError.Body + public var body: Operations.CompactChat.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentCredential.Output.InternalServerError.Body) { + public init(body: Operations.CompactChat.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeclineAgentCredential.Output.InternalServerError) + case internalServerError(Operations.CompactChat.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeclineAgentCredential.Output.InternalServerError { + public var internalServerError: Operations.CompactChat.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -18208,9 +18315,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/compact/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18226,26 +18333,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentCredential.Output.ServiceUnavailable.Body + public var body: Operations.CompactChat.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentCredential.Output.ServiceUnavailable.Body) { + public init(body: Operations.CompactChat.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/compact/post(compactChat)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeclineAgentCredential.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CompactChat.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeclineAgentCredential.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CompactChat.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -18295,92 +18402,62 @@ public enum Operations { } } } - /// Requests sent with the credential's value in the last 90 days, newest first. Page with `before` set to the last use's ID. + /// The bot's credentials and its requests for credentials the owner has not answered. Values are never returned. /// - /// - Remark: HTTP `GET /v1/agents/{id}/credentials/{name}/uses`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)`. - public enum ListAgentCredentialUses { - public static let id: Swift.String = "listAgentCredentialUses" + /// - Remark: HTTP `GET /v1/agents/{id}/credentials`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)`. + public enum ListAgentCredentials { + public static let id: Swift.String = "listAgentCredentials" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/path/name`. - public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - name: - public init( - id: Swift.String, - name: Swift.String - ) { + public init(id: Swift.String) { self.id = id - self.name = name } } - public var path: Operations.ListAgentCredentialUses.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/query/limit`. - public var limit: Swift.Int? - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/query/before`. - public var before: Swift.String? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - /// - before: - public init( - limit: Swift.Int? = nil, - before: Swift.String? = nil - ) { - self.limit = limit - self.before = before - } - } - public var query: Operations.ListAgentCredentialUses.Input.Query - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/header`. + public var path: Operations.ListAgentCredentials.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListAgentCredentialUses.Input.Headers + public var headers: Operations.ListAgentCredentials.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: public init( - path: Operations.ListAgentCredentialUses.Input.Path, - query: Operations.ListAgentCredentialUses.Input.Query = .init(), - headers: Operations.ListAgentCredentialUses.Input.Headers = .init() + path: Operations.ListAgentCredentials.Input.Path, + headers: Operations.ListAgentCredentials.Input.Headers = .init() ) { self.path = path - self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/200/content/application\/json`. - case json([Components.Schemas.CredentialUse]) + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/200/content/application\/json`. + case json(Components.Schemas.Credentials) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.CredentialUse] { + public var json: Components.Schemas.Credentials { get throws { switch self { case let .json(body): @@ -18390,26 +18467,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentialUses.Output.Ok.Body + public var body: Operations.ListAgentCredentials.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentialUses.Output.Ok.Body) { + public init(body: Operations.ListAgentCredentials.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListAgentCredentialUses.Output.Ok) + case ok(Operations.ListAgentCredentials.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListAgentCredentialUses.Output.Ok { + public var ok: Operations.ListAgentCredentials.Output.Ok { get throws { switch self { case let .ok(response): @@ -18423,9 +18500,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18441,26 +18518,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentialUses.Output.BadRequest.Body + public var body: Operations.ListAgentCredentials.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentialUses.Output.BadRequest.Body) { + public init(body: Operations.ListAgentCredentials.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListAgentCredentialUses.Output.BadRequest) + case badRequest(Operations.ListAgentCredentials.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListAgentCredentialUses.Output.BadRequest { + public var badRequest: Operations.ListAgentCredentials.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -18474,9 +18551,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -18492,26 +18569,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentialUses.Output.Unauthorized.Body + public var body: Operations.ListAgentCredentials.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentialUses.Output.Unauthorized.Body) { + public init(body: Operations.ListAgentCredentials.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListAgentCredentialUses.Output.Unauthorized) + case unauthorized(Operations.ListAgentCredentials.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListAgentCredentialUses.Output.Unauthorized { + public var unauthorized: Operations.ListAgentCredentials.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -18525,9 +18602,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18543,26 +18620,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentialUses.Output.NotFound.Body + public var body: Operations.ListAgentCredentials.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentialUses.Output.NotFound.Body) { + public init(body: Operations.ListAgentCredentials.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListAgentCredentialUses.Output.NotFound) + case notFound(Operations.ListAgentCredentials.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListAgentCredentialUses.Output.NotFound { + public var notFound: Operations.ListAgentCredentials.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -18576,9 +18653,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18594,26 +18671,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentialUses.Output.MethodNotAllowed.Body + public var body: Operations.ListAgentCredentials.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentialUses.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListAgentCredentials.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListAgentCredentialUses.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListAgentCredentials.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListAgentCredentialUses.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListAgentCredentials.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -18627,9 +18704,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18645,26 +18722,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentialUses.Output.Conflict.Body + public var body: Operations.ListAgentCredentials.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentialUses.Output.Conflict.Body) { + public init(body: Operations.ListAgentCredentials.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListAgentCredentialUses.Output.Conflict) + case conflict(Operations.ListAgentCredentials.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListAgentCredentialUses.Output.Conflict { + public var conflict: Operations.ListAgentCredentials.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -18678,9 +18755,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -18696,26 +18773,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentialUses.Output.ContentTooLarge.Body + public var body: Operations.ListAgentCredentials.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentialUses.Output.ContentTooLarge.Body) { + public init(body: Operations.ListAgentCredentials.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListAgentCredentialUses.Output.ContentTooLarge) + case contentTooLarge(Operations.ListAgentCredentials.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListAgentCredentialUses.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListAgentCredentials.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -18729,9 +18806,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18747,26 +18824,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentialUses.Output.InternalServerError.Body + public var body: Operations.ListAgentCredentials.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentialUses.Output.InternalServerError.Body) { + public init(body: Operations.ListAgentCredentials.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListAgentCredentialUses.Output.InternalServerError) + case internalServerError(Operations.ListAgentCredentials.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListAgentCredentialUses.Output.InternalServerError { + public var internalServerError: Operations.ListAgentCredentials.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -18780,9 +18857,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18798,26 +18875,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentCredentialUses.Output.ServiceUnavailable.Body + public var body: Operations.ListAgentCredentials.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentCredentialUses.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListAgentCredentials.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/get(listAgentCredentials)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListAgentCredentialUses.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListAgentCredentials.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListAgentCredentialUses.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListAgentCredentials.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -18867,60 +18944,167 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/agents/{id}/desktop-jobs`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)`. - public enum ListDesktopJobs { - public static let id: Swift.String = "listDesktopJobs" + /// Creates or updates a credential. Saving one the bot requested answers the request and starts a bot turn with a notice. A new value applies from the next request; the placeholder stays the same. + /// + /// - Remark: HTTP `PUT /v1/agents/{id}/credentials/{name}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)`. + public enum SaveAgentCredential { + public static let id: Swift.String = "saveAgentCredential" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/path/name`. + public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - name: + public init( + id: Swift.String, + name: Swift.String + ) { self.id = id + self.name = name } } - public var path: Operations.ListDesktopJobs.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/header`. + public var path: Operations.SaveAgentCredential.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListDesktopJobs.Input.Headers + public var headers: Operations.SaveAgentCredential.Input.Headers + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/hosts`. + public var hosts: [Swift.String]? + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret`. + public struct SecretPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/reference/passwordManager`. + public var passwordManager: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/reference`. + public var reference: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret/value`. + public var value: Swift.String? + /// Creates a new `SecretPayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/json/secret`. + public var secret: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - hosts: + /// - secret: + public init( + hosts: [Swift.String]? = nil, + secret: Operations.SaveAgentCredential.Input.Body.JsonPayload.SecretPayload? = nil + ) { + self.hosts = hosts + self.secret = secret + } + public enum CodingKeys: String, CodingKey { + case hosts + case secret + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/requestBody/content/application\/json`. + case json(Operations.SaveAgentCredential.Input.Body.JsonPayload) + } + public var body: Operations.SaveAgentCredential.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.ListDesktopJobs.Input.Path, - headers: Operations.ListDesktopJobs.Input.Headers = .init() + path: Operations.SaveAgentCredential.Input.Path, + headers: Operations.SaveAgentCredential.Input.Headers = .init(), + body: Operations.SaveAgentCredential.Input.Body ) { self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/200/content/application\/json`. - case json(Components.Schemas.DesktopJobs) + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.Credential) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.DesktopJobs { + public var json: Components.Schemas.Credential { get throws { switch self { case let .json(body): @@ -18930,26 +19114,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListDesktopJobs.Output.Ok.Body + public var body: Operations.SaveAgentCredential.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListDesktopJobs.Output.Ok.Body) { + public init(body: Operations.SaveAgentCredential.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListDesktopJobs.Output.Ok) + case ok(Operations.SaveAgentCredential.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListDesktopJobs.Output.Ok { + public var ok: Operations.SaveAgentCredential.Output.Ok { get throws { switch self { case let .ok(response): @@ -18963,9 +19147,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -18981,26 +19165,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListDesktopJobs.Output.BadRequest.Body + public var body: Operations.SaveAgentCredential.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListDesktopJobs.Output.BadRequest.Body) { + public init(body: Operations.SaveAgentCredential.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListDesktopJobs.Output.BadRequest) + case badRequest(Operations.SaveAgentCredential.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListDesktopJobs.Output.BadRequest { + public var badRequest: Operations.SaveAgentCredential.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -19014,9 +19198,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -19032,26 +19216,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListDesktopJobs.Output.Unauthorized.Body + public var body: Operations.SaveAgentCredential.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListDesktopJobs.Output.Unauthorized.Body) { + public init(body: Operations.SaveAgentCredential.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListDesktopJobs.Output.Unauthorized) + case unauthorized(Operations.SaveAgentCredential.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListDesktopJobs.Output.Unauthorized { + public var unauthorized: Operations.SaveAgentCredential.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -19065,9 +19249,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19083,26 +19267,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListDesktopJobs.Output.NotFound.Body + public var body: Operations.SaveAgentCredential.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListDesktopJobs.Output.NotFound.Body) { + public init(body: Operations.SaveAgentCredential.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListDesktopJobs.Output.NotFound) + case notFound(Operations.SaveAgentCredential.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListDesktopJobs.Output.NotFound { + public var notFound: Operations.SaveAgentCredential.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -19116,9 +19300,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19134,26 +19318,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListDesktopJobs.Output.MethodNotAllowed.Body + public var body: Operations.SaveAgentCredential.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListDesktopJobs.Output.MethodNotAllowed.Body) { + public init(body: Operations.SaveAgentCredential.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListDesktopJobs.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SaveAgentCredential.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListDesktopJobs.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SaveAgentCredential.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -19167,9 +19351,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19185,26 +19369,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListDesktopJobs.Output.Conflict.Body + public var body: Operations.SaveAgentCredential.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListDesktopJobs.Output.Conflict.Body) { + public init(body: Operations.SaveAgentCredential.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListDesktopJobs.Output.Conflict) + case conflict(Operations.SaveAgentCredential.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListDesktopJobs.Output.Conflict { + public var conflict: Operations.SaveAgentCredential.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -19218,9 +19402,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -19236,26 +19420,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListDesktopJobs.Output.ContentTooLarge.Body + public var body: Operations.SaveAgentCredential.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListDesktopJobs.Output.ContentTooLarge.Body) { + public init(body: Operations.SaveAgentCredential.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListDesktopJobs.Output.ContentTooLarge) + case contentTooLarge(Operations.SaveAgentCredential.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListDesktopJobs.Output.ContentTooLarge { + public var contentTooLarge: Operations.SaveAgentCredential.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -19269,9 +19453,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19287,26 +19471,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListDesktopJobs.Output.InternalServerError.Body + public var body: Operations.SaveAgentCredential.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListDesktopJobs.Output.InternalServerError.Body) { + public init(body: Operations.SaveAgentCredential.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListDesktopJobs.Output.InternalServerError) + case internalServerError(Operations.SaveAgentCredential.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListDesktopJobs.Output.InternalServerError { + public var internalServerError: Operations.SaveAgentCredential.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -19320,9 +19504,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19338,26 +19522,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListDesktopJobs.Output.ServiceUnavailable.Body + public var body: Operations.SaveAgentCredential.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListDesktopJobs.Output.ServiceUnavailable.Body) { + public init(body: Operations.SaveAgentCredential.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/put(saveAgentCredential)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListDesktopJobs.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SaveAgentCredential.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListDesktopJobs.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SaveAgentCredential.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -19407,16 +19591,18 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/agents/{id}/desktop-jobs/{name}/history`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)`. - public enum GetDesktopJobHistory { - public static let id: Swift.String = "getDesktopJobHistory" + /// Deletes a credential and its use records, or declines a request for one, which starts a bot turn with a notice. + /// + /// - Remark: HTTP `DELETE /v1/agents/{id}/credentials/{name}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)`. + public enum DeleteAgentCredential { + public static let id: Swift.String = "deleteAgentCredential" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/path/name`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/path/name`. public var name: Swift.String /// Creates a new `Path`. /// @@ -19431,111 +19617,72 @@ public enum Operations { self.name = name } } - public var path: Operations.GetDesktopJobHistory.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/query/limit`. - public var limit: Swift.Int? - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/query/before`. - public var before: Swift.String? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - /// - before: - public init( - limit: Swift.Int? = nil, - before: Swift.String? = nil - ) { - self.limit = limit - self.before = before - } - } - public var query: Operations.GetDesktopJobHistory.Input.Query - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/header`. + public var path: Operations.DeleteAgentCredential.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetDesktopJobHistory.Input.Headers + public var headers: Operations.DeleteAgentCredential.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: public init( - path: Operations.GetDesktopJobHistory.Input.Path, - query: Operations.GetDesktopJobHistory.Input.Query = .init(), - headers: Operations.GetDesktopJobHistory.Input.Headers = .init() + path: Operations.DeleteAgentCredential.Input.Path, + headers: Operations.DeleteAgentCredential.Input.Headers = .init() ) { self.path = path - self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/200/content/application\/json`. - case json(Components.Schemas.TranscriptPage) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.TranscriptPage { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.GetDesktopJobHistory.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.GetDesktopJobHistory.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.GetDesktopJobHistory.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteAgentCredential.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.GetDesktopJobHistory.Output.Ok { + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteAgentCredential.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19551,26 +19698,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopJobHistory.Output.BadRequest.Body + public var body: Operations.DeleteAgentCredential.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopJobHistory.Output.BadRequest.Body) { + public init(body: Operations.DeleteAgentCredential.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetDesktopJobHistory.Output.BadRequest) + case badRequest(Operations.DeleteAgentCredential.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetDesktopJobHistory.Output.BadRequest { + public var badRequest: Operations.DeleteAgentCredential.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -19584,9 +19731,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -19602,26 +19749,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopJobHistory.Output.Unauthorized.Body + public var body: Operations.DeleteAgentCredential.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopJobHistory.Output.Unauthorized.Body) { + public init(body: Operations.DeleteAgentCredential.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetDesktopJobHistory.Output.Unauthorized) + case unauthorized(Operations.DeleteAgentCredential.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetDesktopJobHistory.Output.Unauthorized { + public var unauthorized: Operations.DeleteAgentCredential.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -19635,9 +19782,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19653,26 +19800,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopJobHistory.Output.NotFound.Body + public var body: Operations.DeleteAgentCredential.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopJobHistory.Output.NotFound.Body) { + public init(body: Operations.DeleteAgentCredential.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetDesktopJobHistory.Output.NotFound) + case notFound(Operations.DeleteAgentCredential.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetDesktopJobHistory.Output.NotFound { + public var notFound: Operations.DeleteAgentCredential.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -19686,9 +19833,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19704,26 +19851,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopJobHistory.Output.MethodNotAllowed.Body + public var body: Operations.DeleteAgentCredential.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopJobHistory.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteAgentCredential.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetDesktopJobHistory.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteAgentCredential.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetDesktopJobHistory.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteAgentCredential.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -19737,9 +19884,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19755,26 +19902,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopJobHistory.Output.Conflict.Body + public var body: Operations.DeleteAgentCredential.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopJobHistory.Output.Conflict.Body) { + public init(body: Operations.DeleteAgentCredential.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetDesktopJobHistory.Output.Conflict) + case conflict(Operations.DeleteAgentCredential.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetDesktopJobHistory.Output.Conflict { + public var conflict: Operations.DeleteAgentCredential.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -19788,9 +19935,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -19806,26 +19953,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopJobHistory.Output.ContentTooLarge.Body + public var body: Operations.DeleteAgentCredential.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopJobHistory.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteAgentCredential.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetDesktopJobHistory.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteAgentCredential.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetDesktopJobHistory.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteAgentCredential.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -19839,9 +19986,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19857,26 +20004,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopJobHistory.Output.InternalServerError.Body + public var body: Operations.DeleteAgentCredential.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopJobHistory.Output.InternalServerError.Body) { + public init(body: Operations.DeleteAgentCredential.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetDesktopJobHistory.Output.InternalServerError) + case internalServerError(Operations.DeleteAgentCredential.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetDesktopJobHistory.Output.InternalServerError { + public var internalServerError: Operations.DeleteAgentCredential.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -19890,9 +20037,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -19908,26 +20055,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopJobHistory.Output.ServiceUnavailable.Body + public var body: Operations.DeleteAgentCredential.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopJobHistory.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteAgentCredential.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/delete(deleteAgentCredential)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetDesktopJobHistory.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteAgentCredential.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetDesktopJobHistory.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteAgentCredential.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -19977,105 +20124,98 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/agents/{id}/desktop/control`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)`. - public enum GetDesktopControl { - public static let id: Swift.String = "getDesktopControl" + /// Declines a pending credential request without changing a saved credential. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/credentials/{name}/decline`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)`. + public enum DeclineAgentCredential { + public static let id: Swift.String = "declineAgentCredential" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/path/name`. + public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - name: + public init( + id: Swift.String, + name: Swift.String + ) { self.id = id + self.name = name } } - public var path: Operations.GetDesktopControl.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/header`. + public var path: Operations.DeclineAgentCredential.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetDesktopControl.Input.Headers + public var headers: Operations.DeclineAgentCredential.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.GetDesktopControl.Input.Path, - headers: Operations.GetDesktopControl.Input.Headers = .init() + path: Operations.DeclineAgentCredential.Input.Path, + headers: Operations.DeclineAgentCredential.Input.Headers = .init() ) { self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/200/content/application\/json`. - case json(Components.Schemas.DesktopControl) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.DesktopControl { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.GetDesktopControl.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.GetDesktopControl.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.GetDesktopControl.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeclineAgentCredential.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.GetDesktopControl.Output.Ok { + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeclineAgentCredential.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20091,26 +20231,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopControl.Output.BadRequest.Body + public var body: Operations.DeclineAgentCredential.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopControl.Output.BadRequest.Body) { + public init(body: Operations.DeclineAgentCredential.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetDesktopControl.Output.BadRequest) + case badRequest(Operations.DeclineAgentCredential.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetDesktopControl.Output.BadRequest { + public var badRequest: Operations.DeclineAgentCredential.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -20124,9 +20264,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -20142,26 +20282,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopControl.Output.Unauthorized.Body + public var body: Operations.DeclineAgentCredential.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopControl.Output.Unauthorized.Body) { + public init(body: Operations.DeclineAgentCredential.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetDesktopControl.Output.Unauthorized) + case unauthorized(Operations.DeclineAgentCredential.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetDesktopControl.Output.Unauthorized { + public var unauthorized: Operations.DeclineAgentCredential.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -20175,9 +20315,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20193,26 +20333,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopControl.Output.NotFound.Body + public var body: Operations.DeclineAgentCredential.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopControl.Output.NotFound.Body) { + public init(body: Operations.DeclineAgentCredential.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetDesktopControl.Output.NotFound) + case notFound(Operations.DeclineAgentCredential.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetDesktopControl.Output.NotFound { + public var notFound: Operations.DeclineAgentCredential.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -20226,9 +20366,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20244,26 +20384,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopControl.Output.MethodNotAllowed.Body + public var body: Operations.DeclineAgentCredential.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopControl.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeclineAgentCredential.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetDesktopControl.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeclineAgentCredential.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetDesktopControl.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeclineAgentCredential.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -20277,9 +20417,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20295,26 +20435,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopControl.Output.Conflict.Body + public var body: Operations.DeclineAgentCredential.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopControl.Output.Conflict.Body) { + public init(body: Operations.DeclineAgentCredential.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetDesktopControl.Output.Conflict) + case conflict(Operations.DeclineAgentCredential.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetDesktopControl.Output.Conflict { + public var conflict: Operations.DeclineAgentCredential.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -20328,9 +20468,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -20346,26 +20486,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopControl.Output.ContentTooLarge.Body + public var body: Operations.DeclineAgentCredential.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopControl.Output.ContentTooLarge.Body) { + public init(body: Operations.DeclineAgentCredential.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetDesktopControl.Output.ContentTooLarge) + case contentTooLarge(Operations.DeclineAgentCredential.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetDesktopControl.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeclineAgentCredential.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -20379,9 +20519,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20397,26 +20537,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopControl.Output.InternalServerError.Body + public var body: Operations.DeclineAgentCredential.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopControl.Output.InternalServerError.Body) { + public init(body: Operations.DeclineAgentCredential.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetDesktopControl.Output.InternalServerError) + case internalServerError(Operations.DeclineAgentCredential.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetDesktopControl.Output.InternalServerError { + public var internalServerError: Operations.DeclineAgentCredential.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -20430,9 +20570,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/decline/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20448,26 +20588,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopControl.Output.ServiceUnavailable.Body + public var body: Operations.DeclineAgentCredential.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopControl.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeclineAgentCredential.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/decline/post(declineAgentCredential)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetDesktopControl.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeclineAgentCredential.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetDesktopControl.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeclineAgentCredential.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -20517,91 +20657,92 @@ public enum Operations { } } } - /// Take control of the bot desktop (holder owner) or hand it back (holder bot). 409 when the bot has no bot desktop. + /// Requests sent with the credential's value in the last 90 days, newest first. Page with `before` set to the last use's ID. /// - /// - Remark: HTTP `PUT /v1/agents/{id}/desktop/control`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)`. - public enum PutDesktopControl { - public static let id: Swift.String = "putDesktopControl" + /// - Remark: HTTP `GET /v1/agents/{id}/credentials/{name}/uses`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)`. + public enum ListAgentCredentialUses { + public static let id: Swift.String = "listAgentCredentialUses" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/path/name`. + public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - name: + public init( + id: Swift.String, + name: Swift.String + ) { self.id = id + self.name = name } } - public var path: Operations.PutDesktopControl.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/header`. + public var path: Operations.ListAgentCredentialUses.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/query/limit`. + public var limit: Swift.Int? + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/query/before`. + public var before: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - before: + public init( + limit: Swift.Int? = nil, + before: Swift.String? = nil + ) { + self.limit = limit + self.before = before + } + } + public var query: Operations.ListAgentCredentialUses.Input.Query + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.PutDesktopControl.Input.Headers - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/requestBody/json/holder`. - @frozen public enum HolderPayload: String, Codable, Hashable, Sendable, CaseIterable { - case bot = "bot" - case owner = "owner" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/requestBody/json/holder`. - public var holder: Operations.PutDesktopControl.Input.Body.JsonPayload.HolderPayload - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - holder: - public init(holder: Operations.PutDesktopControl.Input.Body.JsonPayload.HolderPayload) { - self.holder = holder - } - public enum CodingKeys: String, CodingKey { - case holder - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/requestBody/content/application\/json`. - case json(Operations.PutDesktopControl.Input.Body.JsonPayload) - } - public var body: Operations.PutDesktopControl.Input.Body + public var headers: Operations.ListAgentCredentialUses.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: - /// - body: public init( - path: Operations.PutDesktopControl.Input.Path, - headers: Operations.PutDesktopControl.Input.Headers = .init(), - body: Operations.PutDesktopControl.Input.Body + path: Operations.ListAgentCredentialUses.Input.Path, + query: Operations.ListAgentCredentialUses.Input.Query = .init(), + headers: Operations.ListAgentCredentialUses.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.DesktopControl) + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/200/content/application\/json`. + case json([Components.Schemas.CredentialUse]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.DesktopControl { + public var json: [Components.Schemas.CredentialUse] { get throws { switch self { case let .json(body): @@ -20611,26 +20752,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutDesktopControl.Output.Ok.Body + public var body: Operations.ListAgentCredentialUses.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutDesktopControl.Output.Ok.Body) { + public init(body: Operations.ListAgentCredentialUses.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.PutDesktopControl.Output.Ok) + case ok(Operations.ListAgentCredentialUses.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.PutDesktopControl.Output.Ok { + public var ok: Operations.ListAgentCredentialUses.Output.Ok { get throws { switch self { case let .ok(response): @@ -20644,9 +20785,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20662,26 +20803,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutDesktopControl.Output.BadRequest.Body + public var body: Operations.ListAgentCredentialUses.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutDesktopControl.Output.BadRequest.Body) { + public init(body: Operations.ListAgentCredentialUses.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.PutDesktopControl.Output.BadRequest) + case badRequest(Operations.ListAgentCredentialUses.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.PutDesktopControl.Output.BadRequest { + public var badRequest: Operations.ListAgentCredentialUses.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -20695,9 +20836,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -20713,26 +20854,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutDesktopControl.Output.Unauthorized.Body + public var body: Operations.ListAgentCredentialUses.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutDesktopControl.Output.Unauthorized.Body) { + public init(body: Operations.ListAgentCredentialUses.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.PutDesktopControl.Output.Unauthorized) + case unauthorized(Operations.ListAgentCredentialUses.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.PutDesktopControl.Output.Unauthorized { + public var unauthorized: Operations.ListAgentCredentialUses.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -20746,9 +20887,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20764,26 +20905,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutDesktopControl.Output.NotFound.Body + public var body: Operations.ListAgentCredentialUses.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutDesktopControl.Output.NotFound.Body) { + public init(body: Operations.ListAgentCredentialUses.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.PutDesktopControl.Output.NotFound) + case notFound(Operations.ListAgentCredentialUses.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.PutDesktopControl.Output.NotFound { + public var notFound: Operations.ListAgentCredentialUses.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -20797,9 +20938,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20815,26 +20956,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutDesktopControl.Output.MethodNotAllowed.Body + public var body: Operations.ListAgentCredentialUses.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutDesktopControl.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListAgentCredentialUses.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.PutDesktopControl.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListAgentCredentialUses.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.PutDesktopControl.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListAgentCredentialUses.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -20848,9 +20989,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20866,26 +21007,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutDesktopControl.Output.Conflict.Body + public var body: Operations.ListAgentCredentialUses.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutDesktopControl.Output.Conflict.Body) { + public init(body: Operations.ListAgentCredentialUses.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.PutDesktopControl.Output.Conflict) + case conflict(Operations.ListAgentCredentialUses.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.PutDesktopControl.Output.Conflict { + public var conflict: Operations.ListAgentCredentialUses.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -20899,9 +21040,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -20917,26 +21058,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutDesktopControl.Output.ContentTooLarge.Body + public var body: Operations.ListAgentCredentialUses.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutDesktopControl.Output.ContentTooLarge.Body) { + public init(body: Operations.ListAgentCredentialUses.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.PutDesktopControl.Output.ContentTooLarge) + case contentTooLarge(Operations.ListAgentCredentialUses.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.PutDesktopControl.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListAgentCredentialUses.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -20950,9 +21091,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -20968,26 +21109,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutDesktopControl.Output.InternalServerError.Body + public var body: Operations.ListAgentCredentialUses.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutDesktopControl.Output.InternalServerError.Body) { + public init(body: Operations.ListAgentCredentialUses.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.PutDesktopControl.Output.InternalServerError) + case internalServerError(Operations.ListAgentCredentialUses.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.PutDesktopControl.Output.InternalServerError { + public var internalServerError: Operations.ListAgentCredentialUses.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -21001,9 +21142,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/credentials/{name}/uses/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21019,26 +21160,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutDesktopControl.Output.ServiceUnavailable.Body + public var body: Operations.ListAgentCredentialUses.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutDesktopControl.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListAgentCredentialUses.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/credentials/{name}/uses/get(listAgentCredentialUses)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.PutDesktopControl.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListAgentCredentialUses.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.PutDesktopControl.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListAgentCredentialUses.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -21088,16 +21229,14 @@ public enum Operations { } } } - /// Server-sent events. A control event carries the DesktopControl JSON object in data, once on connect and on every change. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. - /// - /// - Remark: HTTP `GET /v1/agents/{id}/desktop/events`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)`. - public enum StreamDesktopEvents { - public static let id: Swift.String = "streamDesktopEvents" + /// - Remark: HTTP `GET /v1/agents/{id}/desktop-jobs`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)`. + public enum ListDesktopJobs { + public static let id: Swift.String = "listDesktopJobs" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -21107,27 +21246,27 @@ public enum Operations { self.id = id } } - public var path: Operations.StreamDesktopEvents.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/header`. + public var path: Operations.ListDesktopJobs.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.StreamDesktopEvents.Input.Headers + public var headers: Operations.ListDesktopJobs.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.StreamDesktopEvents.Input.Path, - headers: Operations.StreamDesktopEvents.Input.Headers = .init() + path: Operations.ListDesktopJobs.Input.Path, + headers: Operations.ListDesktopJobs.Input.Headers = .init() ) { self.path = path self.headers = headers @@ -21135,44 +21274,44 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/200/content/text\/event-stream`. - case textEventStream(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.textEventStream`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/200/content/application\/json`. + case json(Components.Schemas.DesktopJobs) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.textEventStream`. - /// - SeeAlso: `.textEventStream`. - public var textEventStream: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.DesktopJobs { get throws { switch self { - case let .textEventStream(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.StreamDesktopEvents.Output.Ok.Body + public var body: Operations.ListDesktopJobs.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamDesktopEvents.Output.Ok.Body) { + public init(body: Operations.ListDesktopJobs.Output.Ok.Body) { self.body = body } } - /// SSE stream, not a JSON array + /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.StreamDesktopEvents.Output.Ok) + case ok(Operations.ListDesktopJobs.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.StreamDesktopEvents.Output.Ok { + public var ok: Operations.ListDesktopJobs.Output.Ok { get throws { switch self { case let .ok(response): @@ -21186,9 +21325,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21204,26 +21343,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamDesktopEvents.Output.BadRequest.Body + public var body: Operations.ListDesktopJobs.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamDesktopEvents.Output.BadRequest.Body) { + public init(body: Operations.ListDesktopJobs.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.StreamDesktopEvents.Output.BadRequest) + case badRequest(Operations.ListDesktopJobs.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.StreamDesktopEvents.Output.BadRequest { + public var badRequest: Operations.ListDesktopJobs.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -21237,9 +21376,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -21255,26 +21394,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamDesktopEvents.Output.Unauthorized.Body + public var body: Operations.ListDesktopJobs.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamDesktopEvents.Output.Unauthorized.Body) { + public init(body: Operations.ListDesktopJobs.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.StreamDesktopEvents.Output.Unauthorized) + case unauthorized(Operations.ListDesktopJobs.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.StreamDesktopEvents.Output.Unauthorized { + public var unauthorized: Operations.ListDesktopJobs.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -21288,9 +21427,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21306,26 +21445,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamDesktopEvents.Output.NotFound.Body + public var body: Operations.ListDesktopJobs.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamDesktopEvents.Output.NotFound.Body) { + public init(body: Operations.ListDesktopJobs.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.StreamDesktopEvents.Output.NotFound) + case notFound(Operations.ListDesktopJobs.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.StreamDesktopEvents.Output.NotFound { + public var notFound: Operations.ListDesktopJobs.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -21339,9 +21478,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21357,26 +21496,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamDesktopEvents.Output.MethodNotAllowed.Body + public var body: Operations.ListDesktopJobs.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamDesktopEvents.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListDesktopJobs.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.StreamDesktopEvents.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListDesktopJobs.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.StreamDesktopEvents.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListDesktopJobs.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -21390,9 +21529,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21408,26 +21547,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamDesktopEvents.Output.Conflict.Body + public var body: Operations.ListDesktopJobs.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamDesktopEvents.Output.Conflict.Body) { + public init(body: Operations.ListDesktopJobs.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.StreamDesktopEvents.Output.Conflict) + case conflict(Operations.ListDesktopJobs.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.StreamDesktopEvents.Output.Conflict { + public var conflict: Operations.ListDesktopJobs.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -21441,9 +21580,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -21459,26 +21598,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamDesktopEvents.Output.ContentTooLarge.Body + public var body: Operations.ListDesktopJobs.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamDesktopEvents.Output.ContentTooLarge.Body) { + public init(body: Operations.ListDesktopJobs.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.StreamDesktopEvents.Output.ContentTooLarge) + case contentTooLarge(Operations.ListDesktopJobs.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.StreamDesktopEvents.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListDesktopJobs.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -21492,9 +21631,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21510,26 +21649,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamDesktopEvents.Output.InternalServerError.Body + public var body: Operations.ListDesktopJobs.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamDesktopEvents.Output.InternalServerError.Body) { + public init(body: Operations.ListDesktopJobs.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.StreamDesktopEvents.Output.InternalServerError) + case internalServerError(Operations.ListDesktopJobs.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.StreamDesktopEvents.Output.InternalServerError { + public var internalServerError: Operations.ListDesktopJobs.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -21543,9 +21682,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21561,26 +21700,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamDesktopEvents.Output.ServiceUnavailable.Body + public var body: Operations.ListDesktopJobs.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamDesktopEvents.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListDesktopJobs.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/get(listDesktopJobs)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.StreamDesktopEvents.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListDesktopJobs.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.StreamDesktopEvents.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListDesktopJobs.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -21599,14 +21738,11 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } @frozen public enum AcceptableContentType: AcceptableProtocol { - case textEventStream case json case plainText case other(Swift.String) public init?(rawValue: Swift.String) { switch rawValue.lowercased() { - case "text/event-stream": - self = .textEventStream case "application/json": self = .json case "text/plain": @@ -21619,8 +21755,6 @@ public enum Operations { switch self { case let .other(string): return string - case .textEventStream: - return "text/event-stream" case .json: return "application/json" case .plainText: @@ -21629,67 +21763,96 @@ public enum Operations { } public static var allCases: [Self] { [ - .textEventStream, .json, .plainText ] } } } - /// - Remark: HTTP `GET /v1/agents/{id}/desktop/status`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)`. - public enum GetDesktopStatus { - public static let id: Swift.String = "getDesktopStatus" + /// - Remark: HTTP `GET /v1/agents/{id}/desktop-jobs/{name}/history`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)`. + public enum GetDesktopJobHistory { + public static let id: Swift.String = "getDesktopJobHistory" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/path/name`. + public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - name: + public init( + id: Swift.String, + name: Swift.String + ) { self.id = id + self.name = name } } - public var path: Operations.GetDesktopStatus.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/header`. + public var path: Operations.GetDesktopJobHistory.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/query/limit`. + public var limit: Swift.Int? + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/query/before`. + public var before: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - before: + public init( + limit: Swift.Int? = nil, + before: Swift.String? = nil + ) { + self.limit = limit + self.before = before + } + } + public var query: Operations.GetDesktopJobHistory.Input.Query + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetDesktopStatus.Input.Headers + public var headers: Operations.GetDesktopJobHistory.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.GetDesktopStatus.Input.Path, - headers: Operations.GetDesktopStatus.Input.Headers = .init() + path: Operations.GetDesktopJobHistory.Input.Path, + query: Operations.GetDesktopJobHistory.Input.Query = .init(), + headers: Operations.GetDesktopJobHistory.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/200/content/application\/json`. - case json(Components.Schemas.DesktopStatus) + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/200/content/application\/json`. + case json(Components.Schemas.TranscriptPage) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.DesktopStatus { + public var json: Components.Schemas.TranscriptPage { get throws { switch self { case let .json(body): @@ -21699,26 +21862,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopStatus.Output.Ok.Body + public var body: Operations.GetDesktopJobHistory.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopStatus.Output.Ok.Body) { + public init(body: Operations.GetDesktopJobHistory.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.GetDesktopStatus.Output.Ok) + case ok(Operations.GetDesktopJobHistory.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.GetDesktopStatus.Output.Ok { + public var ok: Operations.GetDesktopJobHistory.Output.Ok { get throws { switch self { case let .ok(response): @@ -21732,9 +21895,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21750,26 +21913,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopStatus.Output.BadRequest.Body + public var body: Operations.GetDesktopJobHistory.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopStatus.Output.BadRequest.Body) { + public init(body: Operations.GetDesktopJobHistory.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetDesktopStatus.Output.BadRequest) + case badRequest(Operations.GetDesktopJobHistory.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetDesktopStatus.Output.BadRequest { + public var badRequest: Operations.GetDesktopJobHistory.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -21783,9 +21946,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -21801,26 +21964,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopStatus.Output.Unauthorized.Body + public var body: Operations.GetDesktopJobHistory.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopStatus.Output.Unauthorized.Body) { + public init(body: Operations.GetDesktopJobHistory.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetDesktopStatus.Output.Unauthorized) + case unauthorized(Operations.GetDesktopJobHistory.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetDesktopStatus.Output.Unauthorized { + public var unauthorized: Operations.GetDesktopJobHistory.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -21834,9 +21997,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21852,26 +22015,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopStatus.Output.NotFound.Body + public var body: Operations.GetDesktopJobHistory.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopStatus.Output.NotFound.Body) { + public init(body: Operations.GetDesktopJobHistory.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetDesktopStatus.Output.NotFound) + case notFound(Operations.GetDesktopJobHistory.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetDesktopStatus.Output.NotFound { + public var notFound: Operations.GetDesktopJobHistory.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -21885,9 +22048,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21903,26 +22066,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopStatus.Output.MethodNotAllowed.Body + public var body: Operations.GetDesktopJobHistory.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopStatus.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetDesktopJobHistory.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetDesktopStatus.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetDesktopJobHistory.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetDesktopStatus.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetDesktopJobHistory.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -21936,9 +22099,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -21954,26 +22117,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopStatus.Output.Conflict.Body + public var body: Operations.GetDesktopJobHistory.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopStatus.Output.Conflict.Body) { + public init(body: Operations.GetDesktopJobHistory.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetDesktopStatus.Output.Conflict) + case conflict(Operations.GetDesktopJobHistory.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetDesktopStatus.Output.Conflict { + public var conflict: Operations.GetDesktopJobHistory.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -21987,9 +22150,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -22005,26 +22168,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopStatus.Output.ContentTooLarge.Body + public var body: Operations.GetDesktopJobHistory.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopStatus.Output.ContentTooLarge.Body) { + public init(body: Operations.GetDesktopJobHistory.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetDesktopStatus.Output.ContentTooLarge) + case contentTooLarge(Operations.GetDesktopJobHistory.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetDesktopStatus.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetDesktopJobHistory.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -22038,9 +22201,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -22056,26 +22219,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopStatus.Output.InternalServerError.Body + public var body: Operations.GetDesktopJobHistory.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopStatus.Output.InternalServerError.Body) { + public init(body: Operations.GetDesktopJobHistory.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetDesktopStatus.Output.InternalServerError) + case internalServerError(Operations.GetDesktopJobHistory.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetDesktopStatus.Output.InternalServerError { + public var internalServerError: Operations.GetDesktopJobHistory.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -22089,9 +22252,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop-jobs/{name}/history/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -22107,26 +22270,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetDesktopStatus.Output.ServiceUnavailable.Body + public var body: Operations.GetDesktopJobHistory.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetDesktopStatus.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetDesktopJobHistory.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop-jobs/{name}/history/get(getDesktopJobHistory)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetDesktopStatus.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetDesktopJobHistory.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetDesktopStatus.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetDesktopJobHistory.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -22176,16 +22339,14 @@ public enum Operations { } } } - /// Issue a single-use viewer link for the bot desktop. The page and its WebSocket live outside /v1 and need no Authorization header: the link is the credential. With passive=true the link is watch-only: it neither boots the bot's machine nor keeps it awake, and its connection ends when the machine stops. 409 when the bot has no bot desktop. - /// - /// - Remark: HTTP `POST /v1/agents/{id}/desktop/viewer`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)`. - public enum CreateDesktopViewer { - public static let id: Swift.String = "createDesktopViewer" + /// - Remark: HTTP `GET /v1/agents/{id}/desktop/control`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)`. + public enum GetDesktopControl { + public static let id: Swift.String = "getDesktopControl" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -22195,59 +22356,43 @@ public enum Operations { self.id = id } } - public var path: Operations.CreateDesktopViewer.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/query/passive`. - public var passive: Swift.String? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - passive: - public init(passive: Swift.String? = nil) { - self.passive = passive - } - } - public var query: Operations.CreateDesktopViewer.Input.Query - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/header`. + public var path: Operations.GetDesktopControl.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CreateDesktopViewer.Input.Headers + public var headers: Operations.GetDesktopControl.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: public init( - path: Operations.CreateDesktopViewer.Input.Path, - query: Operations.CreateDesktopViewer.Input.Query = .init(), - headers: Operations.CreateDesktopViewer.Input.Headers = .init() + path: Operations.GetDesktopControl.Input.Path, + headers: Operations.GetDesktopControl.Input.Headers = .init() ) { self.path = path - self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/201/content/application\/json`. - case json(Components.Schemas.DesktopViewer) + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/200/content/application\/json`. + case json(Components.Schemas.DesktopControl) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.DesktopViewer { + public var json: Components.Schemas.DesktopControl { get throws { switch self { case let .json(body): @@ -22257,42 +22402,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateDesktopViewer.Output.Created.Body - /// Creates a new `Created`. + public var body: Operations.GetDesktopControl.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateDesktopViewer.Output.Created.Body) { + public init(body: Operations.GetDesktopControl.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/201`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/200`. /// - /// HTTP response code: `201 created`. - case created(Operations.CreateDesktopViewer.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `200 ok`. + case ok(Operations.GetDesktopControl.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.CreateDesktopViewer.Output.Created { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetDesktopControl.Output.Ok { get throws { switch self { - case let .created(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -22308,26 +22453,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateDesktopViewer.Output.BadRequest.Body + public var body: Operations.GetDesktopControl.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateDesktopViewer.Output.BadRequest.Body) { + public init(body: Operations.GetDesktopControl.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CreateDesktopViewer.Output.BadRequest) + case badRequest(Operations.GetDesktopControl.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CreateDesktopViewer.Output.BadRequest { + public var badRequest: Operations.GetDesktopControl.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -22341,9 +22486,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -22359,26 +22504,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateDesktopViewer.Output.Unauthorized.Body + public var body: Operations.GetDesktopControl.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateDesktopViewer.Output.Unauthorized.Body) { + public init(body: Operations.GetDesktopControl.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CreateDesktopViewer.Output.Unauthorized) + case unauthorized(Operations.GetDesktopControl.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CreateDesktopViewer.Output.Unauthorized { + public var unauthorized: Operations.GetDesktopControl.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -22392,9 +22537,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -22410,26 +22555,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateDesktopViewer.Output.NotFound.Body + public var body: Operations.GetDesktopControl.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateDesktopViewer.Output.NotFound.Body) { + public init(body: Operations.GetDesktopControl.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CreateDesktopViewer.Output.NotFound) + case notFound(Operations.GetDesktopControl.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CreateDesktopViewer.Output.NotFound { + public var notFound: Operations.GetDesktopControl.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -22443,9 +22588,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -22461,26 +22606,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateDesktopViewer.Output.MethodNotAllowed.Body + public var body: Operations.GetDesktopControl.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateDesktopViewer.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetDesktopControl.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CreateDesktopViewer.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetDesktopControl.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CreateDesktopViewer.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetDesktopControl.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -22494,9 +22639,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -22512,26 +22657,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateDesktopViewer.Output.Conflict.Body + public var body: Operations.GetDesktopControl.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateDesktopViewer.Output.Conflict.Body) { + public init(body: Operations.GetDesktopControl.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CreateDesktopViewer.Output.Conflict) + case conflict(Operations.GetDesktopControl.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CreateDesktopViewer.Output.Conflict { + public var conflict: Operations.GetDesktopControl.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -22545,9 +22690,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -22563,26 +22708,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateDesktopViewer.Output.ContentTooLarge.Body + public var body: Operations.GetDesktopControl.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateDesktopViewer.Output.ContentTooLarge.Body) { + public init(body: Operations.GetDesktopControl.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CreateDesktopViewer.Output.ContentTooLarge) + case contentTooLarge(Operations.GetDesktopControl.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CreateDesktopViewer.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetDesktopControl.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -22596,9 +22741,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -22614,26 +22759,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateDesktopViewer.Output.InternalServerError.Body + public var body: Operations.GetDesktopControl.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateDesktopViewer.Output.InternalServerError.Body) { + public init(body: Operations.GetDesktopControl.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CreateDesktopViewer.Output.InternalServerError) + case internalServerError(Operations.GetDesktopControl.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CreateDesktopViewer.Output.InternalServerError { + public var internalServerError: Operations.GetDesktopControl.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -22647,9 +22792,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -22665,26 +22810,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateDesktopViewer.Output.ServiceUnavailable.Body + public var body: Operations.GetDesktopControl.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateDesktopViewer.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetDesktopControl.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/get(getDesktopControl)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CreateDesktopViewer.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetDesktopControl.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CreateDesktopViewer.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetDesktopControl.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -22734,14 +22879,16 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/agents/{id}/duplicate`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)`. - public enum DuplicateAgent { - public static let id: Swift.String = "duplicateAgent" + /// Take control of the bot desktop (holder owner) or hand it back (holder bot). 409 when the bot has no bot desktop. + /// + /// - Remark: HTTP `PUT /v1/agents/{id}/desktop/control`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)`. + public enum PutDesktopControl { + public static let id: Swift.String = "putDesktopControl" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -22751,349 +22898,72 @@ public enum Operations { self.id = id } } - public var path: Operations.DuplicateAgent.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/header`. + public var path: Operations.PutDesktopControl.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DuplicateAgent.Input.Headers + public var headers: Operations.PutDesktopControl.Input.Headers + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/requestBody/json/holder`. + @frozen public enum HolderPayload: String, Codable, Hashable, Sendable, CaseIterable { + case bot = "bot" + case owner = "owner" + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/requestBody/json/holder`. + public var holder: Operations.PutDesktopControl.Input.Body.JsonPayload.HolderPayload + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - holder: + public init(holder: Operations.PutDesktopControl.Input.Body.JsonPayload.HolderPayload) { + self.holder = holder + } + public enum CodingKeys: String, CodingKey { + case holder + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/requestBody/content/application\/json`. + case json(Operations.PutDesktopControl.Input.Body.JsonPayload) + } + public var body: Operations.PutDesktopControl.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.DuplicateAgent.Input.Path, - headers: Operations.DuplicateAgent.Input.Headers = .init() + path: Operations.PutDesktopControl.Input.Path, + headers: Operations.PutDesktopControl.Input.Headers = .init(), + body: Operations.PutDesktopControl.Input.Body ) { self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/avatar`. - public var avatar: Components.Schemas.BotAvatarDefinition - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/createdAt`. - public var createdAt: Swift.String - /// Every other bot; with `delegate` in `tools` this bot may message any of them. The server ignores it in input. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/delegates`. - public var delegates: [Swift.String] - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/description`. - public var description: Swift.String - /// The model for this bot's desktop jobs; unset, they use the bot's own model. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/desktopModel`. - public struct DesktopModelPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/desktopModel/model`. - public var model: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/desktopModel/provider`. - public var provider: Swift.String - /// Creates a new `DesktopModelPayload`. - /// - /// - Parameters: - /// - model: - /// - provider: - public init( - model: Swift.String, - provider: Swift.String - ) { - self.model = model - self.provider = provider - } - public enum CodingKeys: String, CodingKey { - case model - case provider - } - } - /// The model for this bot's desktop jobs; unset, they use the bot's own model. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/desktopModel`. - public var desktopModel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.DesktopModelPayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/enabled`. - public var enabled: Swift.Bool - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/id`. - public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference`. - public struct InferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference/maxOutputTokens`. - public var maxOutputTokens: Swift.Double? - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference/temperature`. - public var temperature: Swift.Double? - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference/thinkingLevel`. - @frozen public enum ThinkingLevelPayload: String, Codable, Hashable, Sendable, CaseIterable { - case off = "off" - case minimal = "minimal" - case low = "low" - case medium = "medium" - case high = "high" - case xhigh = "xhigh" - case max = "max" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference/thinkingLevel`. - public var thinkingLevel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.InferencePayload.ThinkingLevelPayload? - /// Creates a new `InferencePayload`. - /// - /// - Parameters: - /// - maxOutputTokens: - /// - temperature: - /// - thinkingLevel: - public init( - maxOutputTokens: Swift.Double? = nil, - temperature: Swift.Double? = nil, - thinkingLevel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.InferencePayload.ThinkingLevelPayload? = nil - ) { - self.maxOutputTokens = maxOutputTokens - self.temperature = temperature - self.thinkingLevel = thinkingLevel - } - public enum CodingKeys: String, CodingKey { - case maxOutputTokens - case temperature - case thinkingLevel - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference`. - public var inference: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.InferencePayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/instructions`. - public var instructions: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/mcpServers`. - public var mcpServers: [Swift.String] - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/model`. - public var model: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/name`. - public var name: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/provider`. - public var provider: Swift.String - /// How the bot reviews its turns to learn: whether at all, after how many tool-activity rounds for skills and memory, and how much of a turn a review reads. Unset means enabled with thresholds of 10. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review`. - public struct ReviewPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review/enabled`. - public var enabled: Swift.Bool - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review/maxInputTokens`. - public var maxInputTokens: Swift.Int? - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review/memoryThreshold`. - public var memoryThreshold: Swift.Int - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review/skillThreshold`. - public var skillThreshold: Swift.Int - /// Creates a new `ReviewPayload`. - /// - /// - Parameters: - /// - enabled: - /// - maxInputTokens: - /// - memoryThreshold: - /// - skillThreshold: - public init( - enabled: Swift.Bool, - maxInputTokens: Swift.Int? = nil, - memoryThreshold: Swift.Int, - skillThreshold: Swift.Int - ) { - self.enabled = enabled - self.maxInputTokens = maxInputTokens - self.memoryThreshold = memoryThreshold - self.skillThreshold = skillThreshold - } - public enum CodingKeys: String, CodingKey { - case enabled - case maxInputTokens - case memoryThreshold - case skillThreshold - } - } - /// How the bot reviews its turns to learn: whether at all, after how many tool-activity rounds for skills and memory, and how much of a turn a review reads. Unset means enabled with thresholds of 10. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review`. - public var review: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.ReviewPayload? - /// The model that runs this bot's reviews; unset, they use the bot's own model. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/reviewModel`. - public struct ReviewModelPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/reviewModel/model`. - public var model: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/reviewModel/provider`. - public var provider: Swift.String - /// Creates a new `ReviewModelPayload`. - /// - /// - Parameters: - /// - model: - /// - provider: - public init( - model: Swift.String, - provider: Swift.String - ) { - self.model = model - self.provider = provider - } - public enum CodingKeys: String, CodingKey { - case model - case provider - } - } - /// The model that runs this bot's reviews; unset, they use the bot's own model. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/reviewModel`. - public var reviewModel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.ReviewModelPayload? - /// True whenever `tools` includes `memory`; the server ignores it in input. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/sharedMemory`. - public var sharedMemory: Swift.Bool? - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/sharedSkills`. - public var sharedSkills: [Swift.String]? - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/SkillsPayload`. - public struct SkillsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/SkillsPayload/instructions`. - public var instructions: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/SkillsPayload/name`. - public var name: Swift.String - /// Creates a new `SkillsPayloadPayload`. - /// - /// - Parameters: - /// - instructions: - /// - name: - public init( - instructions: Swift.String, - name: Swift.String - ) { - self.instructions = instructions - self.name = name - } - public enum CodingKeys: String, CodingKey { - case instructions - case name - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/skills`. - public typealias SkillsPayload = [Operations.DuplicateAgent.Output.Created.Body.JsonPayload.SkillsPayloadPayload] - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/skills`. - public var skills: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.SkillsPayload - /// The bot's tools; always includes `schedule` and `codemode`. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/tools`. - public var tools: [Swift.String] - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/updatedAt`. - public var updatedAt: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/webSearchProvider`. - @frozen public enum WebSearchProviderPayload: String, Codable, Hashable, Sendable, CaseIterable { - case mixed = "mixed" - case exa = "exa" - case _empty_ = "" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/webSearchProvider`. - public var webSearchProvider: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.WebSearchProviderPayload? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - avatar: - /// - createdAt: - /// - delegates: Every other bot; with `delegate` in `tools` this bot may message any of them. The server ignores it in input. - /// - description: - /// - desktopModel: The model for this bot's desktop jobs; unset, they use the bot's own model. - /// - enabled: - /// - id: - /// - inference: - /// - instructions: - /// - mcpServers: - /// - model: - /// - name: - /// - provider: - /// - review: How the bot reviews its turns to learn: whether at all, after how many tool-activity rounds for skills and memory, and how much of a turn a review reads. Unset means enabled with thresholds of 10. - /// - reviewModel: The model that runs this bot's reviews; unset, they use the bot's own model. - /// - sharedMemory: True whenever `tools` includes `memory`; the server ignores it in input. - /// - sharedSkills: - /// - skills: - /// - tools: The bot's tools; always includes `schedule` and `codemode`. - /// - updatedAt: - /// - webSearchProvider: - public init( - avatar: Components.Schemas.BotAvatarDefinition, - createdAt: Swift.String, - delegates: [Swift.String], - description: Swift.String, - desktopModel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.DesktopModelPayload? = nil, - enabled: Swift.Bool, - id: Swift.String, - inference: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.InferencePayload? = nil, - instructions: Swift.String, - mcpServers: [Swift.String], - model: Swift.String, - name: Swift.String, - provider: Swift.String, - review: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.ReviewPayload? = nil, - reviewModel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.ReviewModelPayload? = nil, - sharedMemory: Swift.Bool? = nil, - sharedSkills: [Swift.String]? = nil, - skills: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.SkillsPayload, - tools: [Swift.String], - updatedAt: Swift.String, - webSearchProvider: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.WebSearchProviderPayload? = nil - ) { - self.avatar = avatar - self.createdAt = createdAt - self.delegates = delegates - self.description = description - self.desktopModel = desktopModel - self.enabled = enabled - self.id = id - self.inference = inference - self.instructions = instructions - self.mcpServers = mcpServers - self.model = model - self.name = name - self.provider = provider - self.review = review - self.reviewModel = reviewModel - self.sharedMemory = sharedMemory - self.sharedSkills = sharedSkills - self.skills = skills - self.tools = tools - self.updatedAt = updatedAt - self.webSearchProvider = webSearchProvider - } - public enum CodingKeys: String, CodingKey { - case avatar - case createdAt - case delegates - case description - case desktopModel - case enabled - case id - case inference - case instructions - case mcpServers - case model - case name - case provider - case review - case reviewModel - case sharedMemory - case sharedSkills - case skills - case tools - case updatedAt - case webSearchProvider - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/application\/json`. - case json(Operations.DuplicateAgent.Output.Created.Body.JsonPayload?) + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.DesktopControl) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.DuplicateAgent.Output.Created.Body.JsonPayload? { + public var json: Components.Schemas.DesktopControl { get throws { switch self { case let .json(body): @@ -23103,42 +22973,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DuplicateAgent.Output.Created.Body - /// Creates a new `Created`. + public var body: Operations.PutDesktopControl.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DuplicateAgent.Output.Created.Body) { + public init(body: Operations.PutDesktopControl.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/201`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/200`. /// - /// HTTP response code: `201 created`. - case created(Operations.DuplicateAgent.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `200 ok`. + case ok(Operations.PutDesktopControl.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.DuplicateAgent.Output.Created { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.PutDesktopControl.Output.Ok { get throws { switch self { - case let .created(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -23154,26 +23024,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DuplicateAgent.Output.BadRequest.Body + public var body: Operations.PutDesktopControl.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DuplicateAgent.Output.BadRequest.Body) { + public init(body: Operations.PutDesktopControl.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DuplicateAgent.Output.BadRequest) + case badRequest(Operations.PutDesktopControl.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DuplicateAgent.Output.BadRequest { + public var badRequest: Operations.PutDesktopControl.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -23187,9 +23057,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -23205,26 +23075,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DuplicateAgent.Output.Unauthorized.Body + public var body: Operations.PutDesktopControl.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DuplicateAgent.Output.Unauthorized.Body) { + public init(body: Operations.PutDesktopControl.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DuplicateAgent.Output.Unauthorized) + case unauthorized(Operations.PutDesktopControl.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DuplicateAgent.Output.Unauthorized { + public var unauthorized: Operations.PutDesktopControl.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -23238,9 +23108,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -23256,26 +23126,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DuplicateAgent.Output.NotFound.Body + public var body: Operations.PutDesktopControl.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DuplicateAgent.Output.NotFound.Body) { + public init(body: Operations.PutDesktopControl.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DuplicateAgent.Output.NotFound) + case notFound(Operations.PutDesktopControl.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DuplicateAgent.Output.NotFound { + public var notFound: Operations.PutDesktopControl.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -23289,9 +23159,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -23307,26 +23177,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DuplicateAgent.Output.MethodNotAllowed.Body + public var body: Operations.PutDesktopControl.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DuplicateAgent.Output.MethodNotAllowed.Body) { + public init(body: Operations.PutDesktopControl.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DuplicateAgent.Output.MethodNotAllowed) + case methodNotAllowed(Operations.PutDesktopControl.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DuplicateAgent.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.PutDesktopControl.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -23340,9 +23210,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -23358,26 +23228,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DuplicateAgent.Output.Conflict.Body + public var body: Operations.PutDesktopControl.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DuplicateAgent.Output.Conflict.Body) { + public init(body: Operations.PutDesktopControl.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DuplicateAgent.Output.Conflict) + case conflict(Operations.PutDesktopControl.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DuplicateAgent.Output.Conflict { + public var conflict: Operations.PutDesktopControl.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -23391,9 +23261,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -23409,26 +23279,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DuplicateAgent.Output.ContentTooLarge.Body + public var body: Operations.PutDesktopControl.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DuplicateAgent.Output.ContentTooLarge.Body) { + public init(body: Operations.PutDesktopControl.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DuplicateAgent.Output.ContentTooLarge) + case contentTooLarge(Operations.PutDesktopControl.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DuplicateAgent.Output.ContentTooLarge { + public var contentTooLarge: Operations.PutDesktopControl.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -23442,9 +23312,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -23460,26 +23330,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DuplicateAgent.Output.InternalServerError.Body + public var body: Operations.PutDesktopControl.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DuplicateAgent.Output.InternalServerError.Body) { + public init(body: Operations.PutDesktopControl.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DuplicateAgent.Output.InternalServerError) + case internalServerError(Operations.PutDesktopControl.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DuplicateAgent.Output.InternalServerError { + public var internalServerError: Operations.PutDesktopControl.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -23493,9 +23363,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/control/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -23511,26 +23381,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DuplicateAgent.Output.ServiceUnavailable.Body + public var body: Operations.PutDesktopControl.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DuplicateAgent.Output.ServiceUnavailable.Body) { + public init(body: Operations.PutDesktopControl.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/control/put(putDesktopControl)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DuplicateAgent.Output.ServiceUnavailable) + case serviceUnavailable(Operations.PutDesktopControl.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DuplicateAgent.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.PutDesktopControl.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -23580,16 +23450,16 @@ public enum Operations { } } } - /// Server-sent events. Each snapshot event carries a ChatSnapshot JSON object in data. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. Reconnect by fetching the current snapshot; there is no Last-Event-ID replay. + /// Server-sent events. A control event carries the DesktopControl JSON object in data, once on connect and on every change. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. /// - /// - Remark: HTTP `GET /v1/agents/{id}/events`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)`. - public enum StreamChatEvents { - public static let id: Swift.String = "streamChatEvents" + /// - Remark: HTTP `GET /v1/agents/{id}/desktop/events`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)`. + public enum StreamDesktopEvents { + public static let id: Swift.String = "streamDesktopEvents" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -23599,53 +23469,37 @@ public enum Operations { self.id = id } } - public var path: Operations.StreamChatEvents.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/query/limit`. - public var limit: Swift.Int? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - public init(limit: Swift.Int? = nil) { - self.limit = limit - } - } - public var query: Operations.StreamChatEvents.Input.Query - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/header`. + public var path: Operations.StreamDesktopEvents.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.StreamChatEvents.Input.Headers + public var headers: Operations.StreamDesktopEvents.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: public init( - path: Operations.StreamChatEvents.Input.Path, - query: Operations.StreamChatEvents.Input.Query = .init(), - headers: Operations.StreamChatEvents.Input.Headers = .init() + path: Operations.StreamDesktopEvents.Input.Path, + headers: Operations.StreamDesktopEvents.Input.Headers = .init() ) { self.path = path - self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/200/content/text\/event-stream`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/200/content/text\/event-stream`. case textEventStream(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.textEventStream`. /// @@ -23661,26 +23515,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamChatEvents.Output.Ok.Body + public var body: Operations.StreamDesktopEvents.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamChatEvents.Output.Ok.Body) { + public init(body: Operations.StreamDesktopEvents.Output.Ok.Body) { self.body = body } } /// SSE stream, not a JSON array /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.StreamChatEvents.Output.Ok) + case ok(Operations.StreamDesktopEvents.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.StreamChatEvents.Output.Ok { + public var ok: Operations.StreamDesktopEvents.Output.Ok { get throws { switch self { case let .ok(response): @@ -23694,9 +23548,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -23712,26 +23566,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamChatEvents.Output.BadRequest.Body + public var body: Operations.StreamDesktopEvents.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamChatEvents.Output.BadRequest.Body) { + public init(body: Operations.StreamDesktopEvents.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.StreamChatEvents.Output.BadRequest) + case badRequest(Operations.StreamDesktopEvents.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.StreamChatEvents.Output.BadRequest { + public var badRequest: Operations.StreamDesktopEvents.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -23745,9 +23599,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -23763,26 +23617,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamChatEvents.Output.Unauthorized.Body + public var body: Operations.StreamDesktopEvents.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamChatEvents.Output.Unauthorized.Body) { + public init(body: Operations.StreamDesktopEvents.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.StreamChatEvents.Output.Unauthorized) + case unauthorized(Operations.StreamDesktopEvents.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.StreamChatEvents.Output.Unauthorized { + public var unauthorized: Operations.StreamDesktopEvents.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -23796,9 +23650,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -23814,26 +23668,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamChatEvents.Output.NotFound.Body + public var body: Operations.StreamDesktopEvents.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamChatEvents.Output.NotFound.Body) { + public init(body: Operations.StreamDesktopEvents.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.StreamChatEvents.Output.NotFound) + case notFound(Operations.StreamDesktopEvents.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.StreamChatEvents.Output.NotFound { + public var notFound: Operations.StreamDesktopEvents.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -23847,9 +23701,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -23865,26 +23719,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamChatEvents.Output.MethodNotAllowed.Body + public var body: Operations.StreamDesktopEvents.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamChatEvents.Output.MethodNotAllowed.Body) { + public init(body: Operations.StreamDesktopEvents.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.StreamChatEvents.Output.MethodNotAllowed) + case methodNotAllowed(Operations.StreamDesktopEvents.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.StreamChatEvents.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.StreamDesktopEvents.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -23898,9 +23752,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -23916,26 +23770,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamChatEvents.Output.Conflict.Body + public var body: Operations.StreamDesktopEvents.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamChatEvents.Output.Conflict.Body) { + public init(body: Operations.StreamDesktopEvents.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.StreamChatEvents.Output.Conflict) + case conflict(Operations.StreamDesktopEvents.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.StreamChatEvents.Output.Conflict { + public var conflict: Operations.StreamDesktopEvents.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -23949,9 +23803,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -23967,26 +23821,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamChatEvents.Output.ContentTooLarge.Body + public var body: Operations.StreamDesktopEvents.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamChatEvents.Output.ContentTooLarge.Body) { + public init(body: Operations.StreamDesktopEvents.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.StreamChatEvents.Output.ContentTooLarge) + case contentTooLarge(Operations.StreamDesktopEvents.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.StreamChatEvents.Output.ContentTooLarge { + public var contentTooLarge: Operations.StreamDesktopEvents.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -24000,9 +23854,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24018,26 +23872,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamChatEvents.Output.InternalServerError.Body + public var body: Operations.StreamDesktopEvents.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamChatEvents.Output.InternalServerError.Body) { + public init(body: Operations.StreamDesktopEvents.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.StreamChatEvents.Output.InternalServerError) + case internalServerError(Operations.StreamDesktopEvents.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.StreamChatEvents.Output.InternalServerError { + public var internalServerError: Operations.StreamDesktopEvents.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -24051,9 +23905,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/events/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24069,26 +23923,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamChatEvents.Output.ServiceUnavailable.Body + public var body: Operations.StreamDesktopEvents.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamChatEvents.Output.ServiceUnavailable.Body) { + public init(body: Operations.StreamDesktopEvents.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/events/get(streamDesktopEvents)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.StreamChatEvents.Output.ServiceUnavailable) + case serviceUnavailable(Operations.StreamDesktopEvents.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.StreamChatEvents.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.StreamDesktopEvents.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -24144,16 +23998,14 @@ public enum Operations { } } } - /// Desktop job actions an intent check held for the owner, newest first, pending and decided. - /// - /// - Remark: HTTP `GET /v1/agents/{id}/held-actions`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)`. - public enum ListAgentHeldActions { - public static let id: Swift.String = "listAgentHeldActions" + /// - Remark: HTTP `GET /v1/agents/{id}/desktop/status`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)`. + public enum GetDesktopStatus { + public static let id: Swift.String = "getDesktopStatus" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -24163,27 +24015,27 @@ public enum Operations { self.id = id } } - public var path: Operations.ListAgentHeldActions.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/header`. + public var path: Operations.GetDesktopStatus.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListAgentHeldActions.Input.Headers + public var headers: Operations.GetDesktopStatus.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.ListAgentHeldActions.Input.Path, - headers: Operations.ListAgentHeldActions.Input.Headers = .init() + path: Operations.GetDesktopStatus.Input.Path, + headers: Operations.GetDesktopStatus.Input.Headers = .init() ) { self.path = path self.headers = headers @@ -24191,15 +24043,15 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/200/content/application\/json`. - case json([Components.Schemas.HeldAction]) + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/200/content/application\/json`. + case json(Components.Schemas.DesktopStatus) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.HeldAction] { + public var json: Components.Schemas.DesktopStatus { get throws { switch self { case let .json(body): @@ -24209,26 +24061,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentHeldActions.Output.Ok.Body + public var body: Operations.GetDesktopStatus.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentHeldActions.Output.Ok.Body) { + public init(body: Operations.GetDesktopStatus.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListAgentHeldActions.Output.Ok) + case ok(Operations.GetDesktopStatus.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListAgentHeldActions.Output.Ok { + public var ok: Operations.GetDesktopStatus.Output.Ok { get throws { switch self { case let .ok(response): @@ -24242,9 +24094,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24260,26 +24112,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentHeldActions.Output.BadRequest.Body + public var body: Operations.GetDesktopStatus.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentHeldActions.Output.BadRequest.Body) { + public init(body: Operations.GetDesktopStatus.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListAgentHeldActions.Output.BadRequest) + case badRequest(Operations.GetDesktopStatus.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListAgentHeldActions.Output.BadRequest { + public var badRequest: Operations.GetDesktopStatus.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -24293,9 +24145,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -24311,26 +24163,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentHeldActions.Output.Unauthorized.Body + public var body: Operations.GetDesktopStatus.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentHeldActions.Output.Unauthorized.Body) { + public init(body: Operations.GetDesktopStatus.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListAgentHeldActions.Output.Unauthorized) + case unauthorized(Operations.GetDesktopStatus.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListAgentHeldActions.Output.Unauthorized { + public var unauthorized: Operations.GetDesktopStatus.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -24344,9 +24196,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24362,26 +24214,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentHeldActions.Output.NotFound.Body + public var body: Operations.GetDesktopStatus.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentHeldActions.Output.NotFound.Body) { + public init(body: Operations.GetDesktopStatus.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListAgentHeldActions.Output.NotFound) + case notFound(Operations.GetDesktopStatus.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListAgentHeldActions.Output.NotFound { + public var notFound: Operations.GetDesktopStatus.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -24395,9 +24247,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24413,26 +24265,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentHeldActions.Output.MethodNotAllowed.Body + public var body: Operations.GetDesktopStatus.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentHeldActions.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetDesktopStatus.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListAgentHeldActions.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetDesktopStatus.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListAgentHeldActions.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetDesktopStatus.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -24446,9 +24298,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24464,26 +24316,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentHeldActions.Output.Conflict.Body + public var body: Operations.GetDesktopStatus.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentHeldActions.Output.Conflict.Body) { + public init(body: Operations.GetDesktopStatus.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListAgentHeldActions.Output.Conflict) + case conflict(Operations.GetDesktopStatus.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListAgentHeldActions.Output.Conflict { + public var conflict: Operations.GetDesktopStatus.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -24497,9 +24349,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -24515,26 +24367,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentHeldActions.Output.ContentTooLarge.Body + public var body: Operations.GetDesktopStatus.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentHeldActions.Output.ContentTooLarge.Body) { + public init(body: Operations.GetDesktopStatus.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListAgentHeldActions.Output.ContentTooLarge) + case contentTooLarge(Operations.GetDesktopStatus.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListAgentHeldActions.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetDesktopStatus.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -24548,9 +24400,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24566,26 +24418,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentHeldActions.Output.InternalServerError.Body + public var body: Operations.GetDesktopStatus.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentHeldActions.Output.InternalServerError.Body) { + public init(body: Operations.GetDesktopStatus.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListAgentHeldActions.Output.InternalServerError) + case internalServerError(Operations.GetDesktopStatus.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListAgentHeldActions.Output.InternalServerError { + public var internalServerError: Operations.GetDesktopStatus.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -24599,9 +24451,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/status/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24617,26 +24469,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentHeldActions.Output.ServiceUnavailable.Body + public var body: Operations.GetDesktopStatus.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentHeldActions.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetDesktopStatus.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/status/get(getDesktopStatus)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListAgentHeldActions.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetDesktopStatus.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListAgentHeldActions.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetDesktopStatus.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -24686,69 +24538,78 @@ public enum Operations { } } } - /// Runs the held action; the job continues where it stopped. Fails with 409 once the action was decided. + /// Issue a single-use viewer link for the bot desktop. The page and its WebSocket live outside /v1 and need no Authorization header: the link is the credential. With passive=true the link is watch-only: it neither boots the bot's machine nor keeps it awake, and its connection ends when the machine stops. 409 when the bot has no bot desktop. /// - /// - Remark: HTTP `POST /v1/agents/{id}/held-actions/{actionId}/approve`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)`. - public enum ApproveAgentHeldAction { - public static let id: Swift.String = "approveAgentHeldAction" + /// - Remark: HTTP `POST /v1/agents/{id}/desktop/viewer`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)`. + public enum CreateDesktopViewer { + public static let id: Swift.String = "createDesktopViewer" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/path/actionId`. - public var actionId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - actionId: - public init( - id: Swift.String, - actionId: Swift.String - ) { + public init(id: Swift.String) { self.id = id - self.actionId = actionId } } - public var path: Operations.ApproveAgentHeldAction.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/header`. + public var path: Operations.CreateDesktopViewer.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/query/passive`. + public var passive: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - passive: + public init(passive: Swift.String? = nil) { + self.passive = passive + } + } + public var query: Operations.CreateDesktopViewer.Input.Query + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ApproveAgentHeldAction.Input.Headers + public var headers: Operations.CreateDesktopViewer.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.ApproveAgentHeldAction.Input.Path, - headers: Operations.ApproveAgentHeldAction.Input.Headers = .init() + path: Operations.CreateDesktopViewer.Input.Path, + query: Operations.CreateDesktopViewer.Input.Query = .init(), + headers: Operations.CreateDesktopViewer.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/200/content`. + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/200/content/application\/json`. - case json(Components.Schemas.HeldAction) + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/201/content/application\/json`. + case json(Components.Schemas.DesktopViewer) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.HeldAction { + public var json: Components.Schemas.DesktopViewer { get throws { switch self { case let .json(body): @@ -24758,42 +24619,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApproveAgentHeldAction.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.CreateDesktopViewer.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApproveAgentHeldAction.Output.Ok.Body) { + public init(body: Operations.CreateDesktopViewer.Output.Created.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/201`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.ApproveAgentHeldAction.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `201 created`. + case created(Operations.CreateDesktopViewer.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.ApproveAgentHeldAction.Output.Ok { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.CreateDesktopViewer.Output.Created { get throws { switch self { - case let .ok(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "created", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24809,26 +24670,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApproveAgentHeldAction.Output.BadRequest.Body + public var body: Operations.CreateDesktopViewer.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApproveAgentHeldAction.Output.BadRequest.Body) { + public init(body: Operations.CreateDesktopViewer.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ApproveAgentHeldAction.Output.BadRequest) + case badRequest(Operations.CreateDesktopViewer.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ApproveAgentHeldAction.Output.BadRequest { + public var badRequest: Operations.CreateDesktopViewer.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -24842,9 +24703,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -24860,26 +24721,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApproveAgentHeldAction.Output.Unauthorized.Body + public var body: Operations.CreateDesktopViewer.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApproveAgentHeldAction.Output.Unauthorized.Body) { + public init(body: Operations.CreateDesktopViewer.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ApproveAgentHeldAction.Output.Unauthorized) + case unauthorized(Operations.CreateDesktopViewer.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ApproveAgentHeldAction.Output.Unauthorized { + public var unauthorized: Operations.CreateDesktopViewer.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -24893,9 +24754,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24911,26 +24772,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApproveAgentHeldAction.Output.NotFound.Body + public var body: Operations.CreateDesktopViewer.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApproveAgentHeldAction.Output.NotFound.Body) { + public init(body: Operations.CreateDesktopViewer.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ApproveAgentHeldAction.Output.NotFound) + case notFound(Operations.CreateDesktopViewer.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ApproveAgentHeldAction.Output.NotFound { + public var notFound: Operations.CreateDesktopViewer.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -24944,9 +24805,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -24962,26 +24823,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApproveAgentHeldAction.Output.MethodNotAllowed.Body + public var body: Operations.CreateDesktopViewer.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApproveAgentHeldAction.Output.MethodNotAllowed.Body) { + public init(body: Operations.CreateDesktopViewer.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ApproveAgentHeldAction.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CreateDesktopViewer.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ApproveAgentHeldAction.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CreateDesktopViewer.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -24995,9 +24856,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -25013,26 +24874,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApproveAgentHeldAction.Output.Conflict.Body + public var body: Operations.CreateDesktopViewer.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApproveAgentHeldAction.Output.Conflict.Body) { + public init(body: Operations.CreateDesktopViewer.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ApproveAgentHeldAction.Output.Conflict) + case conflict(Operations.CreateDesktopViewer.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ApproveAgentHeldAction.Output.Conflict { + public var conflict: Operations.CreateDesktopViewer.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -25046,9 +24907,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -25064,26 +24925,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApproveAgentHeldAction.Output.ContentTooLarge.Body + public var body: Operations.CreateDesktopViewer.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApproveAgentHeldAction.Output.ContentTooLarge.Body) { + public init(body: Operations.CreateDesktopViewer.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ApproveAgentHeldAction.Output.ContentTooLarge) + case contentTooLarge(Operations.CreateDesktopViewer.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ApproveAgentHeldAction.Output.ContentTooLarge { + public var contentTooLarge: Operations.CreateDesktopViewer.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -25097,9 +24958,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -25115,26 +24976,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApproveAgentHeldAction.Output.InternalServerError.Body + public var body: Operations.CreateDesktopViewer.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApproveAgentHeldAction.Output.InternalServerError.Body) { + public init(body: Operations.CreateDesktopViewer.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ApproveAgentHeldAction.Output.InternalServerError) + case internalServerError(Operations.CreateDesktopViewer.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ApproveAgentHeldAction.Output.InternalServerError { + public var internalServerError: Operations.CreateDesktopViewer.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -25148,9 +25009,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/desktop/viewer/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -25166,26 +25027,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApproveAgentHeldAction.Output.ServiceUnavailable.Body + public var body: Operations.CreateDesktopViewer.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApproveAgentHeldAction.Output.ServiceUnavailable.Body) { + public init(body: Operations.CreateDesktopViewer.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/desktop/viewer/post(createDesktopViewer)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ApproveAgentHeldAction.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CreateDesktopViewer.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ApproveAgentHeldAction.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CreateDesktopViewer.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -25235,275 +25096,548 @@ public enum Operations { } } } - /// Refuses the held action with an optional reason; the job reports back. Fails with 409 once the action was decided. - /// - /// - Remark: HTTP `POST /v1/agents/{id}/held-actions/{actionId}/decline`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)`. - public enum DeclineAgentHeldAction { - public static let id: Swift.String = "declineAgentHeldAction" + /// - Remark: HTTP `POST /v1/agents/{id}/duplicate`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)`. + public enum DuplicateAgent { + public static let id: Swift.String = "duplicateAgent" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/path/actionId`. - public var actionId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - actionId: - public init( - id: Swift.String, - actionId: Swift.String - ) { + public init(id: Swift.String) { self.id = id - self.actionId = actionId } } - public var path: Operations.DeclineAgentHeldAction.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/header`. + public var path: Operations.DuplicateAgent.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeclineAgentHeldAction.Input.Headers - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/requestBody/json/reason`. - public var reason: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - reason: - public init(reason: Swift.String? = nil) { - self.reason = reason - } - public enum CodingKeys: String, CodingKey { - case reason - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/requestBody/content/application\/json`. - case json(Operations.DeclineAgentHeldAction.Input.Body.JsonPayload) - } - public var body: Operations.DeclineAgentHeldAction.Input.Body + public var headers: Operations.DuplicateAgent.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.DeclineAgentHeldAction.Input.Path, - headers: Operations.DeclineAgentHeldAction.Input.Headers = .init(), - body: Operations.DeclineAgentHeldAction.Input.Body + path: Operations.DuplicateAgent.Input.Path, + headers: Operations.DuplicateAgent.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/200/content`. + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/200/content/application\/json`. - case json(Components.Schemas.HeldAction) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.HeldAction { - get throws { - switch self { - case let .json(body): - return body + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/avatar`. + public var avatar: Components.Schemas.BotAvatarDefinition + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/createdAt`. + public var createdAt: Swift.String + /// Every other bot; with `delegate` in `tools` this bot may message any of them. The server ignores it in input. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/delegates`. + public var delegates: [Swift.String] + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/description`. + public var description: Swift.String + /// The model for this bot's desktop jobs; unset, they use the bot's own model. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/desktopModel`. + public struct DesktopModelPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/desktopModel/model`. + public var model: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/desktopModel/provider`. + public var provider: Swift.String + /// Creates a new `DesktopModelPayload`. + /// + /// - Parameters: + /// - model: + /// - provider: + public init( + model: Swift.String, + provider: Swift.String + ) { + self.model = model + self.provider = provider } - } - } - } - /// Received HTTP response body - public var body: Operations.DeclineAgentHeldAction.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentHeldAction.Output.Ok.Body) { - self.body = body - } - } - /// Success - /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/200`. - /// - /// HTTP response code: `200 ok`. - case ok(Operations.DeclineAgentHeldAction.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. - /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.DeclineAgentHeldAction.Output.Ok { - get throws { - switch self { - case let .ok(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "ok", - response: self - ) - } - } - } - public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/400/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/400/content/application\/json`. - case json(Components.Schemas._Error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas._Error { - get throws { - switch self { - case let .json(body): - return body + public enum CodingKeys: String, CodingKey { + case model + case provider } } - } - } - /// Received HTTP response body - public var body: Operations.DeclineAgentHeldAction.Output.BadRequest.Body - /// Creates a new `BadRequest`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentHeldAction.Output.BadRequest.Body) { - self.body = body - } - } - /// Invalid request or operation - /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/400`. - /// - /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeclineAgentHeldAction.Output.BadRequest) - /// The associated value of the enum case if `self` is `.badRequest`. - /// - /// - Throws: An error if `self` is not `.badRequest`. - /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeclineAgentHeldAction.Output.BadRequest { - get throws { - switch self { - case let .badRequest(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "badRequest", - response: self - ) - } - } - } - public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/401/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/401/content/text\/plain`. - case plainText(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.plainText`. - /// - /// - Throws: An error if `self` is not `.plainText`. - /// - SeeAlso: `.plainText`. - public var plainText: OpenAPIRuntime.HTTPBody { - get throws { - switch self { - case let .plainText(body): - return body + /// The model for this bot's desktop jobs; unset, they use the bot's own model. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/desktopModel`. + public var desktopModel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.DesktopModelPayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/id`. + public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference`. + public struct InferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference/maxOutputTokens`. + public var maxOutputTokens: Swift.Double? + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference/temperature`. + public var temperature: Swift.Double? + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference/thinkingLevel`. + @frozen public enum ThinkingLevelPayload: String, Codable, Hashable, Sendable, CaseIterable { + case off = "off" + case minimal = "minimal" + case low = "low" + case medium = "medium" + case high = "high" + case xhigh = "xhigh" + case max = "max" } - } - } - } - /// Received HTTP response body - public var body: Operations.DeclineAgentHeldAction.Output.Unauthorized.Body - /// Creates a new `Unauthorized`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentHeldAction.Output.Unauthorized.Body) { - self.body = body - } - } - /// Missing, expired, or invalid account session - /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/401`. - /// - /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeclineAgentHeldAction.Output.Unauthorized) - /// The associated value of the enum case if `self` is `.unauthorized`. - /// - /// - Throws: An error if `self` is not `.unauthorized`. - /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeclineAgentHeldAction.Output.Unauthorized { - get throws { - switch self { - case let .unauthorized(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unauthorized", - response: self - ) - } - } - } - public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/404/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/404/content/application\/json`. - case json(Components.Schemas._Error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas._Error { - get throws { - switch self { - case let .json(body): - return body + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference/thinkingLevel`. + public var thinkingLevel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.InferencePayload.ThinkingLevelPayload? + /// Creates a new `InferencePayload`. + /// + /// - Parameters: + /// - maxOutputTokens: + /// - temperature: + /// - thinkingLevel: + public init( + maxOutputTokens: Swift.Double? = nil, + temperature: Swift.Double? = nil, + thinkingLevel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.InferencePayload.ThinkingLevelPayload? = nil + ) { + self.maxOutputTokens = maxOutputTokens + self.temperature = temperature + self.thinkingLevel = thinkingLevel + } + public enum CodingKeys: String, CodingKey { + case maxOutputTokens + case temperature + case thinkingLevel } } - } - } - /// Received HTTP response body - public var body: Operations.DeclineAgentHeldAction.Output.NotFound.Body - /// Creates a new `NotFound`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentHeldAction.Output.NotFound.Body) { - self.body = body + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/inference`. + public var inference: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.InferencePayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/instructions`. + public var instructions: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/mcpServers`. + public var mcpServers: [Swift.String] + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/model`. + public var model: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/name`. + public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/provider`. + public var provider: Swift.String + /// How the bot reviews its turns to learn: whether at all, after how many tool-activity rounds for skills and memory, and how much of a turn a review reads. Unset means enabled with thresholds of 10. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review`. + public struct ReviewPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review/maxInputTokens`. + public var maxInputTokens: Swift.Int? + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review/memoryThreshold`. + public var memoryThreshold: Swift.Int + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review/skillThreshold`. + public var skillThreshold: Swift.Int + /// Creates a new `ReviewPayload`. + /// + /// - Parameters: + /// - enabled: + /// - maxInputTokens: + /// - memoryThreshold: + /// - skillThreshold: + public init( + enabled: Swift.Bool, + maxInputTokens: Swift.Int? = nil, + memoryThreshold: Swift.Int, + skillThreshold: Swift.Int + ) { + self.enabled = enabled + self.maxInputTokens = maxInputTokens + self.memoryThreshold = memoryThreshold + self.skillThreshold = skillThreshold + } + public enum CodingKeys: String, CodingKey { + case enabled + case maxInputTokens + case memoryThreshold + case skillThreshold + } + } + /// How the bot reviews its turns to learn: whether at all, after how many tool-activity rounds for skills and memory, and how much of a turn a review reads. Unset means enabled with thresholds of 10. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/review`. + public var review: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.ReviewPayload? + /// The model that runs this bot's reviews; unset, they use the bot's own model. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/reviewModel`. + public struct ReviewModelPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/reviewModel/model`. + public var model: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/reviewModel/provider`. + public var provider: Swift.String + /// Creates a new `ReviewModelPayload`. + /// + /// - Parameters: + /// - model: + /// - provider: + public init( + model: Swift.String, + provider: Swift.String + ) { + self.model = model + self.provider = provider + } + public enum CodingKeys: String, CodingKey { + case model + case provider + } + } + /// The model that runs this bot's reviews; unset, they use the bot's own model. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/reviewModel`. + public var reviewModel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.ReviewModelPayload? + /// True whenever `tools` includes `memory`; the server ignores it in input. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/sharedMemory`. + public var sharedMemory: Swift.Bool? + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/sharedSkills`. + public var sharedSkills: [Swift.String]? + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/SkillsPayload`. + public struct SkillsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/SkillsPayload/instructions`. + public var instructions: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/SkillsPayload/name`. + public var name: Swift.String + /// Creates a new `SkillsPayloadPayload`. + /// + /// - Parameters: + /// - instructions: + /// - name: + public init( + instructions: Swift.String, + name: Swift.String + ) { + self.instructions = instructions + self.name = name + } + public enum CodingKeys: String, CodingKey { + case instructions + case name + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/skills`. + public typealias SkillsPayload = [Operations.DuplicateAgent.Output.Created.Body.JsonPayload.SkillsPayloadPayload] + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/skills`. + public var skills: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.SkillsPayload + /// The bot's tools; always includes `schedule` and `codemode`. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/tools`. + public var tools: [Swift.String] + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/updatedAt`. + public var updatedAt: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/webSearchProvider`. + @frozen public enum WebSearchProviderPayload: String, Codable, Hashable, Sendable, CaseIterable { + case mixed = "mixed" + case exa = "exa" + case _empty_ = "" + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/json/webSearchProvider`. + public var webSearchProvider: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.WebSearchProviderPayload? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - avatar: + /// - createdAt: + /// - delegates: Every other bot; with `delegate` in `tools` this bot may message any of them. The server ignores it in input. + /// - description: + /// - desktopModel: The model for this bot's desktop jobs; unset, they use the bot's own model. + /// - enabled: + /// - id: + /// - inference: + /// - instructions: + /// - mcpServers: + /// - model: + /// - name: + /// - provider: + /// - review: How the bot reviews its turns to learn: whether at all, after how many tool-activity rounds for skills and memory, and how much of a turn a review reads. Unset means enabled with thresholds of 10. + /// - reviewModel: The model that runs this bot's reviews; unset, they use the bot's own model. + /// - sharedMemory: True whenever `tools` includes `memory`; the server ignores it in input. + /// - sharedSkills: + /// - skills: + /// - tools: The bot's tools; always includes `schedule` and `codemode`. + /// - updatedAt: + /// - webSearchProvider: + public init( + avatar: Components.Schemas.BotAvatarDefinition, + createdAt: Swift.String, + delegates: [Swift.String], + description: Swift.String, + desktopModel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.DesktopModelPayload? = nil, + enabled: Swift.Bool, + id: Swift.String, + inference: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.InferencePayload? = nil, + instructions: Swift.String, + mcpServers: [Swift.String], + model: Swift.String, + name: Swift.String, + provider: Swift.String, + review: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.ReviewPayload? = nil, + reviewModel: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.ReviewModelPayload? = nil, + sharedMemory: Swift.Bool? = nil, + sharedSkills: [Swift.String]? = nil, + skills: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.SkillsPayload, + tools: [Swift.String], + updatedAt: Swift.String, + webSearchProvider: Operations.DuplicateAgent.Output.Created.Body.JsonPayload.WebSearchProviderPayload? = nil + ) { + self.avatar = avatar + self.createdAt = createdAt + self.delegates = delegates + self.description = description + self.desktopModel = desktopModel + self.enabled = enabled + self.id = id + self.inference = inference + self.instructions = instructions + self.mcpServers = mcpServers + self.model = model + self.name = name + self.provider = provider + self.review = review + self.reviewModel = reviewModel + self.sharedMemory = sharedMemory + self.sharedSkills = sharedSkills + self.skills = skills + self.tools = tools + self.updatedAt = updatedAt + self.webSearchProvider = webSearchProvider + } + public enum CodingKeys: String, CodingKey { + case avatar + case createdAt + case delegates + case description + case desktopModel + case enabled + case id + case inference + case instructions + case mcpServers + case model + case name + case provider + case review + case reviewModel + case sharedMemory + case sharedSkills + case skills + case tools + case updatedAt + case webSearchProvider + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/201/content/application\/json`. + case json(Operations.DuplicateAgent.Output.Created.Body.JsonPayload?) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.DuplicateAgent.Output.Created.Body.JsonPayload? { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DuplicateAgent.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DuplicateAgent.Output.Created.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.DuplicateAgent.Output.Created) + /// The associated value of the enum case if `self` is `.created`. + /// + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.DuplicateAgent.Output.Created { + get throws { + switch self { + case let .created(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "created", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DuplicateAgent.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DuplicateAgent.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.DuplicateAgent.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.DuplicateAgent.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DuplicateAgent.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DuplicateAgent.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.DuplicateAgent.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.DuplicateAgent.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DuplicateAgent.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DuplicateAgent.Output.NotFound.Body) { + self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeclineAgentHeldAction.Output.NotFound) + case notFound(Operations.DuplicateAgent.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeclineAgentHeldAction.Output.NotFound { + public var notFound: Operations.DuplicateAgent.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -25517,9 +25651,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -25535,26 +25669,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentHeldAction.Output.MethodNotAllowed.Body + public var body: Operations.DuplicateAgent.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentHeldAction.Output.MethodNotAllowed.Body) { + public init(body: Operations.DuplicateAgent.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeclineAgentHeldAction.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DuplicateAgent.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeclineAgentHeldAction.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DuplicateAgent.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -25568,9 +25702,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -25586,26 +25720,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentHeldAction.Output.Conflict.Body + public var body: Operations.DuplicateAgent.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentHeldAction.Output.Conflict.Body) { + public init(body: Operations.DuplicateAgent.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeclineAgentHeldAction.Output.Conflict) + case conflict(Operations.DuplicateAgent.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeclineAgentHeldAction.Output.Conflict { + public var conflict: Operations.DuplicateAgent.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -25619,9 +25753,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -25637,26 +25771,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentHeldAction.Output.ContentTooLarge.Body + public var body: Operations.DuplicateAgent.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentHeldAction.Output.ContentTooLarge.Body) { + public init(body: Operations.DuplicateAgent.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeclineAgentHeldAction.Output.ContentTooLarge) + case contentTooLarge(Operations.DuplicateAgent.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeclineAgentHeldAction.Output.ContentTooLarge { + public var contentTooLarge: Operations.DuplicateAgent.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -25670,9 +25804,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -25688,26 +25822,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentHeldAction.Output.InternalServerError.Body + public var body: Operations.DuplicateAgent.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentHeldAction.Output.InternalServerError.Body) { + public init(body: Operations.DuplicateAgent.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeclineAgentHeldAction.Output.InternalServerError) + case internalServerError(Operations.DuplicateAgent.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeclineAgentHeldAction.Output.InternalServerError { + public var internalServerError: Operations.DuplicateAgent.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -25721,9 +25855,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/duplicate/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -25739,26 +25873,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentHeldAction.Output.ServiceUnavailable.Body + public var body: Operations.DuplicateAgent.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentHeldAction.Output.ServiceUnavailable.Body) { + public init(body: Operations.DuplicateAgent.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/duplicate/post(duplicateAgent)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeclineAgentHeldAction.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DuplicateAgent.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeclineAgentHeldAction.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DuplicateAgent.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -25808,16 +25942,16 @@ public enum Operations { } } } - /// The logins the bot's desktop jobs can fill into web pages, and its requests for logins the owner has not answered. Values are never returned. + /// Server-sent events. Each snapshot event carries a ChatSnapshot JSON object in data. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. Reconnect by fetching the current snapshot; there is no Last-Event-ID replay. /// - /// - Remark: HTTP `GET /v1/agents/{id}/logins`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)`. - public enum ListAgentLogins { - public static let id: Swift.String = "listAgentLogins" + /// - Remark: HTTP `GET /v1/agents/{id}/events`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)`. + public enum StreamChatEvents { + public static let id: Swift.String = "streamChatEvents" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -25827,72 +25961,97 @@ public enum Operations { self.id = id } } - public var path: Operations.ListAgentLogins.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/header`. + public var path: Operations.StreamChatEvents.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/query/limit`. + public var limit: Swift.Int? + /// With partial=true, each snapshot's partial carries the reply text the bot is writing, updated about every 100 ms. Without it, partial stays empty and replies appear only when the turn ends. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/query/partial`. + public var partial: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - partial: With partial=true, each snapshot's partial carries the reply text the bot is writing, updated about every 100 ms. Without it, partial stays empty and replies appear only when the turn ends. + public init( + limit: Swift.Int? = nil, + partial: Swift.String? = nil + ) { + self.limit = limit + self.partial = partial + } + } + public var query: Operations.StreamChatEvents.Input.Query + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListAgentLogins.Input.Headers + public var headers: Operations.StreamChatEvents.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.ListAgentLogins.Input.Path, - headers: Operations.ListAgentLogins.Input.Headers = .init() + path: Operations.StreamChatEvents.Input.Path, + query: Operations.StreamChatEvents.Input.Query = .init(), + headers: Operations.StreamChatEvents.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/200/content/application\/json`. - case json(Components.Schemas.Logins) - /// The associated value of the enum case if `self` is `.json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/200/content/text\/event-stream`. + case textEventStream(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.textEventStream`. /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.Logins { + /// - Throws: An error if `self` is not `.textEventStream`. + /// - SeeAlso: `.textEventStream`. + public var textEventStream: OpenAPIRuntime.HTTPBody { get throws { switch self { - case let .json(body): + case let .textEventStream(body): return body } } } } /// Received HTTP response body - public var body: Operations.ListAgentLogins.Output.Ok.Body + public var body: Operations.StreamChatEvents.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLogins.Output.Ok.Body) { + public init(body: Operations.StreamChatEvents.Output.Ok.Body) { self.body = body } } - /// Success + /// SSE stream, not a JSON array /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListAgentLogins.Output.Ok) + case ok(Operations.StreamChatEvents.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListAgentLogins.Output.Ok { + public var ok: Operations.StreamChatEvents.Output.Ok { get throws { switch self { case let .ok(response): @@ -25906,9 +26065,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -25924,26 +26083,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLogins.Output.BadRequest.Body + public var body: Operations.StreamChatEvents.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLogins.Output.BadRequest.Body) { + public init(body: Operations.StreamChatEvents.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListAgentLogins.Output.BadRequest) + case badRequest(Operations.StreamChatEvents.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListAgentLogins.Output.BadRequest { + public var badRequest: Operations.StreamChatEvents.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -25957,9 +26116,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -25975,26 +26134,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLogins.Output.Unauthorized.Body + public var body: Operations.StreamChatEvents.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLogins.Output.Unauthorized.Body) { + public init(body: Operations.StreamChatEvents.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListAgentLogins.Output.Unauthorized) + case unauthorized(Operations.StreamChatEvents.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListAgentLogins.Output.Unauthorized { + public var unauthorized: Operations.StreamChatEvents.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -26008,9 +26167,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -26026,26 +26185,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLogins.Output.NotFound.Body + public var body: Operations.StreamChatEvents.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLogins.Output.NotFound.Body) { + public init(body: Operations.StreamChatEvents.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListAgentLogins.Output.NotFound) + case notFound(Operations.StreamChatEvents.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListAgentLogins.Output.NotFound { + public var notFound: Operations.StreamChatEvents.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -26059,9 +26218,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -26077,26 +26236,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLogins.Output.MethodNotAllowed.Body + public var body: Operations.StreamChatEvents.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLogins.Output.MethodNotAllowed.Body) { + public init(body: Operations.StreamChatEvents.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListAgentLogins.Output.MethodNotAllowed) + case methodNotAllowed(Operations.StreamChatEvents.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListAgentLogins.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.StreamChatEvents.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -26110,9 +26269,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -26128,26 +26287,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLogins.Output.Conflict.Body + public var body: Operations.StreamChatEvents.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLogins.Output.Conflict.Body) { + public init(body: Operations.StreamChatEvents.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListAgentLogins.Output.Conflict) + case conflict(Operations.StreamChatEvents.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListAgentLogins.Output.Conflict { + public var conflict: Operations.StreamChatEvents.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -26161,9 +26320,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -26179,26 +26338,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLogins.Output.ContentTooLarge.Body + public var body: Operations.StreamChatEvents.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLogins.Output.ContentTooLarge.Body) { + public init(body: Operations.StreamChatEvents.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListAgentLogins.Output.ContentTooLarge) + case contentTooLarge(Operations.StreamChatEvents.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListAgentLogins.Output.ContentTooLarge { + public var contentTooLarge: Operations.StreamChatEvents.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -26212,9 +26371,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -26230,26 +26389,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLogins.Output.InternalServerError.Body + public var body: Operations.StreamChatEvents.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLogins.Output.InternalServerError.Body) { + public init(body: Operations.StreamChatEvents.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListAgentLogins.Output.InternalServerError) + case internalServerError(Operations.StreamChatEvents.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListAgentLogins.Output.InternalServerError { + public var internalServerError: Operations.StreamChatEvents.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -26263,9 +26422,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/events/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -26281,26 +26440,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLogins.Output.ServiceUnavailable.Body + public var body: Operations.StreamChatEvents.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLogins.Output.ServiceUnavailable.Body) { + public init(body: Operations.StreamChatEvents.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/events/get(streamChatEvents)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListAgentLogins.Output.ServiceUnavailable) + case serviceUnavailable(Operations.StreamChatEvents.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListAgentLogins.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.StreamChatEvents.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -26319,11 +26478,14 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } @frozen public enum AcceptableContentType: AcceptableProtocol { + case textEventStream case json case plainText case other(Swift.String) public init?(rawValue: Swift.String) { switch rawValue.lowercased() { + case "text/event-stream": + self = .textEventStream case "application/json": self = .json case "text/plain": @@ -26336,6 +26498,8 @@ public enum Operations { switch self { case let .other(string): return string + case .textEventStream: + return "text/event-stream" case .json: return "application/json" case .plainText: @@ -26344,367 +26508,69 @@ public enum Operations { } public static var allCases: [Self] { [ + .textEventStream, .json, .plainText ] } } } - /// Creates or updates a login. Saving one the bot requested answers the request and starts a bot turn with a notice. Each field is a value stored in Crumble or a password manager reference; a 1Password `item` fills every field. Every reference is read once to check it, and nothing is saved if one fails. + /// Desktop job actions an intent check held for the owner, newest first, pending and decided. /// - /// - Remark: HTTP `PUT /v1/agents/{id}/logins/{name}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)`. - public enum SaveAgentLogin { - public static let id: Swift.String = "saveAgentLogin" + /// - Remark: HTTP `GET /v1/agents/{id}/held-actions`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)`. + public enum ListAgentHeldActions { + public static let id: Swift.String = "listAgentHeldActions" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/path/name`. - public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - name: - public init( - id: Swift.String, - name: Swift.String - ) { + public init(id: Swift.String) { self.id = id - self.name = name } } - public var path: Operations.SaveAgentLogin.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/header`. + public var path: Operations.ListAgentHeldActions.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SaveAgentLogin.Input.Headers - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields`. - public struct FieldsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code`. - public struct OneTimeCodePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/reference/passwordManager`. - public var passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/reference`. - public var reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/value`. - public var value: Swift.String? - /// Creates a new `OneTimeCodePayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code`. - public var oneTimeCode: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password`. - public struct PasswordPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/reference/passwordManager`. - public var passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/reference`. - public var reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/value`. - public var value: Swift.String? - /// Creates a new `PasswordPayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password`. - public var password: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username`. - public struct UsernamePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/reference/passwordManager`. - public var passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/reference`. - public var reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/value`. - public var value: Swift.String? - /// Creates a new `UsernamePayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username`. - public var username: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload? - /// Creates a new `FieldsPayload`. - /// - /// - Parameters: - /// - oneTimeCode: - /// - password: - /// - username: - public init( - oneTimeCode: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload? = nil, - password: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload? = nil, - username: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload? = nil - ) { - self.oneTimeCode = oneTimeCode - self.password = password - self.username = username - } - public enum CodingKeys: String, CodingKey { - case oneTimeCode = "one_time_code" - case password - case username - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields`. - public var fields: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/hosts`. - public var hosts: [Swift.String]? - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/item`. - public struct ItemPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/item/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/item/passwordManager`. - public var passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.ItemPayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/item/reference`. - public var reference: Swift.String - /// Creates a new `ItemPayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.ItemPayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/item`. - public var item: Operations.SaveAgentLogin.Input.Body.JsonPayload.ItemPayload? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - fields: - /// - hosts: - /// - item: - public init( - fields: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload? = nil, - hosts: [Swift.String]? = nil, - item: Operations.SaveAgentLogin.Input.Body.JsonPayload.ItemPayload? = nil - ) { - self.fields = fields - self.hosts = hosts - self.item = item - } - public enum CodingKeys: String, CodingKey { - case fields - case hosts - case item - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/content/application\/json`. - case json(Operations.SaveAgentLogin.Input.Body.JsonPayload) - } - public var body: Operations.SaveAgentLogin.Input.Body + public var headers: Operations.ListAgentHeldActions.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.SaveAgentLogin.Input.Path, - headers: Operations.SaveAgentLogin.Input.Headers = .init(), - body: Operations.SaveAgentLogin.Input.Body + path: Operations.ListAgentHeldActions.Input.Path, + headers: Operations.ListAgentHeldActions.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.Login) + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/200/content/application\/json`. + case json([Components.Schemas.HeldAction]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.Login { + public var json: [Components.Schemas.HeldAction] { get throws { switch self { case let .json(body): @@ -26714,26 +26580,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentLogin.Output.Ok.Body + public var body: Operations.ListAgentHeldActions.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentLogin.Output.Ok.Body) { + public init(body: Operations.ListAgentHeldActions.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.SaveAgentLogin.Output.Ok) + case ok(Operations.ListAgentHeldActions.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.SaveAgentLogin.Output.Ok { + public var ok: Operations.ListAgentHeldActions.Output.Ok { get throws { switch self { case let .ok(response): @@ -26747,9 +26613,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -26765,26 +26631,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentLogin.Output.BadRequest.Body + public var body: Operations.ListAgentHeldActions.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentLogin.Output.BadRequest.Body) { + public init(body: Operations.ListAgentHeldActions.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SaveAgentLogin.Output.BadRequest) + case badRequest(Operations.ListAgentHeldActions.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SaveAgentLogin.Output.BadRequest { + public var badRequest: Operations.ListAgentHeldActions.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -26798,9 +26664,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -26816,26 +26682,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentLogin.Output.Unauthorized.Body + public var body: Operations.ListAgentHeldActions.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentLogin.Output.Unauthorized.Body) { + public init(body: Operations.ListAgentHeldActions.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SaveAgentLogin.Output.Unauthorized) + case unauthorized(Operations.ListAgentHeldActions.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SaveAgentLogin.Output.Unauthorized { + public var unauthorized: Operations.ListAgentHeldActions.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -26849,9 +26715,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -26867,26 +26733,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentLogin.Output.NotFound.Body + public var body: Operations.ListAgentHeldActions.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentLogin.Output.NotFound.Body) { + public init(body: Operations.ListAgentHeldActions.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SaveAgentLogin.Output.NotFound) + case notFound(Operations.ListAgentHeldActions.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SaveAgentLogin.Output.NotFound { + public var notFound: Operations.ListAgentHeldActions.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -26900,9 +26766,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -26918,26 +26784,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentLogin.Output.MethodNotAllowed.Body + public var body: Operations.ListAgentHeldActions.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentLogin.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListAgentHeldActions.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SaveAgentLogin.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListAgentHeldActions.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SaveAgentLogin.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListAgentHeldActions.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -26951,9 +26817,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -26969,26 +26835,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentLogin.Output.Conflict.Body + public var body: Operations.ListAgentHeldActions.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentLogin.Output.Conflict.Body) { + public init(body: Operations.ListAgentHeldActions.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SaveAgentLogin.Output.Conflict) + case conflict(Operations.ListAgentHeldActions.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SaveAgentLogin.Output.Conflict { + public var conflict: Operations.ListAgentHeldActions.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -27002,9 +26868,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -27020,26 +26886,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentLogin.Output.ContentTooLarge.Body + public var body: Operations.ListAgentHeldActions.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentLogin.Output.ContentTooLarge.Body) { + public init(body: Operations.ListAgentHeldActions.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SaveAgentLogin.Output.ContentTooLarge) + case contentTooLarge(Operations.ListAgentHeldActions.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SaveAgentLogin.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListAgentHeldActions.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -27053,9 +26919,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27071,26 +26937,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentLogin.Output.InternalServerError.Body + public var body: Operations.ListAgentHeldActions.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentLogin.Output.InternalServerError.Body) { + public init(body: Operations.ListAgentHeldActions.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SaveAgentLogin.Output.InternalServerError) + case internalServerError(Operations.ListAgentHeldActions.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SaveAgentLogin.Output.InternalServerError { + public var internalServerError: Operations.ListAgentHeldActions.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -27104,9 +26970,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27122,26 +26988,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SaveAgentLogin.Output.ServiceUnavailable.Body + public var body: Operations.ListAgentHeldActions.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SaveAgentLogin.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListAgentHeldActions.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/get(listAgentHeldActions)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SaveAgentLogin.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListAgentHeldActions.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SaveAgentLogin.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListAgentHeldActions.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -27191,98 +27057,114 @@ public enum Operations { } } } - /// Deletes a login and its fill records, or declines a request for one, which starts a bot turn with a notice. + /// Runs the held action; the job continues where it stopped. Fails with 409 once the action was decided. /// - /// - Remark: HTTP `DELETE /v1/agents/{id}/logins/{name}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)`. - public enum DeleteAgentLogin { - public static let id: Swift.String = "deleteAgentLogin" + /// - Remark: HTTP `POST /v1/agents/{id}/held-actions/{actionId}/approve`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)`. + public enum ApproveAgentHeldAction { + public static let id: Swift.String = "approveAgentHeldAction" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/path/name`. - public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/path/actionId`. + public var actionId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - name: + /// - actionId: public init( id: Swift.String, - name: Swift.String + actionId: Swift.String ) { self.id = id - self.name = name + self.actionId = actionId } } - public var path: Operations.DeleteAgentLogin.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/header`. + public var path: Operations.ApproveAgentHeldAction.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteAgentLogin.Input.Headers + public var headers: Operations.ApproveAgentHeldAction.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.DeleteAgentLogin.Input.Path, - headers: Operations.DeleteAgentLogin.Input.Headers = .init() + path: Operations.ApproveAgentHeldAction.Input.Path, + headers: Operations.ApproveAgentHeldAction.Input.Headers = .init() ) { self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/200/content/application\/json`. + case json(Components.Schemas.HeldAction) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.HeldAction { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ApproveAgentHeldAction.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ApproveAgentHeldAction.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteAgentLogin.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/204`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.ApproveAgentHeldAction.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteAgentLogin.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ApproveAgentHeldAction.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27298,26 +27180,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentLogin.Output.BadRequest.Body + public var body: Operations.ApproveAgentHeldAction.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentLogin.Output.BadRequest.Body) { + public init(body: Operations.ApproveAgentHeldAction.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteAgentLogin.Output.BadRequest) + case badRequest(Operations.ApproveAgentHeldAction.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteAgentLogin.Output.BadRequest { + public var badRequest: Operations.ApproveAgentHeldAction.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -27331,9 +27213,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -27349,26 +27231,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentLogin.Output.Unauthorized.Body + public var body: Operations.ApproveAgentHeldAction.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentLogin.Output.Unauthorized.Body) { + public init(body: Operations.ApproveAgentHeldAction.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteAgentLogin.Output.Unauthorized) + case unauthorized(Operations.ApproveAgentHeldAction.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteAgentLogin.Output.Unauthorized { + public var unauthorized: Operations.ApproveAgentHeldAction.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -27382,9 +27264,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27400,26 +27282,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentLogin.Output.NotFound.Body + public var body: Operations.ApproveAgentHeldAction.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentLogin.Output.NotFound.Body) { + public init(body: Operations.ApproveAgentHeldAction.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteAgentLogin.Output.NotFound) + case notFound(Operations.ApproveAgentHeldAction.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteAgentLogin.Output.NotFound { + public var notFound: Operations.ApproveAgentHeldAction.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -27433,9 +27315,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27451,26 +27333,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentLogin.Output.MethodNotAllowed.Body + public var body: Operations.ApproveAgentHeldAction.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentLogin.Output.MethodNotAllowed.Body) { + public init(body: Operations.ApproveAgentHeldAction.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteAgentLogin.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ApproveAgentHeldAction.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteAgentLogin.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ApproveAgentHeldAction.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -27484,9 +27366,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27502,26 +27384,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentLogin.Output.Conflict.Body + public var body: Operations.ApproveAgentHeldAction.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentLogin.Output.Conflict.Body) { + public init(body: Operations.ApproveAgentHeldAction.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteAgentLogin.Output.Conflict) + case conflict(Operations.ApproveAgentHeldAction.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteAgentLogin.Output.Conflict { + public var conflict: Operations.ApproveAgentHeldAction.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -27535,9 +27417,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -27553,26 +27435,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentLogin.Output.ContentTooLarge.Body + public var body: Operations.ApproveAgentHeldAction.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentLogin.Output.ContentTooLarge.Body) { + public init(body: Operations.ApproveAgentHeldAction.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteAgentLogin.Output.ContentTooLarge) + case contentTooLarge(Operations.ApproveAgentHeldAction.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteAgentLogin.Output.ContentTooLarge { + public var contentTooLarge: Operations.ApproveAgentHeldAction.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -27586,9 +27468,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27604,26 +27486,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentLogin.Output.InternalServerError.Body + public var body: Operations.ApproveAgentHeldAction.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentLogin.Output.InternalServerError.Body) { + public init(body: Operations.ApproveAgentHeldAction.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteAgentLogin.Output.InternalServerError) + case internalServerError(Operations.ApproveAgentHeldAction.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteAgentLogin.Output.InternalServerError { + public var internalServerError: Operations.ApproveAgentHeldAction.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -27637,9 +27519,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/approve/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27655,26 +27537,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentLogin.Output.ServiceUnavailable.Body + public var body: Operations.ApproveAgentHeldAction.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentLogin.Output.ServiceUnavailable.Body) { + public init(body: Operations.ApproveAgentHeldAction.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/approve/post(approveAgentHeldAction)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteAgentLogin.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ApproveAgentHeldAction.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteAgentLogin.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ApproveAgentHeldAction.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -27724,98 +27606,138 @@ public enum Operations { } } } - /// Declines a pending login request without changing a saved login. + /// Refuses the held action with an optional reason; the job reports back. Fails with 409 once the action was decided. /// - /// - Remark: HTTP `POST /v1/agents/{id}/logins/{name}/decline`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)`. - public enum DeclineAgentLogin { - public static let id: Swift.String = "declineAgentLogin" + /// - Remark: HTTP `POST /v1/agents/{id}/held-actions/{actionId}/decline`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)`. + public enum DeclineAgentHeldAction { + public static let id: Swift.String = "declineAgentHeldAction" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/path/name`. - public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/path/actionId`. + public var actionId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - name: + /// - actionId: public init( id: Swift.String, - name: Swift.String + actionId: Swift.String ) { self.id = id - self.name = name + self.actionId = actionId } } - public var path: Operations.DeclineAgentLogin.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/header`. + public var path: Operations.DeclineAgentHeldAction.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeclineAgentLogin.Input.Headers + public var headers: Operations.DeclineAgentHeldAction.Input.Headers + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/requestBody/json/reason`. + public var reason: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - reason: + public init(reason: Swift.String? = nil) { + self.reason = reason + } + public enum CodingKeys: String, CodingKey { + case reason + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/requestBody/content/application\/json`. + case json(Operations.DeclineAgentHeldAction.Input.Body.JsonPayload) + } + public var body: Operations.DeclineAgentHeldAction.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.DeclineAgentLogin.Input.Path, - headers: Operations.DeclineAgentLogin.Input.Headers = .init() + path: Operations.DeclineAgentHeldAction.Input.Path, + headers: Operations.DeclineAgentHeldAction.Input.Headers = .init(), + body: Operations.DeclineAgentHeldAction.Input.Body ) { self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/200/content/application\/json`. + case json(Components.Schemas.HeldAction) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.HeldAction { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeclineAgentHeldAction.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeclineAgentHeldAction.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeclineAgentLogin.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/204`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.DeclineAgentHeldAction.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeclineAgentLogin.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.DeclineAgentHeldAction.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27831,26 +27753,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentLogin.Output.BadRequest.Body + public var body: Operations.DeclineAgentHeldAction.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentLogin.Output.BadRequest.Body) { + public init(body: Operations.DeclineAgentHeldAction.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeclineAgentLogin.Output.BadRequest) + case badRequest(Operations.DeclineAgentHeldAction.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeclineAgentLogin.Output.BadRequest { + public var badRequest: Operations.DeclineAgentHeldAction.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -27864,9 +27786,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -27882,26 +27804,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentLogin.Output.Unauthorized.Body + public var body: Operations.DeclineAgentHeldAction.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentLogin.Output.Unauthorized.Body) { + public init(body: Operations.DeclineAgentHeldAction.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeclineAgentLogin.Output.Unauthorized) + case unauthorized(Operations.DeclineAgentHeldAction.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeclineAgentLogin.Output.Unauthorized { + public var unauthorized: Operations.DeclineAgentHeldAction.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -27915,9 +27837,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27933,26 +27855,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentLogin.Output.NotFound.Body + public var body: Operations.DeclineAgentHeldAction.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentLogin.Output.NotFound.Body) { + public init(body: Operations.DeclineAgentHeldAction.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeclineAgentLogin.Output.NotFound) + case notFound(Operations.DeclineAgentHeldAction.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeclineAgentLogin.Output.NotFound { + public var notFound: Operations.DeclineAgentHeldAction.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -27966,9 +27888,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -27984,26 +27906,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentLogin.Output.MethodNotAllowed.Body + public var body: Operations.DeclineAgentHeldAction.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentLogin.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeclineAgentHeldAction.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeclineAgentLogin.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeclineAgentHeldAction.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeclineAgentLogin.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeclineAgentHeldAction.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -28017,9 +27939,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -28035,26 +27957,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentLogin.Output.Conflict.Body + public var body: Operations.DeclineAgentHeldAction.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentLogin.Output.Conflict.Body) { + public init(body: Operations.DeclineAgentHeldAction.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeclineAgentLogin.Output.Conflict) + case conflict(Operations.DeclineAgentHeldAction.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeclineAgentLogin.Output.Conflict { + public var conflict: Operations.DeclineAgentHeldAction.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -28068,9 +27990,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -28086,26 +28008,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentLogin.Output.ContentTooLarge.Body + public var body: Operations.DeclineAgentHeldAction.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentLogin.Output.ContentTooLarge.Body) { + public init(body: Operations.DeclineAgentHeldAction.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeclineAgentLogin.Output.ContentTooLarge) + case contentTooLarge(Operations.DeclineAgentHeldAction.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeclineAgentLogin.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeclineAgentHeldAction.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -28119,9 +28041,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -28137,26 +28059,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentLogin.Output.InternalServerError.Body + public var body: Operations.DeclineAgentHeldAction.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentLogin.Output.InternalServerError.Body) { + public init(body: Operations.DeclineAgentHeldAction.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeclineAgentLogin.Output.InternalServerError) + case internalServerError(Operations.DeclineAgentHeldAction.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeclineAgentLogin.Output.InternalServerError { + public var internalServerError: Operations.DeclineAgentHeldAction.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -28170,9 +28092,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/held-actions/{actionId}/decline/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -28188,26 +28110,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeclineAgentLogin.Output.ServiceUnavailable.Body + public var body: Operations.DeclineAgentHeldAction.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeclineAgentLogin.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeclineAgentHeldAction.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/held-actions/{actionId}/decline/post(declineAgentHeldAction)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeclineAgentLogin.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeclineAgentHeldAction.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeclineAgentLogin.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeclineAgentHeldAction.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -28257,92 +28179,62 @@ public enum Operations { } } } - /// Fills of the login's fields in the last 90 days, newest first. Page with `before` set to the last use's ID. + /// The logins the bot's desktop jobs can fill into web pages, and its requests for logins the owner has not answered. Values are never returned. /// - /// - Remark: HTTP `GET /v1/agents/{id}/logins/{name}/uses`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)`. - public enum ListAgentLoginUses { - public static let id: Swift.String = "listAgentLoginUses" + /// - Remark: HTTP `GET /v1/agents/{id}/logins`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)`. + public enum ListAgentLogins { + public static let id: Swift.String = "listAgentLogins" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/path/name`. - public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - name: - public init( - id: Swift.String, - name: Swift.String - ) { + public init(id: Swift.String) { self.id = id - self.name = name - } - } - public var path: Operations.ListAgentLoginUses.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/query/limit`. - public var limit: Swift.Int? - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/query/before`. - public var before: Swift.String? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - /// - before: - public init( - limit: Swift.Int? = nil, - before: Swift.String? = nil - ) { - self.limit = limit - self.before = before } } - public var query: Operations.ListAgentLoginUses.Input.Query - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/header`. + public var path: Operations.ListAgentLogins.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListAgentLoginUses.Input.Headers + public var headers: Operations.ListAgentLogins.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: public init( - path: Operations.ListAgentLoginUses.Input.Path, - query: Operations.ListAgentLoginUses.Input.Query = .init(), - headers: Operations.ListAgentLoginUses.Input.Headers = .init() + path: Operations.ListAgentLogins.Input.Path, + headers: Operations.ListAgentLogins.Input.Headers = .init() ) { self.path = path - self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/200/content/application\/json`. - case json([Components.Schemas.LoginUse]) + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/200/content/application\/json`. + case json(Components.Schemas.Logins) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.LoginUse] { + public var json: Components.Schemas.Logins { get throws { switch self { case let .json(body): @@ -28352,26 +28244,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLoginUses.Output.Ok.Body + public var body: Operations.ListAgentLogins.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLoginUses.Output.Ok.Body) { + public init(body: Operations.ListAgentLogins.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListAgentLoginUses.Output.Ok) + case ok(Operations.ListAgentLogins.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListAgentLoginUses.Output.Ok { + public var ok: Operations.ListAgentLogins.Output.Ok { get throws { switch self { case let .ok(response): @@ -28385,9 +28277,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -28403,26 +28295,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLoginUses.Output.BadRequest.Body + public var body: Operations.ListAgentLogins.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLoginUses.Output.BadRequest.Body) { + public init(body: Operations.ListAgentLogins.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListAgentLoginUses.Output.BadRequest) + case badRequest(Operations.ListAgentLogins.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListAgentLoginUses.Output.BadRequest { + public var badRequest: Operations.ListAgentLogins.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -28436,9 +28328,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -28454,26 +28346,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLoginUses.Output.Unauthorized.Body + public var body: Operations.ListAgentLogins.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLoginUses.Output.Unauthorized.Body) { + public init(body: Operations.ListAgentLogins.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListAgentLoginUses.Output.Unauthorized) + case unauthorized(Operations.ListAgentLogins.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListAgentLoginUses.Output.Unauthorized { + public var unauthorized: Operations.ListAgentLogins.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -28487,9 +28379,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -28505,26 +28397,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLoginUses.Output.NotFound.Body + public var body: Operations.ListAgentLogins.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLoginUses.Output.NotFound.Body) { + public init(body: Operations.ListAgentLogins.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListAgentLoginUses.Output.NotFound) + case notFound(Operations.ListAgentLogins.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListAgentLoginUses.Output.NotFound { + public var notFound: Operations.ListAgentLogins.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -28538,9 +28430,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -28556,26 +28448,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLoginUses.Output.MethodNotAllowed.Body + public var body: Operations.ListAgentLogins.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLoginUses.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListAgentLogins.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListAgentLoginUses.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListAgentLogins.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListAgentLoginUses.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListAgentLogins.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -28589,9 +28481,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -28607,26 +28499,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLoginUses.Output.Conflict.Body + public var body: Operations.ListAgentLogins.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLoginUses.Output.Conflict.Body) { + public init(body: Operations.ListAgentLogins.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListAgentLoginUses.Output.Conflict) + case conflict(Operations.ListAgentLogins.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListAgentLoginUses.Output.Conflict { + public var conflict: Operations.ListAgentLogins.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -28640,9 +28532,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -28658,26 +28550,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLoginUses.Output.ContentTooLarge.Body + public var body: Operations.ListAgentLogins.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLoginUses.Output.ContentTooLarge.Body) { + public init(body: Operations.ListAgentLogins.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListAgentLoginUses.Output.ContentTooLarge) + case contentTooLarge(Operations.ListAgentLogins.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListAgentLoginUses.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListAgentLogins.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -28691,9 +28583,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -28709,26 +28601,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLoginUses.Output.InternalServerError.Body + public var body: Operations.ListAgentLogins.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLoginUses.Output.InternalServerError.Body) { + public init(body: Operations.ListAgentLogins.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListAgentLoginUses.Output.InternalServerError) + case internalServerError(Operations.ListAgentLogins.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListAgentLoginUses.Output.InternalServerError { + public var internalServerError: Operations.ListAgentLogins.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -28742,9 +28634,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -28760,26 +28652,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentLoginUses.Output.ServiceUnavailable.Body + public var body: Operations.ListAgentLogins.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentLoginUses.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListAgentLogins.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/get(listAgentLogins)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListAgentLoginUses.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListAgentLogins.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListAgentLoginUses.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListAgentLogins.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -28829,60 +28721,361 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/agents/{id}/memories`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)`. - public enum ListAgentMemories { - public static let id: Swift.String = "listAgentMemories" + /// Creates or updates a login. Saving one the bot requested answers the request and starts a bot turn with a notice. Each field is a value stored in Crumble or a password manager reference; a 1Password `item` fills every field. Every reference is read once to check it, and nothing is saved if one fails. + /// + /// - Remark: HTTP `PUT /v1/agents/{id}/logins/{name}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)`. + public enum SaveAgentLogin { + public static let id: Swift.String = "saveAgentLogin" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/path/name`. + public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - name: + public init( + id: Swift.String, + name: Swift.String + ) { self.id = id + self.name = name } } - public var path: Operations.ListAgentMemories.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/header`. + public var path: Operations.SaveAgentLogin.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListAgentMemories.Input.Headers + public var headers: Operations.SaveAgentLogin.Input.Headers + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields`. + public struct FieldsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code`. + public struct OneTimeCodePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/reference/passwordManager`. + public var passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/reference`. + public var reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code/value`. + public var value: Swift.String? + /// Creates a new `OneTimeCodePayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/one_time_code`. + public var oneTimeCode: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password`. + public struct PasswordPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/reference/passwordManager`. + public var passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/reference`. + public var reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password/value`. + public var value: Swift.String? + /// Creates a new `PasswordPayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/password`. + public var password: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username`. + public struct UsernamePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/reference/passwordManager`. + public var passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/reference`. + public var reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username/value`. + public var value: Swift.String? + /// Creates a new `UsernamePayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields/username`. + public var username: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload? + /// Creates a new `FieldsPayload`. + /// + /// - Parameters: + /// - oneTimeCode: + /// - password: + /// - username: + public init( + oneTimeCode: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.OneTimeCodePayload? = nil, + password: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.PasswordPayload? = nil, + username: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload.UsernamePayload? = nil + ) { + self.oneTimeCode = oneTimeCode + self.password = password + self.username = username + } + public enum CodingKeys: String, CodingKey { + case oneTimeCode = "one_time_code" + case password + case username + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/fields`. + public var fields: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/hosts`. + public var hosts: [Swift.String]? + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/item`. + public struct ItemPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/item/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/item/passwordManager`. + public var passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.ItemPayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/item/reference`. + public var reference: Swift.String + /// Creates a new `ItemPayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.SaveAgentLogin.Input.Body.JsonPayload.ItemPayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/json/item`. + public var item: Operations.SaveAgentLogin.Input.Body.JsonPayload.ItemPayload? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - fields: + /// - hosts: + /// - item: + public init( + fields: Operations.SaveAgentLogin.Input.Body.JsonPayload.FieldsPayload? = nil, + hosts: [Swift.String]? = nil, + item: Operations.SaveAgentLogin.Input.Body.JsonPayload.ItemPayload? = nil + ) { + self.fields = fields + self.hosts = hosts + self.item = item + } + public enum CodingKeys: String, CodingKey { + case fields + case hosts + case item + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/requestBody/content/application\/json`. + case json(Operations.SaveAgentLogin.Input.Body.JsonPayload) + } + public var body: Operations.SaveAgentLogin.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.ListAgentMemories.Input.Path, - headers: Operations.ListAgentMemories.Input.Headers = .init() + path: Operations.SaveAgentLogin.Input.Path, + headers: Operations.SaveAgentLogin.Input.Headers = .init(), + body: Operations.SaveAgentLogin.Input.Body ) { self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/200/content/application\/json`. - case json([Components.Schemas.Memory]) + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.Login) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.Memory] { + public var json: Components.Schemas.Login { get throws { switch self { case let .json(body): @@ -28892,26 +29085,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentMemories.Output.Ok.Body + public var body: Operations.SaveAgentLogin.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentMemories.Output.Ok.Body) { + public init(body: Operations.SaveAgentLogin.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListAgentMemories.Output.Ok) + case ok(Operations.SaveAgentLogin.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListAgentMemories.Output.Ok { + public var ok: Operations.SaveAgentLogin.Output.Ok { get throws { switch self { case let .ok(response): @@ -28925,9 +29118,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -28943,26 +29136,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentMemories.Output.BadRequest.Body + public var body: Operations.SaveAgentLogin.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentMemories.Output.BadRequest.Body) { + public init(body: Operations.SaveAgentLogin.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListAgentMemories.Output.BadRequest) + case badRequest(Operations.SaveAgentLogin.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListAgentMemories.Output.BadRequest { + public var badRequest: Operations.SaveAgentLogin.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -28976,9 +29169,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -28994,26 +29187,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentMemories.Output.Unauthorized.Body + public var body: Operations.SaveAgentLogin.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentMemories.Output.Unauthorized.Body) { + public init(body: Operations.SaveAgentLogin.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListAgentMemories.Output.Unauthorized) + case unauthorized(Operations.SaveAgentLogin.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListAgentMemories.Output.Unauthorized { + public var unauthorized: Operations.SaveAgentLogin.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -29027,9 +29220,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29045,26 +29238,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentMemories.Output.NotFound.Body + public var body: Operations.SaveAgentLogin.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentMemories.Output.NotFound.Body) { + public init(body: Operations.SaveAgentLogin.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListAgentMemories.Output.NotFound) + case notFound(Operations.SaveAgentLogin.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListAgentMemories.Output.NotFound { + public var notFound: Operations.SaveAgentLogin.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -29078,9 +29271,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29096,26 +29289,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentMemories.Output.MethodNotAllowed.Body + public var body: Operations.SaveAgentLogin.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentMemories.Output.MethodNotAllowed.Body) { + public init(body: Operations.SaveAgentLogin.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListAgentMemories.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SaveAgentLogin.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListAgentMemories.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SaveAgentLogin.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -29129,9 +29322,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29147,26 +29340,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentMemories.Output.Conflict.Body + public var body: Operations.SaveAgentLogin.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentMemories.Output.Conflict.Body) { + public init(body: Operations.SaveAgentLogin.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListAgentMemories.Output.Conflict) + case conflict(Operations.SaveAgentLogin.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListAgentMemories.Output.Conflict { + public var conflict: Operations.SaveAgentLogin.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -29180,9 +29373,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -29198,26 +29391,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentMemories.Output.ContentTooLarge.Body + public var body: Operations.SaveAgentLogin.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentMemories.Output.ContentTooLarge.Body) { + public init(body: Operations.SaveAgentLogin.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListAgentMemories.Output.ContentTooLarge) + case contentTooLarge(Operations.SaveAgentLogin.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListAgentMemories.Output.ContentTooLarge { + public var contentTooLarge: Operations.SaveAgentLogin.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -29231,9 +29424,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29249,26 +29442,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentMemories.Output.InternalServerError.Body + public var body: Operations.SaveAgentLogin.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentMemories.Output.InternalServerError.Body) { + public init(body: Operations.SaveAgentLogin.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListAgentMemories.Output.InternalServerError) + case internalServerError(Operations.SaveAgentLogin.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListAgentMemories.Output.InternalServerError { + public var internalServerError: Operations.SaveAgentLogin.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -29282,9 +29475,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29300,26 +29493,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentMemories.Output.ServiceUnavailable.Body + public var body: Operations.SaveAgentLogin.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentMemories.Output.ServiceUnavailable.Body) { + public init(body: Operations.SaveAgentLogin.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/put(saveAgentLogin)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListAgentMemories.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SaveAgentLogin.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListAgentMemories.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SaveAgentLogin.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -29369,129 +29562,98 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/agents/{id}/memories`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)`. - public enum CreateAgentMemory { - public static let id: Swift.String = "createAgentMemory" + /// Deletes a login and its fill records, or declines a request for one, which starts a bot turn with a notice. + /// + /// - Remark: HTTP `DELETE /v1/agents/{id}/logins/{name}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)`. + public enum DeleteAgentLogin { + public static let id: Swift.String = "deleteAgentLogin" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/path/name`. + public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - name: + public init( + id: Swift.String, + name: Swift.String + ) { self.id = id + self.name = name } } - public var path: Operations.CreateAgentMemory.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/header`. + public var path: Operations.DeleteAgentLogin.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CreateAgentMemory.Input.Headers - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/requestBody/json/content`. - public var content: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - content: - public init(content: Swift.String) { - self.content = content - } - public enum CodingKeys: String, CodingKey { - case content - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/requestBody/content/application\/json`. - case json(Operations.CreateAgentMemory.Input.Body.JsonPayload) - } - public var body: Operations.CreateAgentMemory.Input.Body + public var headers: Operations.DeleteAgentLogin.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.CreateAgentMemory.Input.Path, - headers: Operations.CreateAgentMemory.Input.Headers = .init(), - body: Operations.CreateAgentMemory.Input.Body + path: Operations.DeleteAgentLogin.Input.Path, + headers: Operations.DeleteAgentLogin.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/201/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/201/content/application\/json`. - case json(Components.Schemas.Memory) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.Memory { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.CreateAgentMemory.Output.Created.Body - /// Creates a new `Created`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.CreateAgentMemory.Output.Created.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/201`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/204`. /// - /// HTTP response code: `201 created`. - case created(Operations.CreateAgentMemory.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteAgentLogin.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.CreateAgentMemory.Output.Created { + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteAgentLogin.Output.NoContent { get throws { switch self { - case let .created(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29507,26 +29669,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentMemory.Output.BadRequest.Body + public var body: Operations.DeleteAgentLogin.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentMemory.Output.BadRequest.Body) { + public init(body: Operations.DeleteAgentLogin.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CreateAgentMemory.Output.BadRequest) + case badRequest(Operations.DeleteAgentLogin.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CreateAgentMemory.Output.BadRequest { + public var badRequest: Operations.DeleteAgentLogin.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -29540,9 +29702,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -29558,26 +29720,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentMemory.Output.Unauthorized.Body + public var body: Operations.DeleteAgentLogin.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentMemory.Output.Unauthorized.Body) { + public init(body: Operations.DeleteAgentLogin.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CreateAgentMemory.Output.Unauthorized) + case unauthorized(Operations.DeleteAgentLogin.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CreateAgentMemory.Output.Unauthorized { + public var unauthorized: Operations.DeleteAgentLogin.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -29591,9 +29753,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29609,26 +29771,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentMemory.Output.NotFound.Body + public var body: Operations.DeleteAgentLogin.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentMemory.Output.NotFound.Body) { + public init(body: Operations.DeleteAgentLogin.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CreateAgentMemory.Output.NotFound) + case notFound(Operations.DeleteAgentLogin.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CreateAgentMemory.Output.NotFound { + public var notFound: Operations.DeleteAgentLogin.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -29642,9 +29804,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29660,26 +29822,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentMemory.Output.MethodNotAllowed.Body + public var body: Operations.DeleteAgentLogin.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentMemory.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteAgentLogin.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CreateAgentMemory.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteAgentLogin.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CreateAgentMemory.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteAgentLogin.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -29693,9 +29855,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29711,26 +29873,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentMemory.Output.Conflict.Body + public var body: Operations.DeleteAgentLogin.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentMemory.Output.Conflict.Body) { + public init(body: Operations.DeleteAgentLogin.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CreateAgentMemory.Output.Conflict) + case conflict(Operations.DeleteAgentLogin.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CreateAgentMemory.Output.Conflict { + public var conflict: Operations.DeleteAgentLogin.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -29744,9 +29906,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -29762,26 +29924,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentMemory.Output.ContentTooLarge.Body + public var body: Operations.DeleteAgentLogin.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentMemory.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteAgentLogin.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CreateAgentMemory.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteAgentLogin.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CreateAgentMemory.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteAgentLogin.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -29795,9 +29957,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29813,26 +29975,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentMemory.Output.InternalServerError.Body + public var body: Operations.DeleteAgentLogin.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentMemory.Output.InternalServerError.Body) { + public init(body: Operations.DeleteAgentLogin.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CreateAgentMemory.Output.InternalServerError) + case internalServerError(Operations.DeleteAgentLogin.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CreateAgentMemory.Output.InternalServerError { + public var internalServerError: Operations.DeleteAgentLogin.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -29846,9 +30008,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -29864,26 +30026,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentMemory.Output.ServiceUnavailable.Body + public var body: Operations.DeleteAgentLogin.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentMemory.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteAgentLogin.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/delete(deleteAgentLogin)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CreateAgentMemory.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteAgentLogin.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CreateAgentMemory.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteAgentLogin.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -29933,244 +30095,98 @@ public enum Operations { } } } - /// - Remark: HTTP `PATCH /v1/agents/{id}/memories/{memoryId}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)`. - public enum UpdateAgentMemory { - public static let id: Swift.String = "updateAgentMemory" + /// Declines a pending login request without changing a saved login. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/logins/{name}/decline`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)`. + public enum DeclineAgentLogin { + public static let id: Swift.String = "declineAgentLogin" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/path/memoryId`. - public var memoryId: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/path/name`. + public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - memoryId: + /// - name: public init( id: Swift.String, - memoryId: Swift.String + name: Swift.String ) { self.id = id - self.memoryId = memoryId + self.name = name } } - public var path: Operations.UpdateAgentMemory.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/header`. + public var path: Operations.DeclineAgentLogin.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateAgentMemory.Input.Headers - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/requestBody/json/content`. - public var content: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - content: - public init(content: Swift.String) { - self.content = content - } - public enum CodingKeys: String, CodingKey { - case content - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/requestBody/content/application\/json`. - case json(Operations.UpdateAgentMemory.Input.Body.JsonPayload) - } - public var body: Operations.UpdateAgentMemory.Input.Body + public var headers: Operations.DeclineAgentLogin.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.UpdateAgentMemory.Input.Path, - headers: Operations.UpdateAgentMemory.Input.Headers = .init(), - body: Operations.UpdateAgentMemory.Input.Body + path: Operations.DeclineAgentLogin.Input.Path, + headers: Operations.DeclineAgentLogin.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/agentId`. - public var agentId: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/content`. - public var content: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/createdAt`. - public var createdAt: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/id`. - public var id: Swift.String - /// Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source`. - public struct SourcePayload: Codable, Hashable, Sendable { - /// For `bot`. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/agentId`. - public var agentId: Swift.String? - /// For `group`. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/groupId`. - public var groupId: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/kind`. - @frozen public enum KindPayload: String, Codable, Hashable, Sendable, CaseIterable { - case chat = "chat" - case owner = "owner" - case task = "task" - case bot = "bot" - case group = "group" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/kind`. - public var kind: Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload.SourcePayload.KindPayload - /// The task, bot, or group chat, as named when the memory was saved. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/name`. - public var name: Swift.String? - /// For `task`. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/scheduleId`. - public var scheduleId: Swift.String? - /// Creates a new `SourcePayload`. - /// - /// - Parameters: - /// - agentId: For `bot`. - /// - groupId: For `group`. - /// - kind: - /// - name: The task, bot, or group chat, as named when the memory was saved. - /// - scheduleId: For `task`. - public init( - agentId: Swift.String? = nil, - groupId: Swift.String? = nil, - kind: Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload.SourcePayload.KindPayload, - name: Swift.String? = nil, - scheduleId: Swift.String? = nil - ) { - self.agentId = agentId - self.groupId = groupId - self.kind = kind - self.name = name - self.scheduleId = scheduleId - } - public enum CodingKeys: String, CodingKey { - case agentId - case groupId - case kind - case name - case scheduleId - } - } - /// Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. - /// - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source`. - public var source: Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload.SourcePayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/updatedAt`. - public var updatedAt: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - agentId: - /// - content: - /// - createdAt: - /// - id: - /// - source: Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. - /// - updatedAt: - public init( - agentId: Swift.String? = nil, - content: Swift.String, - createdAt: Swift.String, - id: Swift.String, - source: Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload.SourcePayload? = nil, - updatedAt: Swift.String - ) { - self.agentId = agentId - self.content = content - self.createdAt = createdAt - self.id = id - self.source = source - self.updatedAt = updatedAt - } - public enum CodingKeys: String, CodingKey { - case agentId - case content - case createdAt - case id - case source - case updatedAt - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/application\/json`. - case json(Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload?) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload? { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.UpdateAgentMemory.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentMemory.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.UpdateAgentMemory.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeclineAgentLogin.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateAgentMemory.Output.Ok { + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeclineAgentLogin.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -30186,26 +30202,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentMemory.Output.BadRequest.Body + public var body: Operations.DeclineAgentLogin.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentMemory.Output.BadRequest.Body) { + public init(body: Operations.DeclineAgentLogin.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateAgentMemory.Output.BadRequest) + case badRequest(Operations.DeclineAgentLogin.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateAgentMemory.Output.BadRequest { + public var badRequest: Operations.DeclineAgentLogin.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -30219,9 +30235,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -30237,26 +30253,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentMemory.Output.Unauthorized.Body + public var body: Operations.DeclineAgentLogin.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentMemory.Output.Unauthorized.Body) { + public init(body: Operations.DeclineAgentLogin.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateAgentMemory.Output.Unauthorized) + case unauthorized(Operations.DeclineAgentLogin.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateAgentMemory.Output.Unauthorized { + public var unauthorized: Operations.DeclineAgentLogin.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -30270,9 +30286,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -30288,26 +30304,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentMemory.Output.NotFound.Body + public var body: Operations.DeclineAgentLogin.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentMemory.Output.NotFound.Body) { + public init(body: Operations.DeclineAgentLogin.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateAgentMemory.Output.NotFound) + case notFound(Operations.DeclineAgentLogin.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateAgentMemory.Output.NotFound { + public var notFound: Operations.DeclineAgentLogin.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -30321,9 +30337,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -30339,26 +30355,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentMemory.Output.MethodNotAllowed.Body + public var body: Operations.DeclineAgentLogin.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentMemory.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeclineAgentLogin.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateAgentMemory.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeclineAgentLogin.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateAgentMemory.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeclineAgentLogin.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -30372,9 +30388,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -30390,26 +30406,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentMemory.Output.Conflict.Body + public var body: Operations.DeclineAgentLogin.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentMemory.Output.Conflict.Body) { + public init(body: Operations.DeclineAgentLogin.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateAgentMemory.Output.Conflict) + case conflict(Operations.DeclineAgentLogin.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateAgentMemory.Output.Conflict { + public var conflict: Operations.DeclineAgentLogin.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -30423,9 +30439,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -30441,26 +30457,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentMemory.Output.ContentTooLarge.Body + public var body: Operations.DeclineAgentLogin.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentMemory.Output.ContentTooLarge.Body) { + public init(body: Operations.DeclineAgentLogin.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateAgentMemory.Output.ContentTooLarge) + case contentTooLarge(Operations.DeclineAgentLogin.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateAgentMemory.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeclineAgentLogin.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -30474,9 +30490,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -30492,26 +30508,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentMemory.Output.InternalServerError.Body + public var body: Operations.DeclineAgentLogin.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentMemory.Output.InternalServerError.Body) { + public init(body: Operations.DeclineAgentLogin.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateAgentMemory.Output.InternalServerError) + case internalServerError(Operations.DeclineAgentLogin.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateAgentMemory.Output.InternalServerError { + public var internalServerError: Operations.DeclineAgentLogin.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -30525,9 +30541,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/decline/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -30543,26 +30559,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentMemory.Output.ServiceUnavailable.Body + public var body: Operations.DeclineAgentLogin.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentMemory.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeclineAgentLogin.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/decline/post(declineAgentLogin)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateAgentMemory.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeclineAgentLogin.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateAgentMemory.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeclineAgentLogin.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -30612,96 +30628,137 @@ public enum Operations { } } } - /// - Remark: HTTP `DELETE /v1/agents/{id}/memories/{memoryId}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)`. - public enum DeleteAgentMemory { - public static let id: Swift.String = "deleteAgentMemory" + /// Fills of the login's fields in the last 90 days, newest first. Page with `before` set to the last use's ID. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/logins/{name}/uses`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)`. + public enum ListAgentLoginUses { + public static let id: Swift.String = "listAgentLoginUses" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/path/memoryId`. - public var memoryId: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/path/name`. + public var name: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - memoryId: + /// - name: public init( id: Swift.String, - memoryId: Swift.String + name: Swift.String ) { self.id = id - self.memoryId = memoryId + self.name = name } } - public var path: Operations.DeleteAgentMemory.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/header`. + public var path: Operations.ListAgentLoginUses.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/query/limit`. + public var limit: Swift.Int? + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/query/before`. + public var before: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - before: + public init( + limit: Swift.Int? = nil, + before: Swift.String? = nil + ) { + self.limit = limit + self.before = before + } + } + public var query: Operations.ListAgentLoginUses.Input.Query + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteAgentMemory.Input.Headers + public var headers: Operations.ListAgentLoginUses.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.DeleteAgentMemory.Input.Path, - headers: Operations.DeleteAgentMemory.Input.Headers = .init() + path: Operations.ListAgentLoginUses.Input.Path, + query: Operations.ListAgentLoginUses.Input.Query = .init(), + headers: Operations.ListAgentLoginUses.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/200/content/application\/json`. + case json([Components.Schemas.LoginUse]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.LoginUse] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListAgentLoginUses.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListAgentLoginUses.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteAgentMemory.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/204`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.ListAgentLoginUses.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteAgentMemory.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ListAgentLoginUses.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -30717,26 +30774,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentMemory.Output.BadRequest.Body + public var body: Operations.ListAgentLoginUses.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentMemory.Output.BadRequest.Body) { + public init(body: Operations.ListAgentLoginUses.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteAgentMemory.Output.BadRequest) + case badRequest(Operations.ListAgentLoginUses.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteAgentMemory.Output.BadRequest { + public var badRequest: Operations.ListAgentLoginUses.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -30750,9 +30807,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -30768,26 +30825,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentMemory.Output.Unauthorized.Body + public var body: Operations.ListAgentLoginUses.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentMemory.Output.Unauthorized.Body) { + public init(body: Operations.ListAgentLoginUses.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteAgentMemory.Output.Unauthorized) + case unauthorized(Operations.ListAgentLoginUses.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteAgentMemory.Output.Unauthorized { + public var unauthorized: Operations.ListAgentLoginUses.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -30801,9 +30858,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -30819,26 +30876,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentMemory.Output.NotFound.Body + public var body: Operations.ListAgentLoginUses.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentMemory.Output.NotFound.Body) { + public init(body: Operations.ListAgentLoginUses.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteAgentMemory.Output.NotFound) + case notFound(Operations.ListAgentLoginUses.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteAgentMemory.Output.NotFound { + public var notFound: Operations.ListAgentLoginUses.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -30852,9 +30909,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -30870,26 +30927,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentMemory.Output.MethodNotAllowed.Body + public var body: Operations.ListAgentLoginUses.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentMemory.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListAgentLoginUses.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteAgentMemory.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListAgentLoginUses.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteAgentMemory.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListAgentLoginUses.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -30903,9 +30960,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -30921,26 +30978,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentMemory.Output.Conflict.Body + public var body: Operations.ListAgentLoginUses.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentMemory.Output.Conflict.Body) { + public init(body: Operations.ListAgentLoginUses.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteAgentMemory.Output.Conflict) + case conflict(Operations.ListAgentLoginUses.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteAgentMemory.Output.Conflict { + public var conflict: Operations.ListAgentLoginUses.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -30954,9 +31011,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -30972,26 +31029,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentMemory.Output.ContentTooLarge.Body + public var body: Operations.ListAgentLoginUses.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentMemory.Output.ContentTooLarge.Body) { + public init(body: Operations.ListAgentLoginUses.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteAgentMemory.Output.ContentTooLarge) + case contentTooLarge(Operations.ListAgentLoginUses.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteAgentMemory.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListAgentLoginUses.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -31005,9 +31062,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -31023,26 +31080,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentMemory.Output.InternalServerError.Body + public var body: Operations.ListAgentLoginUses.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentMemory.Output.InternalServerError.Body) { + public init(body: Operations.ListAgentLoginUses.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteAgentMemory.Output.InternalServerError) + case internalServerError(Operations.ListAgentLoginUses.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteAgentMemory.Output.InternalServerError { + public var internalServerError: Operations.ListAgentLoginUses.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -31056,9 +31113,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/logins/{name}/uses/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -31074,26 +31131,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentMemory.Output.ServiceUnavailable.Body + public var body: Operations.ListAgentLoginUses.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentMemory.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListAgentLoginUses.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/logins/{name}/uses/get(listAgentLoginUses)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteAgentMemory.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListAgentLoginUses.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteAgentMemory.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListAgentLoginUses.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -31143,14 +31200,14 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/agents/{id}/messages`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)`. - public enum SendMessage { - public static let id: Swift.String = "sendMessage" + /// - Remark: HTTP `GET /v1/agents/{id}/memories`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)`. + public enum ListAgentMemories { + public static let id: Swift.String = "listAgentMemories" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -31160,124 +31217,43 @@ public enum Operations { self.id = id } } - public var path: Operations.SendMessage.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/header`. + public var path: Operations.ListAgentMemories.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SendMessage.Input.Headers - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/AttachmentsPayload`. - public struct AttachmentsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/AttachmentsPayload/data`. - public var data: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/AttachmentsPayload/mimeType`. - public var mimeType: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/AttachmentsPayload/name`. - public var name: Swift.String - /// Creates a new `AttachmentsPayloadPayload`. - /// - /// - Parameters: - /// - data: - /// - mimeType: - /// - name: - public init( - data: Swift.String, - mimeType: Swift.String, - name: Swift.String - ) { - self.data = data - self.mimeType = mimeType - self.name = name - } - public enum CodingKeys: String, CodingKey { - case data - case mimeType - case name - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/attachments`. - public typealias AttachmentsPayload = [Operations.SendMessage.Input.Body.JsonPayload.AttachmentsPayloadPayload] - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/attachments`. - public var attachments: Operations.SendMessage.Input.Body.JsonPayload.AttachmentsPayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/content`. - public var content: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/replyTo`. - public var replyTo: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/requestId`. - public var requestId: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/timezone`. - public var timezone: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - attachments: - /// - content: - /// - replyTo: - /// - requestId: - /// - timezone: - public init( - attachments: Operations.SendMessage.Input.Body.JsonPayload.AttachmentsPayload? = nil, - content: Swift.String, - replyTo: Swift.String? = nil, - requestId: Swift.String, - timezone: Swift.String? = nil - ) { - self.attachments = attachments - self.content = content - self.replyTo = replyTo - self.requestId = requestId - self.timezone = timezone - } - public enum CodingKeys: String, CodingKey { - case attachments - case content - case replyTo - case requestId - case timezone - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/content/application\/json`. - case json(Operations.SendMessage.Input.Body.JsonPayload) - } - public var body: Operations.SendMessage.Input.Body + public var headers: Operations.ListAgentMemories.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.SendMessage.Input.Path, - headers: Operations.SendMessage.Input.Headers = .init(), - body: Operations.SendMessage.Input.Body + path: Operations.ListAgentMemories.Input.Path, + headers: Operations.ListAgentMemories.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Accepted: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/202/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/202/content/application\/json`. - case json(Components.Schemas.Execution) + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/200/content/application\/json`. + case json([Components.Schemas.Memory]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.Execution { + public var json: [Components.Schemas.Memory] { get throws { switch self { case let .json(body): @@ -31287,42 +31263,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendMessage.Output.Accepted.Body - /// Creates a new `Accepted`. + public var body: Operations.ListAgentMemories.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendMessage.Output.Accepted.Body) { + public init(body: Operations.ListAgentMemories.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/202`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/200`. /// - /// HTTP response code: `202 accepted`. - case accepted(Operations.SendMessage.Output.Accepted) - /// The associated value of the enum case if `self` is `.accepted`. + /// HTTP response code: `200 ok`. + case ok(Operations.ListAgentMemories.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.accepted`. - /// - SeeAlso: `.accepted`. - public var accepted: Operations.SendMessage.Output.Accepted { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ListAgentMemories.Output.Ok { get throws { switch self { - case let .accepted(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "accepted", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -31338,26 +31314,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendMessage.Output.BadRequest.Body + public var body: Operations.ListAgentMemories.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendMessage.Output.BadRequest.Body) { + public init(body: Operations.ListAgentMemories.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SendMessage.Output.BadRequest) + case badRequest(Operations.ListAgentMemories.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SendMessage.Output.BadRequest { + public var badRequest: Operations.ListAgentMemories.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -31371,9 +31347,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -31389,26 +31365,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendMessage.Output.Unauthorized.Body + public var body: Operations.ListAgentMemories.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendMessage.Output.Unauthorized.Body) { + public init(body: Operations.ListAgentMemories.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SendMessage.Output.Unauthorized) + case unauthorized(Operations.ListAgentMemories.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SendMessage.Output.Unauthorized { + public var unauthorized: Operations.ListAgentMemories.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -31422,9 +31398,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -31440,26 +31416,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendMessage.Output.NotFound.Body + public var body: Operations.ListAgentMemories.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendMessage.Output.NotFound.Body) { + public init(body: Operations.ListAgentMemories.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SendMessage.Output.NotFound) + case notFound(Operations.ListAgentMemories.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SendMessage.Output.NotFound { + public var notFound: Operations.ListAgentMemories.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -31473,9 +31449,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -31491,26 +31467,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendMessage.Output.MethodNotAllowed.Body + public var body: Operations.ListAgentMemories.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendMessage.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListAgentMemories.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SendMessage.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListAgentMemories.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SendMessage.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListAgentMemories.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -31524,9 +31500,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -31542,26 +31518,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendMessage.Output.Conflict.Body + public var body: Operations.ListAgentMemories.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendMessage.Output.Conflict.Body) { + public init(body: Operations.ListAgentMemories.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SendMessage.Output.Conflict) + case conflict(Operations.ListAgentMemories.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SendMessage.Output.Conflict { + public var conflict: Operations.ListAgentMemories.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -31575,9 +31551,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -31593,26 +31569,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendMessage.Output.ContentTooLarge.Body + public var body: Operations.ListAgentMemories.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendMessage.Output.ContentTooLarge.Body) { + public init(body: Operations.ListAgentMemories.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SendMessage.Output.ContentTooLarge) + case contentTooLarge(Operations.ListAgentMemories.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SendMessage.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListAgentMemories.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -31626,9 +31602,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -31644,26 +31620,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendMessage.Output.InternalServerError.Body + public var body: Operations.ListAgentMemories.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendMessage.Output.InternalServerError.Body) { + public init(body: Operations.ListAgentMemories.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SendMessage.Output.InternalServerError) + case internalServerError(Operations.ListAgentMemories.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SendMessage.Output.InternalServerError { + public var internalServerError: Operations.ListAgentMemories.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -31677,9 +31653,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -31695,26 +31671,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendMessage.Output.ServiceUnavailable.Body + public var body: Operations.ListAgentMemories.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendMessage.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListAgentMemories.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/get(listAgentMemories)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SendMessage.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListAgentMemories.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SendMessage.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListAgentMemories.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -31764,16 +31740,14 @@ public enum Operations { } } } - /// What the bot's reviews changed, newest first, one entry per reviewed execution with its changes. Clients show these as notices in the bot chat, also after reconnecting. - /// - /// - Remark: HTTP `GET /v1/agents/{id}/reviews`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)`. - public enum ListAgentReviews { - public static let id: Swift.String = "listAgentReviews" + /// - Remark: HTTP `POST /v1/agents/{id}/memories`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)`. + public enum CreateAgentMemory { + public static let id: Swift.String = "createAgentMemory" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -31783,59 +31757,67 @@ public enum Operations { self.id = id } } - public var path: Operations.ListAgentReviews.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/query/limit`. - public var limit: Swift.Int? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - public init(limit: Swift.Int? = nil) { - self.limit = limit - } - } - public var query: Operations.ListAgentReviews.Input.Query - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/header`. + public var path: Operations.CreateAgentMemory.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListAgentReviews.Input.Headers + public var headers: Operations.CreateAgentMemory.Input.Headers + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/requestBody/json/content`. + public var content: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - content: + public init(content: Swift.String) { + self.content = content + } + public enum CodingKeys: String, CodingKey { + case content + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/requestBody/content/application\/json`. + case json(Operations.CreateAgentMemory.Input.Body.JsonPayload) + } + public var body: Operations.CreateAgentMemory.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: + /// - body: public init( - path: Operations.ListAgentReviews.Input.Path, - query: Operations.ListAgentReviews.Input.Query = .init(), - headers: Operations.ListAgentReviews.Input.Headers = .init() + path: Operations.CreateAgentMemory.Input.Path, + headers: Operations.CreateAgentMemory.Input.Headers = .init(), + body: Operations.CreateAgentMemory.Input.Body ) { self.path = path - self.query = query self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/200/content`. + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/200/content/application\/json`. - case json([Components.Schemas.ReviewResult]) + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/201/content/application\/json`. + case json(Components.Schemas.Memory) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.ReviewResult] { + public var json: Components.Schemas.Memory { get throws { switch self { case let .json(body): @@ -31845,42 +31827,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentReviews.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.CreateAgentMemory.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentReviews.Output.Ok.Body) { + public init(body: Operations.CreateAgentMemory.Output.Created.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/201`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.ListAgentReviews.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `201 created`. + case created(Operations.CreateAgentMemory.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.ListAgentReviews.Output.Ok { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.CreateAgentMemory.Output.Created { get throws { switch self { - case let .ok(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "created", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -31896,26 +31878,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentReviews.Output.BadRequest.Body + public var body: Operations.CreateAgentMemory.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentReviews.Output.BadRequest.Body) { + public init(body: Operations.CreateAgentMemory.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListAgentReviews.Output.BadRequest) + case badRequest(Operations.CreateAgentMemory.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListAgentReviews.Output.BadRequest { + public var badRequest: Operations.CreateAgentMemory.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -31929,9 +31911,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -31947,26 +31929,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentReviews.Output.Unauthorized.Body + public var body: Operations.CreateAgentMemory.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentReviews.Output.Unauthorized.Body) { + public init(body: Operations.CreateAgentMemory.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListAgentReviews.Output.Unauthorized) + case unauthorized(Operations.CreateAgentMemory.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListAgentReviews.Output.Unauthorized { + public var unauthorized: Operations.CreateAgentMemory.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -31980,9 +31962,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -31998,26 +31980,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentReviews.Output.NotFound.Body + public var body: Operations.CreateAgentMemory.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentReviews.Output.NotFound.Body) { + public init(body: Operations.CreateAgentMemory.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListAgentReviews.Output.NotFound) + case notFound(Operations.CreateAgentMemory.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListAgentReviews.Output.NotFound { + public var notFound: Operations.CreateAgentMemory.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -32031,9 +32013,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -32049,26 +32031,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentReviews.Output.MethodNotAllowed.Body + public var body: Operations.CreateAgentMemory.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentReviews.Output.MethodNotAllowed.Body) { + public init(body: Operations.CreateAgentMemory.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListAgentReviews.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CreateAgentMemory.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListAgentReviews.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CreateAgentMemory.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -32082,9 +32064,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -32100,26 +32082,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentReviews.Output.Conflict.Body + public var body: Operations.CreateAgentMemory.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentReviews.Output.Conflict.Body) { + public init(body: Operations.CreateAgentMemory.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListAgentReviews.Output.Conflict) + case conflict(Operations.CreateAgentMemory.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListAgentReviews.Output.Conflict { + public var conflict: Operations.CreateAgentMemory.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -32133,9 +32115,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -32151,26 +32133,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentReviews.Output.ContentTooLarge.Body + public var body: Operations.CreateAgentMemory.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentReviews.Output.ContentTooLarge.Body) { + public init(body: Operations.CreateAgentMemory.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListAgentReviews.Output.ContentTooLarge) + case contentTooLarge(Operations.CreateAgentMemory.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListAgentReviews.Output.ContentTooLarge { + public var contentTooLarge: Operations.CreateAgentMemory.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -32184,9 +32166,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -32202,26 +32184,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentReviews.Output.InternalServerError.Body + public var body: Operations.CreateAgentMemory.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentReviews.Output.InternalServerError.Body) { + public init(body: Operations.CreateAgentMemory.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListAgentReviews.Output.InternalServerError) + case internalServerError(Operations.CreateAgentMemory.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListAgentReviews.Output.InternalServerError { + public var internalServerError: Operations.CreateAgentMemory.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -32235,9 +32217,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -32253,26 +32235,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentReviews.Output.ServiceUnavailable.Body + public var body: Operations.CreateAgentMemory.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentReviews.Output.ServiceUnavailable.Body) { + public init(body: Operations.CreateAgentMemory.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/post(createAgentMemory)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListAgentReviews.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CreateAgentMemory.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListAgentReviews.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CreateAgentMemory.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -32322,62 +32304,199 @@ public enum Operations { } } } - /// The bot's own skill packages, including stale and archived ones. The agent's inline `skills` field lists the same skills by name and instructions. - /// - /// - Remark: HTTP `GET /v1/agents/{id}/skills`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)`. - public enum ListAgentSkills { - public static let id: Swift.String = "listAgentSkills" + /// - Remark: HTTP `PATCH /v1/agents/{id}/memories/{memoryId}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)`. + public enum UpdateAgentMemory { + public static let id: Swift.String = "updateAgentMemory" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/path/memoryId`. + public var memoryId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - memoryId: + public init( + id: Swift.String, + memoryId: Swift.String + ) { self.id = id + self.memoryId = memoryId } } - public var path: Operations.ListAgentSkills.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/header`. + public var path: Operations.UpdateAgentMemory.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListAgentSkills.Input.Headers + public var headers: Operations.UpdateAgentMemory.Input.Headers + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/requestBody/json/content`. + public var content: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - content: + public init(content: Swift.String) { + self.content = content + } + public enum CodingKeys: String, CodingKey { + case content + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/requestBody/content/application\/json`. + case json(Operations.UpdateAgentMemory.Input.Body.JsonPayload) + } + public var body: Operations.UpdateAgentMemory.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.ListAgentSkills.Input.Path, - headers: Operations.ListAgentSkills.Input.Headers = .init() + path: Operations.UpdateAgentMemory.Input.Path, + headers: Operations.UpdateAgentMemory.Input.Headers = .init(), + body: Operations.UpdateAgentMemory.Input.Body ) { self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/200/content/application\/json`. - case json([Components.Schemas.SkillPackage]) + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/agentId`. + public var agentId: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/content`. + public var content: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/createdAt`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/id`. + public var id: Swift.String + /// Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source`. + public struct SourcePayload: Codable, Hashable, Sendable { + /// For `bot`. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/agentId`. + public var agentId: Swift.String? + /// For `group`. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/groupId`. + public var groupId: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/kind`. + @frozen public enum KindPayload: String, Codable, Hashable, Sendable, CaseIterable { + case chat = "chat" + case owner = "owner" + case task = "task" + case bot = "bot" + case group = "group" + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/kind`. + public var kind: Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload.SourcePayload.KindPayload + /// The task, bot, or group chat, as named when the memory was saved. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/name`. + public var name: Swift.String? + /// For `task`. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source/scheduleId`. + public var scheduleId: Swift.String? + /// Creates a new `SourcePayload`. + /// + /// - Parameters: + /// - agentId: For `bot`. + /// - groupId: For `group`. + /// - kind: + /// - name: The task, bot, or group chat, as named when the memory was saved. + /// - scheduleId: For `task`. + public init( + agentId: Swift.String? = nil, + groupId: Swift.String? = nil, + kind: Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload.SourcePayload.KindPayload, + name: Swift.String? = nil, + scheduleId: Swift.String? = nil + ) { + self.agentId = agentId + self.groupId = groupId + self.kind = kind + self.name = name + self.scheduleId = scheduleId + } + public enum CodingKeys: String, CodingKey { + case agentId + case groupId + case kind + case name + case scheduleId + } + } + /// Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. + /// + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/source`. + public var source: Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload.SourcePayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/json/updatedAt`. + public var updatedAt: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - agentId: + /// - content: + /// - createdAt: + /// - id: + /// - source: Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. + /// - updatedAt: + public init( + agentId: Swift.String? = nil, + content: Swift.String, + createdAt: Swift.String, + id: Swift.String, + source: Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload.SourcePayload? = nil, + updatedAt: Swift.String + ) { + self.agentId = agentId + self.content = content + self.createdAt = createdAt + self.id = id + self.source = source + self.updatedAt = updatedAt + } + public enum CodingKeys: String, CodingKey { + case agentId + case content + case createdAt + case id + case source + case updatedAt + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/200/content/application\/json`. + case json(Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload?) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.SkillPackage] { + public var json: Operations.UpdateAgentMemory.Output.Ok.Body.JsonPayload? { get throws { switch self { case let .json(body): @@ -32387,26 +32506,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentSkills.Output.Ok.Body + public var body: Operations.UpdateAgentMemory.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentSkills.Output.Ok.Body) { + public init(body: Operations.UpdateAgentMemory.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListAgentSkills.Output.Ok) + case ok(Operations.UpdateAgentMemory.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListAgentSkills.Output.Ok { + public var ok: Operations.UpdateAgentMemory.Output.Ok { get throws { switch self { case let .ok(response): @@ -32420,9 +32539,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -32438,26 +32557,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentSkills.Output.BadRequest.Body + public var body: Operations.UpdateAgentMemory.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentSkills.Output.BadRequest.Body) { + public init(body: Operations.UpdateAgentMemory.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListAgentSkills.Output.BadRequest) + case badRequest(Operations.UpdateAgentMemory.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListAgentSkills.Output.BadRequest { + public var badRequest: Operations.UpdateAgentMemory.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -32471,9 +32590,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -32489,26 +32608,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentSkills.Output.Unauthorized.Body + public var body: Operations.UpdateAgentMemory.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentSkills.Output.Unauthorized.Body) { + public init(body: Operations.UpdateAgentMemory.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListAgentSkills.Output.Unauthorized) + case unauthorized(Operations.UpdateAgentMemory.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListAgentSkills.Output.Unauthorized { + public var unauthorized: Operations.UpdateAgentMemory.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -32522,9 +32641,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -32540,26 +32659,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentSkills.Output.NotFound.Body + public var body: Operations.UpdateAgentMemory.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentSkills.Output.NotFound.Body) { + public init(body: Operations.UpdateAgentMemory.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListAgentSkills.Output.NotFound) + case notFound(Operations.UpdateAgentMemory.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListAgentSkills.Output.NotFound { + public var notFound: Operations.UpdateAgentMemory.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -32573,9 +32692,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -32591,26 +32710,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentSkills.Output.MethodNotAllowed.Body + public var body: Operations.UpdateAgentMemory.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentSkills.Output.MethodNotAllowed.Body) { + public init(body: Operations.UpdateAgentMemory.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListAgentSkills.Output.MethodNotAllowed) + case methodNotAllowed(Operations.UpdateAgentMemory.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListAgentSkills.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.UpdateAgentMemory.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -32624,9 +32743,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -32642,26 +32761,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentSkills.Output.Conflict.Body + public var body: Operations.UpdateAgentMemory.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentSkills.Output.Conflict.Body) { + public init(body: Operations.UpdateAgentMemory.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListAgentSkills.Output.Conflict) + case conflict(Operations.UpdateAgentMemory.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListAgentSkills.Output.Conflict { + public var conflict: Operations.UpdateAgentMemory.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -32675,9 +32794,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -32693,26 +32812,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentSkills.Output.ContentTooLarge.Body + public var body: Operations.UpdateAgentMemory.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentSkills.Output.ContentTooLarge.Body) { + public init(body: Operations.UpdateAgentMemory.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListAgentSkills.Output.ContentTooLarge) + case contentTooLarge(Operations.UpdateAgentMemory.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListAgentSkills.Output.ContentTooLarge { + public var contentTooLarge: Operations.UpdateAgentMemory.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -32726,9 +32845,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -32744,26 +32863,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentSkills.Output.InternalServerError.Body + public var body: Operations.UpdateAgentMemory.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentSkills.Output.InternalServerError.Body) { + public init(body: Operations.UpdateAgentMemory.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListAgentSkills.Output.InternalServerError) + case internalServerError(Operations.UpdateAgentMemory.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListAgentSkills.Output.InternalServerError { + public var internalServerError: Operations.UpdateAgentMemory.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -32777,9 +32896,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/PATCH/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -32795,26 +32914,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListAgentSkills.Output.ServiceUnavailable.Body + public var body: Operations.UpdateAgentMemory.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListAgentSkills.Output.ServiceUnavailable.Body) { + public init(body: Operations.UpdateAgentMemory.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/patch(updateAgentMemory)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListAgentSkills.Output.ServiceUnavailable) + case serviceUnavailable(Operations.UpdateAgentMemory.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListAgentSkills.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.UpdateAgentMemory.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -32864,174 +32983,96 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/agents/{id}/skills`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)`. - public enum CreateAgentSkill { - public static let id: Swift.String = "createAgentSkill" + /// - Remark: HTTP `DELETE /v1/agents/{id}/memories/{memoryId}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)`. + public enum DeleteAgentMemory { + public static let id: Swift.String = "deleteAgentMemory" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/path/memoryId`. + public var memoryId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - memoryId: + public init( + id: Swift.String, + memoryId: Swift.String + ) { self.id = id + self.memoryId = memoryId } } - public var path: Operations.CreateAgentSkill.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/header`. + public var path: Operations.DeleteAgentMemory.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CreateAgentSkill.Input.Headers - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/DocumentsPayload`. - public struct DocumentsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/DocumentsPayload/content`. - public var content: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/DocumentsPayload/path`. - public var path: Swift.String - /// Creates a new `DocumentsPayloadPayload`. - /// - /// - Parameters: - /// - content: - /// - path: - public init( - content: Swift.String, - path: Swift.String - ) { - self.content = content - self.path = path - } - public enum CodingKeys: String, CodingKey { - case content - case path - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/documents`. - public typealias DocumentsPayload = [Operations.CreateAgentSkill.Input.Body.JsonPayload.DocumentsPayloadPayload] - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/documents`. - public var documents: Operations.CreateAgentSkill.Input.Body.JsonPayload.DocumentsPayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/instructions`. - public var instructions: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/name`. - public var name: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - description: - /// - documents: - /// - instructions: - /// - name: - public init( - description: Swift.String? = nil, - documents: Operations.CreateAgentSkill.Input.Body.JsonPayload.DocumentsPayload? = nil, - instructions: Swift.String, - name: Swift.String - ) { - self.description = description - self.documents = documents - self.instructions = instructions - self.name = name - } - public enum CodingKeys: String, CodingKey { - case description - case documents - case instructions - case name - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/content/application\/json`. - case json(Operations.CreateAgentSkill.Input.Body.JsonPayload) - } - public var body: Operations.CreateAgentSkill.Input.Body + public var headers: Operations.DeleteAgentMemory.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.CreateAgentSkill.Input.Path, - headers: Operations.CreateAgentSkill.Input.Headers = .init(), - body: Operations.CreateAgentSkill.Input.Body + path: Operations.DeleteAgentMemory.Input.Path, + headers: Operations.DeleteAgentMemory.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/201/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/201/content/application\/json`. - case json(Components.Schemas.SkillPackage) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.SkillPackage { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.CreateAgentSkill.Output.Created.Body - /// Creates a new `Created`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.CreateAgentSkill.Output.Created.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/201`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/204`. /// - /// HTTP response code: `201 created`. - case created(Operations.CreateAgentSkill.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteAgentMemory.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.CreateAgentSkill.Output.Created { + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteAgentMemory.Output.NoContent { get throws { switch self { - case let .created(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -33047,26 +33088,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentSkill.Output.BadRequest.Body + public var body: Operations.DeleteAgentMemory.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentSkill.Output.BadRequest.Body) { + public init(body: Operations.DeleteAgentMemory.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CreateAgentSkill.Output.BadRequest) + case badRequest(Operations.DeleteAgentMemory.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CreateAgentSkill.Output.BadRequest { + public var badRequest: Operations.DeleteAgentMemory.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -33080,9 +33121,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -33098,26 +33139,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentSkill.Output.Unauthorized.Body + public var body: Operations.DeleteAgentMemory.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentSkill.Output.Unauthorized.Body) { + public init(body: Operations.DeleteAgentMemory.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CreateAgentSkill.Output.Unauthorized) + case unauthorized(Operations.DeleteAgentMemory.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CreateAgentSkill.Output.Unauthorized { + public var unauthorized: Operations.DeleteAgentMemory.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -33131,9 +33172,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -33149,26 +33190,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentSkill.Output.NotFound.Body + public var body: Operations.DeleteAgentMemory.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentSkill.Output.NotFound.Body) { + public init(body: Operations.DeleteAgentMemory.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CreateAgentSkill.Output.NotFound) + case notFound(Operations.DeleteAgentMemory.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CreateAgentSkill.Output.NotFound { + public var notFound: Operations.DeleteAgentMemory.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -33182,9 +33223,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -33200,26 +33241,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentSkill.Output.MethodNotAllowed.Body + public var body: Operations.DeleteAgentMemory.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentSkill.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteAgentMemory.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CreateAgentSkill.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteAgentMemory.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CreateAgentSkill.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteAgentMemory.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -33233,9 +33274,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -33251,26 +33292,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentSkill.Output.Conflict.Body + public var body: Operations.DeleteAgentMemory.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentSkill.Output.Conflict.Body) { + public init(body: Operations.DeleteAgentMemory.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CreateAgentSkill.Output.Conflict) + case conflict(Operations.DeleteAgentMemory.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CreateAgentSkill.Output.Conflict { + public var conflict: Operations.DeleteAgentMemory.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -33284,9 +33325,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -33302,26 +33343,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentSkill.Output.ContentTooLarge.Body + public var body: Operations.DeleteAgentMemory.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentSkill.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteAgentMemory.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CreateAgentSkill.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteAgentMemory.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CreateAgentSkill.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteAgentMemory.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -33335,9 +33376,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -33353,26 +33394,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentSkill.Output.InternalServerError.Body + public var body: Operations.DeleteAgentMemory.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentSkill.Output.InternalServerError.Body) { + public init(body: Operations.DeleteAgentMemory.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CreateAgentSkill.Output.InternalServerError) + case internalServerError(Operations.DeleteAgentMemory.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CreateAgentSkill.Output.InternalServerError { + public var internalServerError: Operations.DeleteAgentMemory.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -33386,9 +33427,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/memories/{memoryId}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -33404,26 +33445,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateAgentSkill.Output.ServiceUnavailable.Body + public var body: Operations.DeleteAgentMemory.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateAgentSkill.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteAgentMemory.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/memories/{memoryId}/delete(deleteAgentMemory)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CreateAgentSkill.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteAgentMemory.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CreateAgentSkill.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteAgentMemory.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -33473,129 +33514,114 @@ public enum Operations { } } } - /// Changes a skill's content, restores an archived skill by setting state to active, or pins it so the curator never marks it stale or archives it. - /// - /// - Remark: HTTP `PATCH /v1/agents/{id}/skills/{skillId}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)`. - public enum UpdateAgentSkill { - public static let id: Swift.String = "updateAgentSkill" + /// - Remark: HTTP `POST /v1/agents/{id}/messages`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)`. + public enum SendMessage { + public static let id: Swift.String = "sendMessage" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/path/skillId`. - public var skillId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - skillId: - public init( - id: Swift.String, - skillId: Swift.String - ) { + public init(id: Swift.String) { self.id = id - self.skillId = skillId } } - public var path: Operations.UpdateAgentSkill.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/header`. + public var path: Operations.SendMessage.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateAgentSkill.Input.Headers - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody`. + public var headers: Operations.SendMessage.Input.Headers + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/DocumentsPayload`. - public struct DocumentsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/DocumentsPayload/content`. - public var content: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/DocumentsPayload/path`. - public var path: Swift.String - /// Creates a new `DocumentsPayloadPayload`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/AttachmentsPayload`. + public struct AttachmentsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/AttachmentsPayload/data`. + public var data: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/AttachmentsPayload/mimeType`. + public var mimeType: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/AttachmentsPayload/name`. + public var name: Swift.String + /// Creates a new `AttachmentsPayloadPayload`. /// /// - Parameters: - /// - content: - /// - path: + /// - data: + /// - mimeType: + /// - name: public init( - content: Swift.String, - path: Swift.String + data: Swift.String, + mimeType: Swift.String, + name: Swift.String ) { - self.content = content - self.path = path + self.data = data + self.mimeType = mimeType + self.name = name } public enum CodingKeys: String, CodingKey { - case content - case path + case data + case mimeType + case name } } - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/documents`. - public typealias DocumentsPayload = [Operations.UpdateAgentSkill.Input.Body.JsonPayload.DocumentsPayloadPayload] - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/documents`. - public var documents: Operations.UpdateAgentSkill.Input.Body.JsonPayload.DocumentsPayload? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/instructions`. - public var instructions: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/pinned`. - public var pinned: Swift.Bool? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/state`. - @frozen public enum StatePayload: String, Codable, Hashable, Sendable, CaseIterable { - case active = "active" - case stale = "stale" - case archived = "archived" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/state`. - public var state: Operations.UpdateAgentSkill.Input.Body.JsonPayload.StatePayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/attachments`. + public typealias AttachmentsPayload = [Operations.SendMessage.Input.Body.JsonPayload.AttachmentsPayloadPayload] + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/attachments`. + public var attachments: Operations.SendMessage.Input.Body.JsonPayload.AttachmentsPayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/content`. + public var content: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/replyTo`. + public var replyTo: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/requestId`. + public var requestId: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/json/timezone`. + public var timezone: Swift.String? /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - description: - /// - documents: - /// - instructions: - /// - name: - /// - pinned: - /// - state: + /// - attachments: + /// - content: + /// - replyTo: + /// - requestId: + /// - timezone: public init( - description: Swift.String? = nil, - documents: Operations.UpdateAgentSkill.Input.Body.JsonPayload.DocumentsPayload? = nil, - instructions: Swift.String? = nil, - name: Swift.String? = nil, - pinned: Swift.Bool? = nil, - state: Operations.UpdateAgentSkill.Input.Body.JsonPayload.StatePayload? = nil + attachments: Operations.SendMessage.Input.Body.JsonPayload.AttachmentsPayload? = nil, + content: Swift.String, + replyTo: Swift.String? = nil, + requestId: Swift.String, + timezone: Swift.String? = nil ) { - self.description = description - self.documents = documents - self.instructions = instructions - self.name = name - self.pinned = pinned - self.state = state + self.attachments = attachments + self.content = content + self.replyTo = replyTo + self.requestId = requestId + self.timezone = timezone } public enum CodingKeys: String, CodingKey { - case description - case documents - case instructions - case name - case pinned - case state + case attachments + case content + case replyTo + case requestId + case timezone } } - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/content/application\/json`. - case json(Operations.UpdateAgentSkill.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/requestBody/content/application\/json`. + case json(Operations.SendMessage.Input.Body.JsonPayload) } - public var body: Operations.UpdateAgentSkill.Input.Body + public var body: Operations.SendMessage.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -33603,9 +33629,9 @@ public enum Operations { /// - headers: /// - body: public init( - path: Operations.UpdateAgentSkill.Input.Path, - headers: Operations.UpdateAgentSkill.Input.Headers = .init(), - body: Operations.UpdateAgentSkill.Input.Body + path: Operations.SendMessage.Input.Path, + headers: Operations.SendMessage.Input.Headers = .init(), + body: Operations.SendMessage.Input.Body ) { self.path = path self.headers = headers @@ -33613,134 +33639,16 @@ public enum Operations { } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content`. + public struct Accepted: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/202/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/agentId`. - public var agentId: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/copiedFromSkillId`. - public var copiedFromSkillId: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/createdAt`. - public var createdAt: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/createdBy`. - @frozen public enum CreatedByPayload: String, Codable, Hashable, Sendable, CaseIterable { - case owner = "owner" - case bot = "bot" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/createdBy`. - public var createdBy: Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload.CreatedByPayload - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/description`. - public var description: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/documents`. - public var documents: [Components.Schemas.SkillDocument] - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/id`. - public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/instructions`. - public var instructions: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/lastUsedAt`. - public var lastUsedAt: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/name`. - public var name: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/origin`. - public var origin: Components.Schemas.SkillOrigin? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/pinned`. - public var pinned: Swift.Bool - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/sourceExecutionId`. - public var sourceExecutionId: Swift.String? - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/state`. - @frozen public enum StatePayload: String, Codable, Hashable, Sendable, CaseIterable { - case active = "active" - case stale = "stale" - case archived = "archived" - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/state`. - public var state: Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload.StatePayload - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/updatedAt`. - public var updatedAt: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/useCount`. - public var useCount: Swift.Int - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - agentId: - /// - copiedFromSkillId: - /// - createdAt: - /// - createdBy: - /// - description: - /// - documents: - /// - id: - /// - instructions: - /// - lastUsedAt: - /// - name: - /// - origin: - /// - pinned: - /// - sourceExecutionId: - /// - state: - /// - updatedAt: - /// - useCount: - public init( - agentId: Swift.String? = nil, - copiedFromSkillId: Swift.String? = nil, - createdAt: Swift.String, - createdBy: Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload.CreatedByPayload, - description: Swift.String, - documents: [Components.Schemas.SkillDocument], - id: Swift.String, - instructions: Swift.String, - lastUsedAt: Swift.String? = nil, - name: Swift.String, - origin: Components.Schemas.SkillOrigin? = nil, - pinned: Swift.Bool, - sourceExecutionId: Swift.String? = nil, - state: Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload.StatePayload, - updatedAt: Swift.String, - useCount: Swift.Int - ) { - self.agentId = agentId - self.copiedFromSkillId = copiedFromSkillId - self.createdAt = createdAt - self.createdBy = createdBy - self.description = description - self.documents = documents - self.id = id - self.instructions = instructions - self.lastUsedAt = lastUsedAt - self.name = name - self.origin = origin - self.pinned = pinned - self.sourceExecutionId = sourceExecutionId - self.state = state - self.updatedAt = updatedAt - self.useCount = useCount - } - public enum CodingKeys: String, CodingKey { - case agentId - case copiedFromSkillId - case createdAt - case createdBy - case description - case documents - case id - case instructions - case lastUsedAt - case name - case origin - case pinned - case sourceExecutionId - case state - case updatedAt - case useCount - } - } - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/application\/json`. - case json(Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload?) + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/202/content/application\/json`. + case json(Components.Schemas.Execution) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload? { + public var json: Components.Schemas.Execution { get throws { switch self { case let .json(body): @@ -33750,42 +33658,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentSkill.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.SendMessage.Output.Accepted.Body + /// Creates a new `Accepted`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentSkill.Output.Ok.Body) { + public init(body: Operations.SendMessage.Output.Accepted.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/202`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.UpdateAgentSkill.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `202 accepted`. + case accepted(Operations.SendMessage.Output.Accepted) + /// The associated value of the enum case if `self` is `.accepted`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateAgentSkill.Output.Ok { + /// - Throws: An error if `self` is not `.accepted`. + /// - SeeAlso: `.accepted`. + public var accepted: Operations.SendMessage.Output.Accepted { get throws { switch self { - case let .ok(response): + case let .accepted(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "accepted", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -33801,26 +33709,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentSkill.Output.BadRequest.Body + public var body: Operations.SendMessage.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentSkill.Output.BadRequest.Body) { + public init(body: Operations.SendMessage.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateAgentSkill.Output.BadRequest) + case badRequest(Operations.SendMessage.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateAgentSkill.Output.BadRequest { + public var badRequest: Operations.SendMessage.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -33834,9 +33742,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -33852,26 +33760,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentSkill.Output.Unauthorized.Body + public var body: Operations.SendMessage.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentSkill.Output.Unauthorized.Body) { + public init(body: Operations.SendMessage.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateAgentSkill.Output.Unauthorized) + case unauthorized(Operations.SendMessage.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateAgentSkill.Output.Unauthorized { + public var unauthorized: Operations.SendMessage.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -33885,9 +33793,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -33903,26 +33811,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentSkill.Output.NotFound.Body + public var body: Operations.SendMessage.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentSkill.Output.NotFound.Body) { + public init(body: Operations.SendMessage.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateAgentSkill.Output.NotFound) + case notFound(Operations.SendMessage.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateAgentSkill.Output.NotFound { + public var notFound: Operations.SendMessage.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -33936,9 +33844,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -33954,26 +33862,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentSkill.Output.MethodNotAllowed.Body + public var body: Operations.SendMessage.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentSkill.Output.MethodNotAllowed.Body) { + public init(body: Operations.SendMessage.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateAgentSkill.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SendMessage.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateAgentSkill.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SendMessage.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -33987,9 +33895,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34005,26 +33913,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentSkill.Output.Conflict.Body + public var body: Operations.SendMessage.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentSkill.Output.Conflict.Body) { + public init(body: Operations.SendMessage.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateAgentSkill.Output.Conflict) + case conflict(Operations.SendMessage.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateAgentSkill.Output.Conflict { + public var conflict: Operations.SendMessage.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -34038,9 +33946,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -34056,26 +33964,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentSkill.Output.ContentTooLarge.Body + public var body: Operations.SendMessage.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentSkill.Output.ContentTooLarge.Body) { + public init(body: Operations.SendMessage.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateAgentSkill.Output.ContentTooLarge) + case contentTooLarge(Operations.SendMessage.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateAgentSkill.Output.ContentTooLarge { + public var contentTooLarge: Operations.SendMessage.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -34089,9 +33997,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34107,26 +34015,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentSkill.Output.InternalServerError.Body + public var body: Operations.SendMessage.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentSkill.Output.InternalServerError.Body) { + public init(body: Operations.SendMessage.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateAgentSkill.Output.InternalServerError) + case internalServerError(Operations.SendMessage.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateAgentSkill.Output.InternalServerError { + public var internalServerError: Operations.SendMessage.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -34140,9 +34048,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/messages/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34158,26 +34066,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateAgentSkill.Output.ServiceUnavailable.Body + public var body: Operations.SendMessage.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateAgentSkill.Output.ServiceUnavailable.Body) { + public init(body: Operations.SendMessage.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/messages/post(sendMessage)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateAgentSkill.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SendMessage.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateAgentSkill.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SendMessage.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -34227,96 +34135,123 @@ public enum Operations { } } } - /// - Remark: HTTP `DELETE /v1/agents/{id}/skills/{skillId}`. - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)`. - public enum DeleteAgentSkill { - public static let id: Swift.String = "deleteAgentSkill" + /// What the bot's reviews changed, newest first, one entry per reviewed execution with its changes. Clients show these as notices in the bot chat, also after reconnecting. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/reviews`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)`. + public enum ListAgentReviews { + public static let id: Swift.String = "listAgentReviews" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/path/id`. public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/path/skillId`. - public var skillId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - /// - skillId: - public init( - id: Swift.String, - skillId: Swift.String - ) { + public init(id: Swift.String) { self.id = id - self.skillId = skillId } } - public var path: Operations.DeleteAgentSkill.Input.Path - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/header`. + public var path: Operations.ListAgentReviews.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/query/limit`. + public var limit: Swift.Int? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + public init(limit: Swift.Int? = nil) { + self.limit = limit + } + } + public var query: Operations.ListAgentReviews.Input.Query + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteAgentSkill.Input.Headers + public var headers: Operations.ListAgentReviews.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.DeleteAgentSkill.Input.Path, - headers: Operations.DeleteAgentSkill.Input.Headers = .init() + path: Operations.ListAgentReviews.Input.Path, + query: Operations.ListAgentReviews.Input.Query = .init(), + headers: Operations.ListAgentReviews.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/200/content/application\/json`. + case json([Components.Schemas.ReviewResult]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.ReviewResult] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListAgentReviews.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListAgentReviews.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/204`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/200`. /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteAgentSkill.Output.NoContent) - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.ListAgentReviews.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteAgentSkill.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ListAgentReviews.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34332,26 +34267,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentSkill.Output.BadRequest.Body + public var body: Operations.ListAgentReviews.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentSkill.Output.BadRequest.Body) { + public init(body: Operations.ListAgentReviews.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteAgentSkill.Output.BadRequest) + case badRequest(Operations.ListAgentReviews.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteAgentSkill.Output.BadRequest { + public var badRequest: Operations.ListAgentReviews.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -34365,9 +34300,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -34383,26 +34318,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentSkill.Output.Unauthorized.Body + public var body: Operations.ListAgentReviews.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentSkill.Output.Unauthorized.Body) { + public init(body: Operations.ListAgentReviews.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteAgentSkill.Output.Unauthorized) + case unauthorized(Operations.ListAgentReviews.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteAgentSkill.Output.Unauthorized { + public var unauthorized: Operations.ListAgentReviews.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -34416,9 +34351,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34434,26 +34369,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentSkill.Output.NotFound.Body + public var body: Operations.ListAgentReviews.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentSkill.Output.NotFound.Body) { + public init(body: Operations.ListAgentReviews.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteAgentSkill.Output.NotFound) + case notFound(Operations.ListAgentReviews.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteAgentSkill.Output.NotFound { + public var notFound: Operations.ListAgentReviews.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -34467,9 +34402,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34485,26 +34420,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentSkill.Output.MethodNotAllowed.Body + public var body: Operations.ListAgentReviews.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentSkill.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListAgentReviews.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteAgentSkill.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListAgentReviews.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteAgentSkill.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListAgentReviews.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -34518,9 +34453,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34536,26 +34471,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentSkill.Output.Conflict.Body + public var body: Operations.ListAgentReviews.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentSkill.Output.Conflict.Body) { + public init(body: Operations.ListAgentReviews.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteAgentSkill.Output.Conflict) + case conflict(Operations.ListAgentReviews.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteAgentSkill.Output.Conflict { + public var conflict: Operations.ListAgentReviews.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -34569,9 +34504,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -34587,26 +34522,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentSkill.Output.ContentTooLarge.Body + public var body: Operations.ListAgentReviews.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentSkill.Output.ContentTooLarge.Body) { + public init(body: Operations.ListAgentReviews.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteAgentSkill.Output.ContentTooLarge) + case contentTooLarge(Operations.ListAgentReviews.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteAgentSkill.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListAgentReviews.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -34620,9 +34555,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34638,26 +34573,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentSkill.Output.InternalServerError.Body + public var body: Operations.ListAgentReviews.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentSkill.Output.InternalServerError.Body) { + public init(body: Operations.ListAgentReviews.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteAgentSkill.Output.InternalServerError) + case internalServerError(Operations.ListAgentReviews.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteAgentSkill.Output.InternalServerError { + public var internalServerError: Operations.ListAgentReviews.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -34671,9 +34606,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/reviews/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34689,26 +34624,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteAgentSkill.Output.ServiceUnavailable.Body + public var body: Operations.ListAgentReviews.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteAgentSkill.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListAgentReviews.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/reviews/get(listAgentReviews)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteAgentSkill.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListAgentReviews.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteAgentSkill.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListAgentReviews.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -34758,42 +34693,62 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/capabilities`. - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)`. - public enum GetCapabilities { - public static let id: Swift.String = "getCapabilities" + /// The bot's own skill packages, including stale and archived ones. The agent's inline `skills` field lists the same skills by name and instructions. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/skills`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)`. + public enum ListAgentSkills { + public static let id: Swift.String = "listAgentSkills" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/header`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.ListAgentSkills.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetCapabilities.Input.Headers + public var headers: Operations.ListAgentSkills.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - public init(headers: Operations.GetCapabilities.Input.Headers = .init()) { + public init( + path: Operations.ListAgentSkills.Input.Path, + headers: Operations.ListAgentSkills.Input.Headers = .init() + ) { + self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/200/content/application\/json`. - case json(Components.Schemas.Capabilities) + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/200/content/application\/json`. + case json([Components.Schemas.SkillPackage]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.Capabilities { + public var json: [Components.Schemas.SkillPackage] { get throws { switch self { case let .json(body): @@ -34803,26 +34758,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCapabilities.Output.Ok.Body + public var body: Operations.ListAgentSkills.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCapabilities.Output.Ok.Body) { + public init(body: Operations.ListAgentSkills.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.GetCapabilities.Output.Ok) + case ok(Operations.ListAgentSkills.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.GetCapabilities.Output.Ok { + public var ok: Operations.ListAgentSkills.Output.Ok { get throws { switch self { case let .ok(response): @@ -34836,9 +34791,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34854,26 +34809,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCapabilities.Output.BadRequest.Body + public var body: Operations.ListAgentSkills.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCapabilities.Output.BadRequest.Body) { + public init(body: Operations.ListAgentSkills.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetCapabilities.Output.BadRequest) + case badRequest(Operations.ListAgentSkills.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetCapabilities.Output.BadRequest { + public var badRequest: Operations.ListAgentSkills.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -34887,9 +34842,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -34905,26 +34860,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCapabilities.Output.Unauthorized.Body + public var body: Operations.ListAgentSkills.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCapabilities.Output.Unauthorized.Body) { + public init(body: Operations.ListAgentSkills.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetCapabilities.Output.Unauthorized) + case unauthorized(Operations.ListAgentSkills.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetCapabilities.Output.Unauthorized { + public var unauthorized: Operations.ListAgentSkills.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -34938,9 +34893,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -34956,26 +34911,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCapabilities.Output.NotFound.Body + public var body: Operations.ListAgentSkills.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCapabilities.Output.NotFound.Body) { + public init(body: Operations.ListAgentSkills.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetCapabilities.Output.NotFound) + case notFound(Operations.ListAgentSkills.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetCapabilities.Output.NotFound { + public var notFound: Operations.ListAgentSkills.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -34989,9 +34944,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -35007,26 +34962,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCapabilities.Output.MethodNotAllowed.Body + public var body: Operations.ListAgentSkills.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCapabilities.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListAgentSkills.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetCapabilities.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListAgentSkills.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetCapabilities.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListAgentSkills.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -35040,9 +34995,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -35058,26 +35013,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCapabilities.Output.Conflict.Body + public var body: Operations.ListAgentSkills.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCapabilities.Output.Conflict.Body) { + public init(body: Operations.ListAgentSkills.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetCapabilities.Output.Conflict) + case conflict(Operations.ListAgentSkills.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetCapabilities.Output.Conflict { + public var conflict: Operations.ListAgentSkills.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -35091,9 +35046,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -35109,26 +35064,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCapabilities.Output.ContentTooLarge.Body + public var body: Operations.ListAgentSkills.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCapabilities.Output.ContentTooLarge.Body) { + public init(body: Operations.ListAgentSkills.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetCapabilities.Output.ContentTooLarge) + case contentTooLarge(Operations.ListAgentSkills.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetCapabilities.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListAgentSkills.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -35142,9 +35097,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -35160,26 +35115,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCapabilities.Output.InternalServerError.Body + public var body: Operations.ListAgentSkills.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCapabilities.Output.InternalServerError.Body) { + public init(body: Operations.ListAgentSkills.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetCapabilities.Output.InternalServerError) + case internalServerError(Operations.ListAgentSkills.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetCapabilities.Output.InternalServerError { + public var internalServerError: Operations.ListAgentSkills.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -35193,9 +35148,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -35211,26 +35166,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetCapabilities.Output.ServiceUnavailable.Body + public var body: Operations.ListAgentSkills.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetCapabilities.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListAgentSkills.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/get(listAgentSkills)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetCapabilities.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListAgentSkills.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetCapabilities.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListAgentSkills.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -35280,125 +35235,129 @@ public enum Operations { } } } - /// Skill and memory changes by owners, bots, and reviews, newest first, with the state before and after each. Page with `before` set to the last change's ID. - /// - /// - Remark: HTTP `GET /v1/changes`. - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)`. - public enum ListChanges { - public static let id: Swift.String = "listChanges" + /// - Remark: HTTP `POST /v1/agents/{id}/skills`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)`. + public enum CreateAgentSkill { + public static let id: Swift.String = "createAgentSkill" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/query/limit`. - public var limit: Swift.Int? - /// - Remark: Generated from `#/paths/v1/changes/GET/query/before`. - public var before: Swift.String? - /// - Remark: Generated from `#/paths/v1/changes/GET/query/agentId`. - public struct AgentIdPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/changes/GET/query/agentId/value1`. - public var value1: Swift.String? - /// - Remark: Generated from `#/paths/v1/changes/GET/query/agentId/value2`. - @frozen public enum Value2Payload: String, Codable, Hashable, Sendable, CaseIterable { - case shared = "shared" - } - /// - Remark: Generated from `#/paths/v1/changes/GET/query/agentId/value2`. - public var value2: Operations.ListChanges.Input.Query.AgentIdPayload.Value2Payload? - /// Creates a new `AgentIdPayload`. - /// - /// - Parameters: - /// - value1: - /// - value2: - public init( - value1: Swift.String? = nil, - value2: Operations.ListChanges.Input.Query.AgentIdPayload.Value2Payload? = nil - ) { - self.value1 = value1 - self.value2 = value2 - } - public init(from decoder: any Swift.Decoder) throws { - var errors: [any Swift.Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Swift.Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) - } - } - /// - Remark: Generated from `#/paths/v1/changes/GET/query/agentId`. - public var agentId: Operations.ListChanges.Input.Query.AgentIdPayload? - /// Creates a new `Query`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/path/id`. + public var id: Swift.String + /// Creates a new `Path`. /// /// - Parameters: - /// - limit: - /// - before: - /// - agentId: - public init( - limit: Swift.Int? = nil, - before: Swift.String? = nil, - agentId: Operations.ListChanges.Input.Query.AgentIdPayload? = nil - ) { - self.limit = limit - self.before = before - self.agentId = agentId + /// - id: + public init(id: Swift.String) { + self.id = id } } - public var query: Operations.ListChanges.Input.Query - /// - Remark: Generated from `#/paths/v1/changes/GET/header`. + public var path: Operations.CreateAgentSkill.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListChanges.Input.Headers + public var headers: Operations.CreateAgentSkill.Input.Headers + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/DocumentsPayload`. + public struct DocumentsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/DocumentsPayload/content`. + public var content: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/DocumentsPayload/path`. + public var path: Swift.String + /// Creates a new `DocumentsPayloadPayload`. + /// + /// - Parameters: + /// - content: + /// - path: + public init( + content: Swift.String, + path: Swift.String + ) { + self.content = content + self.path = path + } + public enum CodingKeys: String, CodingKey { + case content + case path + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/documents`. + public typealias DocumentsPayload = [Operations.CreateAgentSkill.Input.Body.JsonPayload.DocumentsPayloadPayload] + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/documents`. + public var documents: Operations.CreateAgentSkill.Input.Body.JsonPayload.DocumentsPayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/instructions`. + public var instructions: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/json/name`. + public var name: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - description: + /// - documents: + /// - instructions: + /// - name: + public init( + description: Swift.String? = nil, + documents: Operations.CreateAgentSkill.Input.Body.JsonPayload.DocumentsPayload? = nil, + instructions: Swift.String, + name: Swift.String + ) { + self.description = description + self.documents = documents + self.instructions = instructions + self.name = name + } + public enum CodingKeys: String, CodingKey { + case description + case documents + case instructions + case name + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/requestBody/content/application\/json`. + case json(Operations.CreateAgentSkill.Input.Body.JsonPayload) + } + public var body: Operations.CreateAgentSkill.Input.Body /// Creates a new `Input`. /// /// - Parameters: - /// - query: + /// - path: /// - headers: + /// - body: public init( - query: Operations.ListChanges.Input.Query = .init(), - headers: Operations.ListChanges.Input.Headers = .init() + path: Operations.CreateAgentSkill.Input.Path, + headers: Operations.CreateAgentSkill.Input.Headers = .init(), + body: Operations.CreateAgentSkill.Input.Body ) { - self.query = query + self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/200/content`. + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/200/content/application\/json`. - case json([Components.Schemas.LearnedChange]) + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/201/content/application\/json`. + case json(Components.Schemas.SkillPackage) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.LearnedChange] { + public var json: Components.Schemas.SkillPackage { get throws { switch self { case let .json(body): @@ -35408,42 +35367,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListChanges.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.CreateAgentSkill.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListChanges.Output.Ok.Body) { + public init(body: Operations.CreateAgentSkill.Output.Created.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/201`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.ListChanges.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `201 created`. + case created(Operations.CreateAgentSkill.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.ListChanges.Output.Ok { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.CreateAgentSkill.Output.Created { get throws { switch self { - case let .ok(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "created", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -35459,26 +35418,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListChanges.Output.BadRequest.Body + public var body: Operations.CreateAgentSkill.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListChanges.Output.BadRequest.Body) { + public init(body: Operations.CreateAgentSkill.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListChanges.Output.BadRequest) + case badRequest(Operations.CreateAgentSkill.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListChanges.Output.BadRequest { + public var badRequest: Operations.CreateAgentSkill.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -35492,9 +35451,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -35510,26 +35469,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListChanges.Output.Unauthorized.Body + public var body: Operations.CreateAgentSkill.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListChanges.Output.Unauthorized.Body) { + public init(body: Operations.CreateAgentSkill.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListChanges.Output.Unauthorized) + case unauthorized(Operations.CreateAgentSkill.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListChanges.Output.Unauthorized { + public var unauthorized: Operations.CreateAgentSkill.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -35543,9 +35502,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -35561,26 +35520,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListChanges.Output.NotFound.Body + public var body: Operations.CreateAgentSkill.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListChanges.Output.NotFound.Body) { + public init(body: Operations.CreateAgentSkill.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListChanges.Output.NotFound) + case notFound(Operations.CreateAgentSkill.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListChanges.Output.NotFound { + public var notFound: Operations.CreateAgentSkill.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -35594,9 +35553,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -35612,26 +35571,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListChanges.Output.MethodNotAllowed.Body + public var body: Operations.CreateAgentSkill.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListChanges.Output.MethodNotAllowed.Body) { + public init(body: Operations.CreateAgentSkill.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListChanges.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CreateAgentSkill.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListChanges.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CreateAgentSkill.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -35645,9 +35604,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -35663,26 +35622,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListChanges.Output.Conflict.Body + public var body: Operations.CreateAgentSkill.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListChanges.Output.Conflict.Body) { + public init(body: Operations.CreateAgentSkill.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListChanges.Output.Conflict) + case conflict(Operations.CreateAgentSkill.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListChanges.Output.Conflict { + public var conflict: Operations.CreateAgentSkill.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -35696,9 +35655,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -35714,26 +35673,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListChanges.Output.ContentTooLarge.Body + public var body: Operations.CreateAgentSkill.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListChanges.Output.ContentTooLarge.Body) { + public init(body: Operations.CreateAgentSkill.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListChanges.Output.ContentTooLarge) + case contentTooLarge(Operations.CreateAgentSkill.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListChanges.Output.ContentTooLarge { + public var contentTooLarge: Operations.CreateAgentSkill.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -35747,9 +35706,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -35765,26 +35724,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListChanges.Output.InternalServerError.Body + public var body: Operations.CreateAgentSkill.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListChanges.Output.InternalServerError.Body) { + public init(body: Operations.CreateAgentSkill.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListChanges.Output.InternalServerError) + case internalServerError(Operations.CreateAgentSkill.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListChanges.Output.InternalServerError { + public var internalServerError: Operations.CreateAgentSkill.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -35798,9 +35757,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -35816,26 +35775,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListChanges.Output.ServiceUnavailable.Body + public var body: Operations.CreateAgentSkill.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListChanges.Output.ServiceUnavailable.Body) { + public init(body: Operations.CreateAgentSkill.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/post(createAgentSkill)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListChanges.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CreateAgentSkill.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListChanges.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CreateAgentSkill.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -35885,107 +35844,319 @@ public enum Operations { } } } - /// Restores the state before the change, whatever happened since, and records the revert as a change of its own. + /// Changes a skill's content, restores an archived skill by setting state to active, or pins it so the curator never marks it stale or archives it. /// - /// - Remark: HTTP `POST /v1/changes/{id}/revert`. - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)`. - public enum RevertChange { - public static let id: Swift.String = "revertChange" + /// - Remark: HTTP `PATCH /v1/agents/{id}/skills/{skillId}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)`. + public enum UpdateAgentSkill { + public static let id: Swift.String = "updateAgentSkill" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/path`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/path/skillId`. + public var skillId: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - skillId: + public init( + id: Swift.String, + skillId: Swift.String + ) { self.id = id + self.skillId = skillId } } - public var path: Operations.RevertChange.Input.Path - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/header`. + public var path: Operations.UpdateAgentSkill.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.RevertChange.Input.Headers + public var headers: Operations.UpdateAgentSkill.Input.Headers + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/DocumentsPayload`. + public struct DocumentsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/DocumentsPayload/content`. + public var content: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/DocumentsPayload/path`. + public var path: Swift.String + /// Creates a new `DocumentsPayloadPayload`. + /// + /// - Parameters: + /// - content: + /// - path: + public init( + content: Swift.String, + path: Swift.String + ) { + self.content = content + self.path = path + } + public enum CodingKeys: String, CodingKey { + case content + case path + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/documents`. + public typealias DocumentsPayload = [Operations.UpdateAgentSkill.Input.Body.JsonPayload.DocumentsPayloadPayload] + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/documents`. + public var documents: Operations.UpdateAgentSkill.Input.Body.JsonPayload.DocumentsPayload? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/instructions`. + public var instructions: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/pinned`. + public var pinned: Swift.Bool? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/state`. + @frozen public enum StatePayload: String, Codable, Hashable, Sendable, CaseIterable { + case active = "active" + case stale = "stale" + case archived = "archived" + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/json/state`. + public var state: Operations.UpdateAgentSkill.Input.Body.JsonPayload.StatePayload? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - description: + /// - documents: + /// - instructions: + /// - name: + /// - pinned: + /// - state: + public init( + description: Swift.String? = nil, + documents: Operations.UpdateAgentSkill.Input.Body.JsonPayload.DocumentsPayload? = nil, + instructions: Swift.String? = nil, + name: Swift.String? = nil, + pinned: Swift.Bool? = nil, + state: Operations.UpdateAgentSkill.Input.Body.JsonPayload.StatePayload? = nil + ) { + self.description = description + self.documents = documents + self.instructions = instructions + self.name = name + self.pinned = pinned + self.state = state + } + public enum CodingKeys: String, CodingKey { + case description + case documents + case instructions + case name + case pinned + case state + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/requestBody/content/application\/json`. + case json(Operations.UpdateAgentSkill.Input.Body.JsonPayload) + } + public var body: Operations.UpdateAgentSkill.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.RevertChange.Input.Path, - headers: Operations.RevertChange.Input.Headers = .init() + path: Operations.UpdateAgentSkill.Input.Path, + headers: Operations.UpdateAgentSkill.Input.Headers = .init(), + body: Operations.UpdateAgentSkill.Input.Body ) { self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/201/content/application\/json`. - case json(Components.Schemas.LearnedChange) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.LearnedChange { - get throws { - switch self { - case let .json(body): - return body - } + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/agentId`. + public var agentId: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/copiedFromSkillId`. + public var copiedFromSkillId: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/createdAt`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/createdBy`. + @frozen public enum CreatedByPayload: String, Codable, Hashable, Sendable, CaseIterable { + case owner = "owner" + case bot = "bot" } - } - } - /// Received HTTP response body - public var body: Operations.RevertChange.Output.Created.Body - /// Creates a new `Created`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.RevertChange.Output.Created.Body) { - self.body = body - } - } - /// Success - /// - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/201`. - /// - /// HTTP response code: `201 created`. - case created(Operations.RevertChange.Output.Created) - /// The associated value of the enum case if `self` is `.created`. - /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.RevertChange.Output.Created { - get throws { - switch self { - case let .created(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "created", - response: self - ) - } - } - } - public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/400/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/createdBy`. + public var createdBy: Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload.CreatedByPayload + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/description`. + public var description: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/documents`. + public var documents: [Components.Schemas.SkillDocument] + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/id`. + public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/instructions`. + public var instructions: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/lastUsedAt`. + public var lastUsedAt: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/name`. + public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/origin`. + public var origin: Components.Schemas.SkillOrigin? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/pinned`. + public var pinned: Swift.Bool + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/sourceExecutionId`. + public var sourceExecutionId: Swift.String? + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/state`. + @frozen public enum StatePayload: String, Codable, Hashable, Sendable, CaseIterable { + case active = "active" + case stale = "stale" + case archived = "archived" + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/state`. + public var state: Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload.StatePayload + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/updatedAt`. + public var updatedAt: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/json/useCount`. + public var useCount: Swift.Int + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - agentId: + /// - copiedFromSkillId: + /// - createdAt: + /// - createdBy: + /// - description: + /// - documents: + /// - id: + /// - instructions: + /// - lastUsedAt: + /// - name: + /// - origin: + /// - pinned: + /// - sourceExecutionId: + /// - state: + /// - updatedAt: + /// - useCount: + public init( + agentId: Swift.String? = nil, + copiedFromSkillId: Swift.String? = nil, + createdAt: Swift.String, + createdBy: Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload.CreatedByPayload, + description: Swift.String, + documents: [Components.Schemas.SkillDocument], + id: Swift.String, + instructions: Swift.String, + lastUsedAt: Swift.String? = nil, + name: Swift.String, + origin: Components.Schemas.SkillOrigin? = nil, + pinned: Swift.Bool, + sourceExecutionId: Swift.String? = nil, + state: Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload.StatePayload, + updatedAt: Swift.String, + useCount: Swift.Int + ) { + self.agentId = agentId + self.copiedFromSkillId = copiedFromSkillId + self.createdAt = createdAt + self.createdBy = createdBy + self.description = description + self.documents = documents + self.id = id + self.instructions = instructions + self.lastUsedAt = lastUsedAt + self.name = name + self.origin = origin + self.pinned = pinned + self.sourceExecutionId = sourceExecutionId + self.state = state + self.updatedAt = updatedAt + self.useCount = useCount + } + public enum CodingKeys: String, CodingKey { + case agentId + case copiedFromSkillId + case createdAt + case createdBy + case description + case documents + case id + case instructions + case lastUsedAt + case name + case origin + case pinned + case sourceExecutionId + case state + case updatedAt + case useCount + } + } + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/200/content/application\/json`. + case json(Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload?) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.UpdateAgentSkill.Output.Ok.Body.JsonPayload? { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateAgentSkill.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateAgentSkill.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.UpdateAgentSkill.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.UpdateAgentSkill.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36001,26 +36172,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RevertChange.Output.BadRequest.Body + public var body: Operations.UpdateAgentSkill.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RevertChange.Output.BadRequest.Body) { + public init(body: Operations.UpdateAgentSkill.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.RevertChange.Output.BadRequest) + case badRequest(Operations.UpdateAgentSkill.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.RevertChange.Output.BadRequest { + public var badRequest: Operations.UpdateAgentSkill.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -36034,9 +36205,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -36052,26 +36223,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RevertChange.Output.Unauthorized.Body + public var body: Operations.UpdateAgentSkill.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RevertChange.Output.Unauthorized.Body) { + public init(body: Operations.UpdateAgentSkill.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.RevertChange.Output.Unauthorized) + case unauthorized(Operations.UpdateAgentSkill.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.RevertChange.Output.Unauthorized { + public var unauthorized: Operations.UpdateAgentSkill.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -36085,9 +36256,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36103,26 +36274,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RevertChange.Output.NotFound.Body + public var body: Operations.UpdateAgentSkill.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RevertChange.Output.NotFound.Body) { + public init(body: Operations.UpdateAgentSkill.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.RevertChange.Output.NotFound) + case notFound(Operations.UpdateAgentSkill.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.RevertChange.Output.NotFound { + public var notFound: Operations.UpdateAgentSkill.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -36136,9 +36307,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36154,26 +36325,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RevertChange.Output.MethodNotAllowed.Body + public var body: Operations.UpdateAgentSkill.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RevertChange.Output.MethodNotAllowed.Body) { + public init(body: Operations.UpdateAgentSkill.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.RevertChange.Output.MethodNotAllowed) + case methodNotAllowed(Operations.UpdateAgentSkill.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.RevertChange.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.UpdateAgentSkill.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -36187,9 +36358,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36205,26 +36376,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RevertChange.Output.Conflict.Body + public var body: Operations.UpdateAgentSkill.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RevertChange.Output.Conflict.Body) { + public init(body: Operations.UpdateAgentSkill.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.RevertChange.Output.Conflict) + case conflict(Operations.UpdateAgentSkill.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.RevertChange.Output.Conflict { + public var conflict: Operations.UpdateAgentSkill.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -36238,9 +36409,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -36256,26 +36427,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RevertChange.Output.ContentTooLarge.Body + public var body: Operations.UpdateAgentSkill.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RevertChange.Output.ContentTooLarge.Body) { + public init(body: Operations.UpdateAgentSkill.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.RevertChange.Output.ContentTooLarge) + case contentTooLarge(Operations.UpdateAgentSkill.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.RevertChange.Output.ContentTooLarge { + public var contentTooLarge: Operations.UpdateAgentSkill.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -36289,9 +36460,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36307,26 +36478,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RevertChange.Output.InternalServerError.Body + public var body: Operations.UpdateAgentSkill.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RevertChange.Output.InternalServerError.Body) { + public init(body: Operations.UpdateAgentSkill.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.RevertChange.Output.InternalServerError) + case internalServerError(Operations.UpdateAgentSkill.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.RevertChange.Output.InternalServerError { + public var internalServerError: Operations.UpdateAgentSkill.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -36340,9 +36511,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/PATCH/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36358,26 +36529,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RevertChange.Output.ServiceUnavailable.Body + public var body: Operations.UpdateAgentSkill.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RevertChange.Output.ServiceUnavailable.Body) { + public init(body: Operations.UpdateAgentSkill.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/patch(updateAgentSkill)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.RevertChange.Output.ServiceUnavailable) + case serviceUnavailable(Operations.UpdateAgentSkill.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.RevertChange.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.UpdateAgentSkill.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -36427,131 +36598,96 @@ public enum Operations { } } } - /// The account's event relay: its URL, whether the Doorstep account token is set (plugin setting `doorstep:token`), and the connection status. - /// - /// - Remark: HTTP `GET /v1/event-relay`. - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)`. - public enum GetEventRelay { - public static let id: Swift.String = "getEventRelay" + /// - Remark: HTTP `DELETE /v1/agents/{id}/skills/{skillId}`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)`. + public enum DeleteAgentSkill { + public static let id: Swift.String = "deleteAgentSkill" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/header`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/path/id`. + public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/path/skillId`. + public var skillId: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + /// - skillId: + public init( + id: Swift.String, + skillId: Swift.String + ) { + self.id = id + self.skillId = skillId + } + } + public var path: Operations.DeleteAgentSkill.Input.Path + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetEventRelay.Input.Headers + public var headers: Operations.DeleteAgentSkill.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - public init(headers: Operations.GetEventRelay.Input.Headers = .init()) { + public init( + path: Operations.DeleteAgentSkill.Input.Path, + headers: Operations.DeleteAgentSkill.Input.Headers = .init() + ) { + self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json/error`. - public var error: Swift.String? - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json/status`. - @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { - case disconnected = "disconnected" - case connecting = "connecting" - case connected = "connected" - case error = "error" - } - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json/status`. - public var status: Operations.GetEventRelay.Output.Ok.Body.JsonPayload.StatusPayload - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json/tokenConfigured`. - public var tokenConfigured: Swift.Bool - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json/url`. - public var url: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - error: - /// - status: - /// - tokenConfigured: - /// - url: - public init( - error: Swift.String? = nil, - status: Operations.GetEventRelay.Output.Ok.Body.JsonPayload.StatusPayload, - tokenConfigured: Swift.Bool, - url: Swift.String? = nil - ) { - self.error = error - self.status = status - self.tokenConfigured = tokenConfigured - self.url = url - } - public enum CodingKeys: String, CodingKey { - case error - case status - case tokenConfigured - case url - } - } - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/application\/json`. - case json(Operations.GetEventRelay.Output.Ok.Body.JsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.GetEventRelay.Output.Ok.Body.JsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.GetEventRelay.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.GetEventRelay.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/200`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.GetEventRelay.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteAgentSkill.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.GetEventRelay.Output.Ok { + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteAgentSkill.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36567,26 +36703,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetEventRelay.Output.BadRequest.Body + public var body: Operations.DeleteAgentSkill.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetEventRelay.Output.BadRequest.Body) { + public init(body: Operations.DeleteAgentSkill.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/400`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetEventRelay.Output.BadRequest) + case badRequest(Operations.DeleteAgentSkill.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetEventRelay.Output.BadRequest { + public var badRequest: Operations.DeleteAgentSkill.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -36600,9 +36736,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -36618,26 +36754,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetEventRelay.Output.Unauthorized.Body + public var body: Operations.DeleteAgentSkill.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetEventRelay.Output.Unauthorized.Body) { + public init(body: Operations.DeleteAgentSkill.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/401`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetEventRelay.Output.Unauthorized) + case unauthorized(Operations.DeleteAgentSkill.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetEventRelay.Output.Unauthorized { + public var unauthorized: Operations.DeleteAgentSkill.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -36651,9 +36787,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36669,26 +36805,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetEventRelay.Output.NotFound.Body + public var body: Operations.DeleteAgentSkill.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetEventRelay.Output.NotFound.Body) { + public init(body: Operations.DeleteAgentSkill.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/404`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetEventRelay.Output.NotFound) + case notFound(Operations.DeleteAgentSkill.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetEventRelay.Output.NotFound { + public var notFound: Operations.DeleteAgentSkill.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -36702,9 +36838,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36720,26 +36856,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetEventRelay.Output.MethodNotAllowed.Body + public var body: Operations.DeleteAgentSkill.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetEventRelay.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteAgentSkill.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/405`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetEventRelay.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteAgentSkill.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetEventRelay.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteAgentSkill.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -36753,9 +36889,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36771,26 +36907,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetEventRelay.Output.Conflict.Body + public var body: Operations.DeleteAgentSkill.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetEventRelay.Output.Conflict.Body) { + public init(body: Operations.DeleteAgentSkill.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/409`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetEventRelay.Output.Conflict) + case conflict(Operations.DeleteAgentSkill.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetEventRelay.Output.Conflict { + public var conflict: Operations.DeleteAgentSkill.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -36804,9 +36940,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -36822,26 +36958,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetEventRelay.Output.ContentTooLarge.Body + public var body: Operations.DeleteAgentSkill.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetEventRelay.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteAgentSkill.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/413`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetEventRelay.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteAgentSkill.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetEventRelay.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteAgentSkill.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -36855,9 +36991,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36873,26 +37009,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetEventRelay.Output.InternalServerError.Body + public var body: Operations.DeleteAgentSkill.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetEventRelay.Output.InternalServerError.Body) { + public init(body: Operations.DeleteAgentSkill.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/500`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetEventRelay.Output.InternalServerError) + case internalServerError(Operations.DeleteAgentSkill.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetEventRelay.Output.InternalServerError { + public var internalServerError: Operations.DeleteAgentSkill.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -36906,9 +37042,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/agents/{id}/skills/{skillId}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -36924,26 +37060,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetEventRelay.Output.ServiceUnavailable.Body + public var body: Operations.DeleteAgentSkill.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetEventRelay.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteAgentSkill.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/503`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/skills/{skillId}/delete(deleteAgentSkill)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetEventRelay.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteAgentSkill.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetEventRelay.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteAgentSkill.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -36993,122 +37129,42 @@ public enum Operations { } } } - /// Sets the event relay URL, or removes it with `null`, which disconnects the relay. - /// - /// - Remark: HTTP `PUT /v1/event-relay`. - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)`. - public enum UpdateEventRelay { - public static let id: Swift.String = "updateEventRelay" + /// - Remark: HTTP `GET /v1/capabilities`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)`. + public enum GetCapabilities { + public static let id: Swift.String = "getCapabilities" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/header`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateEventRelay.Input.Headers - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/requestBody/json/url`. - public var url: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - url: - public init(url: Swift.String? = nil) { - self.url = url - } - public enum CodingKeys: String, CodingKey { - case url - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.url = try container.decodeIfPresent( - Swift.String.self, - forKey: .url - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "url" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/requestBody/content/application\/json`. - case json(Operations.UpdateEventRelay.Input.Body.JsonPayload) - } - public var body: Operations.UpdateEventRelay.Input.Body + public var headers: Operations.GetCapabilities.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - headers: - /// - body: - public init( - headers: Operations.UpdateEventRelay.Input.Headers = .init(), - body: Operations.UpdateEventRelay.Input.Body - ) { + public init(headers: Operations.GetCapabilities.Input.Headers = .init()) { self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json/error`. - public var error: Swift.String? - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json/status`. - @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { - case disconnected = "disconnected" - case connecting = "connecting" - case connected = "connected" - case error = "error" - } - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json/status`. - public var status: Operations.UpdateEventRelay.Output.Ok.Body.JsonPayload.StatusPayload - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json/tokenConfigured`. - public var tokenConfigured: Swift.Bool - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json/url`. - public var url: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - error: - /// - status: - /// - tokenConfigured: - /// - url: - public init( - error: Swift.String? = nil, - status: Operations.UpdateEventRelay.Output.Ok.Body.JsonPayload.StatusPayload, - tokenConfigured: Swift.Bool, - url: Swift.String? = nil - ) { - self.error = error - self.status = status - self.tokenConfigured = tokenConfigured - self.url = url - } - public enum CodingKeys: String, CodingKey { - case error - case status - case tokenConfigured - case url - } - } - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/application\/json`. - case json(Operations.UpdateEventRelay.Output.Ok.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/200/content/application\/json`. + case json(Components.Schemas.Capabilities) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.UpdateEventRelay.Output.Ok.Body.JsonPayload { + public var json: Components.Schemas.Capabilities { get throws { switch self { case let .json(body): @@ -37118,26 +37174,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateEventRelay.Output.Ok.Body + public var body: Operations.GetCapabilities.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateEventRelay.Output.Ok.Body) { + public init(body: Operations.GetCapabilities.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/200`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.UpdateEventRelay.Output.Ok) + case ok(Operations.GetCapabilities.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateEventRelay.Output.Ok { + public var ok: Operations.GetCapabilities.Output.Ok { get throws { switch self { case let .ok(response): @@ -37151,9 +37207,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -37169,26 +37225,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateEventRelay.Output.BadRequest.Body + public var body: Operations.GetCapabilities.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateEventRelay.Output.BadRequest.Body) { + public init(body: Operations.GetCapabilities.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/400`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateEventRelay.Output.BadRequest) + case badRequest(Operations.GetCapabilities.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateEventRelay.Output.BadRequest { + public var badRequest: Operations.GetCapabilities.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -37202,9 +37258,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -37220,26 +37276,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateEventRelay.Output.Unauthorized.Body + public var body: Operations.GetCapabilities.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateEventRelay.Output.Unauthorized.Body) { + public init(body: Operations.GetCapabilities.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/401`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateEventRelay.Output.Unauthorized) + case unauthorized(Operations.GetCapabilities.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateEventRelay.Output.Unauthorized { + public var unauthorized: Operations.GetCapabilities.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -37253,9 +37309,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -37271,26 +37327,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateEventRelay.Output.NotFound.Body + public var body: Operations.GetCapabilities.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateEventRelay.Output.NotFound.Body) { + public init(body: Operations.GetCapabilities.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/404`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateEventRelay.Output.NotFound) + case notFound(Operations.GetCapabilities.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateEventRelay.Output.NotFound { + public var notFound: Operations.GetCapabilities.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -37304,9 +37360,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -37322,26 +37378,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateEventRelay.Output.MethodNotAllowed.Body + public var body: Operations.GetCapabilities.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateEventRelay.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetCapabilities.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/405`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateEventRelay.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetCapabilities.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateEventRelay.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetCapabilities.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -37355,9 +37411,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -37373,26 +37429,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateEventRelay.Output.Conflict.Body + public var body: Operations.GetCapabilities.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateEventRelay.Output.Conflict.Body) { + public init(body: Operations.GetCapabilities.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/409`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateEventRelay.Output.Conflict) + case conflict(Operations.GetCapabilities.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateEventRelay.Output.Conflict { + public var conflict: Operations.GetCapabilities.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -37406,9 +37462,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -37424,26 +37480,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateEventRelay.Output.ContentTooLarge.Body + public var body: Operations.GetCapabilities.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateEventRelay.Output.ContentTooLarge.Body) { + public init(body: Operations.GetCapabilities.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/413`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateEventRelay.Output.ContentTooLarge) + case contentTooLarge(Operations.GetCapabilities.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateEventRelay.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetCapabilities.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -37457,9 +37513,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -37475,26 +37531,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateEventRelay.Output.InternalServerError.Body + public var body: Operations.GetCapabilities.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateEventRelay.Output.InternalServerError.Body) { + public init(body: Operations.GetCapabilities.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/500`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateEventRelay.Output.InternalServerError) + case internalServerError(Operations.GetCapabilities.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateEventRelay.Output.InternalServerError { + public var internalServerError: Operations.GetCapabilities.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -37508,9 +37564,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/capabilities/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -37526,26 +37582,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateEventRelay.Output.ServiceUnavailable.Body + public var body: Operations.GetCapabilities.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateEventRelay.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetCapabilities.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/503`. + /// - Remark: Generated from `#/paths//v1/capabilities/get(getCapabilities)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateEventRelay.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetCapabilities.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateEventRelay.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetCapabilities.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -37595,96 +37651,125 @@ public enum Operations { } } } - /// The account's event sources, each with the number of automations that use it. + /// Skill and memory changes by owners, bots, and reviews, newest first, with the state before and after each. Page with `before` set to the last change's ID. /// - /// - Remark: HTTP `GET /v1/event-sources`. - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)`. - public enum ListEventSources { - public static let id: Swift.String = "listEventSources" + /// - Remark: HTTP `GET /v1/changes`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)`. + public enum ListChanges { + public static let id: Swift.String = "listChanges" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/header`. + /// - Remark: Generated from `#/paths/v1/changes/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/changes/GET/query/limit`. + public var limit: Swift.Int? + /// - Remark: Generated from `#/paths/v1/changes/GET/query/before`. + public var before: Swift.String? + /// - Remark: Generated from `#/paths/v1/changes/GET/query/agentId`. + public struct AgentIdPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/changes/GET/query/agentId/value1`. + public var value1: Swift.String? + /// - Remark: Generated from `#/paths/v1/changes/GET/query/agentId/value2`. + @frozen public enum Value2Payload: String, Codable, Hashable, Sendable, CaseIterable { + case shared = "shared" + } + /// - Remark: Generated from `#/paths/v1/changes/GET/query/agentId/value2`. + public var value2: Operations.ListChanges.Input.Query.AgentIdPayload.Value2Payload? + /// Creates a new `AgentIdPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Swift.String? = nil, + value2: Operations.ListChanges.Input.Query.AgentIdPayload.Value2Payload? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Swift.Decoder) throws { + var errors: [any Swift.Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Swift.Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/paths/v1/changes/GET/query/agentId`. + public var agentId: Operations.ListChanges.Input.Query.AgentIdPayload? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - before: + /// - agentId: + public init( + limit: Swift.Int? = nil, + before: Swift.String? = nil, + agentId: Operations.ListChanges.Input.Query.AgentIdPayload? = nil + ) { + self.limit = limit + self.before = before + self.agentId = agentId + } + } + public var query: Operations.ListChanges.Input.Query + /// - Remark: Generated from `#/paths/v1/changes/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListEventSources.Input.Headers + public var headers: Operations.ListChanges.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - query: /// - headers: - public init(headers: Operations.ListEventSources.Input.Headers = .init()) { + public init( + query: Operations.ListChanges.Input.Query = .init(), + headers: Operations.ListChanges.Input.Headers = .init() + ) { + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/SourcesPayload`. - public struct SourcesPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/SourcesPayload/createdAt`. - public var createdAt: Swift.String - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/SourcesPayload/id`. - public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/SourcesPayload/name`. - public var name: Swift.String - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/SourcesPayload/usedBy`. - public var usedBy: Swift.Int - /// Creates a new `SourcesPayloadPayload`. - /// - /// - Parameters: - /// - createdAt: - /// - id: - /// - name: - /// - usedBy: - public init( - createdAt: Swift.String, - id: Swift.String, - name: Swift.String, - usedBy: Swift.Int - ) { - self.createdAt = createdAt - self.id = id - self.name = name - self.usedBy = usedBy - } - public enum CodingKeys: String, CodingKey { - case createdAt - case id - case name - case usedBy - } - } - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/sources`. - public typealias SourcesPayload = [Operations.ListEventSources.Output.Ok.Body.JsonPayload.SourcesPayloadPayload] - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/sources`. - public var sources: Operations.ListEventSources.Output.Ok.Body.JsonPayload.SourcesPayload - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - sources: - public init(sources: Operations.ListEventSources.Output.Ok.Body.JsonPayload.SourcesPayload) { - self.sources = sources - } - public enum CodingKeys: String, CodingKey { - case sources - } - } - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/application\/json`. - case json(Operations.ListEventSources.Output.Ok.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/200/content/application\/json`. + case json([Components.Schemas.LearnedChange]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.ListEventSources.Output.Ok.Body.JsonPayload { + public var json: [Components.Schemas.LearnedChange] { get throws { switch self { case let .json(body): @@ -37694,26 +37779,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListEventSources.Output.Ok.Body + public var body: Operations.ListChanges.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListEventSources.Output.Ok.Body) { + public init(body: Operations.ListChanges.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/200`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListEventSources.Output.Ok) + case ok(Operations.ListChanges.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListEventSources.Output.Ok { + public var ok: Operations.ListChanges.Output.Ok { get throws { switch self { case let .ok(response): @@ -37727,9 +37812,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -37745,26 +37830,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListEventSources.Output.BadRequest.Body + public var body: Operations.ListChanges.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListEventSources.Output.BadRequest.Body) { + public init(body: Operations.ListChanges.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/400`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListEventSources.Output.BadRequest) + case badRequest(Operations.ListChanges.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListEventSources.Output.BadRequest { + public var badRequest: Operations.ListChanges.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -37778,9 +37863,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -37796,26 +37881,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListEventSources.Output.Unauthorized.Body + public var body: Operations.ListChanges.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListEventSources.Output.Unauthorized.Body) { + public init(body: Operations.ListChanges.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/401`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListEventSources.Output.Unauthorized) + case unauthorized(Operations.ListChanges.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListEventSources.Output.Unauthorized { + public var unauthorized: Operations.ListChanges.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -37829,9 +37914,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -37847,26 +37932,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListEventSources.Output.NotFound.Body + public var body: Operations.ListChanges.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListEventSources.Output.NotFound.Body) { + public init(body: Operations.ListChanges.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/404`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListEventSources.Output.NotFound) + case notFound(Operations.ListChanges.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListEventSources.Output.NotFound { + public var notFound: Operations.ListChanges.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -37880,9 +37965,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -37898,26 +37983,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListEventSources.Output.MethodNotAllowed.Body + public var body: Operations.ListChanges.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListEventSources.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListChanges.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/405`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListEventSources.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListChanges.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListEventSources.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListChanges.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -37931,9 +38016,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -37949,26 +38034,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListEventSources.Output.Conflict.Body + public var body: Operations.ListChanges.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListEventSources.Output.Conflict.Body) { + public init(body: Operations.ListChanges.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/409`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListEventSources.Output.Conflict) + case conflict(Operations.ListChanges.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListEventSources.Output.Conflict { + public var conflict: Operations.ListChanges.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -37982,9 +38067,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -38000,26 +38085,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListEventSources.Output.ContentTooLarge.Body + public var body: Operations.ListChanges.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListEventSources.Output.ContentTooLarge.Body) { + public init(body: Operations.ListChanges.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/413`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListEventSources.Output.ContentTooLarge) + case contentTooLarge(Operations.ListChanges.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListEventSources.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListChanges.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -38033,9 +38118,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -38051,26 +38136,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListEventSources.Output.InternalServerError.Body + public var body: Operations.ListChanges.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListEventSources.Output.InternalServerError.Body) { + public init(body: Operations.ListChanges.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/500`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListEventSources.Output.InternalServerError) + case internalServerError(Operations.ListChanges.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListEventSources.Output.InternalServerError { + public var internalServerError: Operations.ListChanges.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -38084,9 +38169,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -38102,26 +38187,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListEventSources.Output.ServiceUnavailable.Body + public var body: Operations.ListChanges.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListEventSources.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListChanges.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/503`. + /// - Remark: Generated from `#/paths//v1/changes/get(listChanges)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListEventSources.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListChanges.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListEventSources.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListChanges.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -38171,121 +38256,62 @@ public enum Operations { } } } - /// Creates a source on the event relay. The response's `address` contains the source's secret and is returned only once. 400 when the relay URL or token is missing, or the relay can't be reached or rejects the token. + /// Restores the state before the change, whatever happened since, and records the revert as a change of its own. /// - /// - Remark: HTTP `POST /v1/event-sources`. - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)`. - public enum CreateEventSource { - public static let id: Swift.String = "createEventSource" + /// - Remark: HTTP `POST /v1/changes/{id}/revert`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)`. + public enum RevertChange { + public static let id: Swift.String = "revertChange" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/header`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.RevertChange.Input.Path + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CreateEventSource.Input.Headers - /// - Remark: Generated from `#/paths/v1/event-sources/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/requestBody/json/name`. - public var name: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - name: - public init(name: Swift.String) { - self.name = name - } - public enum CodingKeys: String, CodingKey { - case name - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.name = try container.decode( - Swift.String.self, - forKey: .name - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "name" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/event-sources/POST/requestBody/content/application\/json`. - case json(Operations.CreateEventSource.Input.Body.JsonPayload) - } - public var body: Operations.CreateEventSource.Input.Body + public var headers: Operations.RevertChange.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - /// - body: public init( - headers: Operations.CreateEventSource.Input.Headers = .init(), - body: Operations.CreateEventSource.Input.Body + path: Operations.RevertChange.Input.Path, + headers: Operations.RevertChange.Input.Headers = .init() ) { + self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json/address`. - public var address: Swift.String - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json/createdAt`. - public var createdAt: Swift.String - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json/id`. - public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json/name`. - public var name: Swift.String - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json/usedBy`. - public var usedBy: Swift.Int - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - address: - /// - createdAt: - /// - id: - /// - name: - /// - usedBy: - public init( - address: Swift.String, - createdAt: Swift.String, - id: Swift.String, - name: Swift.String, - usedBy: Swift.Int - ) { - self.address = address - self.createdAt = createdAt - self.id = id - self.name = name - self.usedBy = usedBy - } - public enum CodingKeys: String, CodingKey { - case address - case createdAt - case id - case name - case usedBy - } - } - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/application\/json`. - case json(Operations.CreateEventSource.Output.Created.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/201/content/application\/json`. + case json(Components.Schemas.LearnedChange) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.CreateEventSource.Output.Created.Body.JsonPayload { + public var json: Components.Schemas.LearnedChange { get throws { switch self { case let .json(body): @@ -38295,26 +38321,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateEventSource.Output.Created.Body + public var body: Operations.RevertChange.Output.Created.Body /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateEventSource.Output.Created.Body) { + public init(body: Operations.RevertChange.Output.Created.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/201`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/201`. /// /// HTTP response code: `201 created`. - case created(Operations.CreateEventSource.Output.Created) + case created(Operations.RevertChange.Output.Created) /// The associated value of the enum case if `self` is `.created`. /// /// - Throws: An error if `self` is not `.created`. /// - SeeAlso: `.created`. - public var created: Operations.CreateEventSource.Output.Created { + public var created: Operations.RevertChange.Output.Created { get throws { switch self { case let .created(response): @@ -38328,9 +38354,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -38346,26 +38372,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateEventSource.Output.BadRequest.Body + public var body: Operations.RevertChange.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateEventSource.Output.BadRequest.Body) { + public init(body: Operations.RevertChange.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/400`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CreateEventSource.Output.BadRequest) + case badRequest(Operations.RevertChange.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CreateEventSource.Output.BadRequest { + public var badRequest: Operations.RevertChange.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -38379,9 +38405,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -38397,26 +38423,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateEventSource.Output.Unauthorized.Body + public var body: Operations.RevertChange.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateEventSource.Output.Unauthorized.Body) { + public init(body: Operations.RevertChange.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/401`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CreateEventSource.Output.Unauthorized) + case unauthorized(Operations.RevertChange.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CreateEventSource.Output.Unauthorized { + public var unauthorized: Operations.RevertChange.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -38430,9 +38456,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -38448,26 +38474,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateEventSource.Output.NotFound.Body + public var body: Operations.RevertChange.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateEventSource.Output.NotFound.Body) { + public init(body: Operations.RevertChange.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/404`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CreateEventSource.Output.NotFound) + case notFound(Operations.RevertChange.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CreateEventSource.Output.NotFound { + public var notFound: Operations.RevertChange.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -38481,9 +38507,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -38499,26 +38525,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateEventSource.Output.MethodNotAllowed.Body + public var body: Operations.RevertChange.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateEventSource.Output.MethodNotAllowed.Body) { + public init(body: Operations.RevertChange.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/405`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CreateEventSource.Output.MethodNotAllowed) + case methodNotAllowed(Operations.RevertChange.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CreateEventSource.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.RevertChange.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -38532,9 +38558,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -38550,26 +38576,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateEventSource.Output.Conflict.Body + public var body: Operations.RevertChange.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateEventSource.Output.Conflict.Body) { + public init(body: Operations.RevertChange.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/409`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CreateEventSource.Output.Conflict) + case conflict(Operations.RevertChange.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CreateEventSource.Output.Conflict { + public var conflict: Operations.RevertChange.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -38583,9 +38609,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -38601,26 +38627,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateEventSource.Output.ContentTooLarge.Body + public var body: Operations.RevertChange.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateEventSource.Output.ContentTooLarge.Body) { + public init(body: Operations.RevertChange.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/413`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CreateEventSource.Output.ContentTooLarge) + case contentTooLarge(Operations.RevertChange.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CreateEventSource.Output.ContentTooLarge { + public var contentTooLarge: Operations.RevertChange.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -38634,9 +38660,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -38652,26 +38678,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateEventSource.Output.InternalServerError.Body + public var body: Operations.RevertChange.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateEventSource.Output.InternalServerError.Body) { + public init(body: Operations.RevertChange.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/500`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CreateEventSource.Output.InternalServerError) + case internalServerError(Operations.RevertChange.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CreateEventSource.Output.InternalServerError { + public var internalServerError: Operations.RevertChange.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -38685,9 +38711,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/changes/{id}/revert/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -38703,26 +38729,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateEventSource.Output.ServiceUnavailable.Body + public var body: Operations.RevertChange.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateEventSource.Output.ServiceUnavailable.Body) { + public init(body: Operations.RevertChange.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/503`. + /// - Remark: Generated from `#/paths//v1/changes/{id}/revert/post(revertChange)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CreateEventSource.Output.ServiceUnavailable) + case serviceUnavailable(Operations.RevertChange.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CreateEventSource.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.RevertChange.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -38772,91 +38798,131 @@ public enum Operations { } } } - /// Deletes the source on the event relay and in Crumble; its address stops working. 409 while an automation uses it. + /// The account's event relay: its URL, whether the Doorstep account token is set (plugin setting `doorstep:token`), and the connection status. /// - /// - Remark: HTTP `DELETE /v1/event-sources/{id}`. - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)`. - public enum DeleteEventSource { - public static let id: Swift.String = "deleteEventSource" + /// - Remark: HTTP `GET /v1/event-relay`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)`. + public enum GetEventRelay { + public static let id: Swift.String = "getEventRelay" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.DeleteEventSource.Input.Path - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/header`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteEventSource.Input.Headers + public var headers: Operations.GetEventRelay.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - public init( - path: Operations.DeleteEventSource.Input.Path, - headers: Operations.DeleteEventSource.Input.Headers = .init() - ) { - self.path = path + public init(headers: Operations.GetEventRelay.Input.Headers = .init()) { self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json/error`. + public var error: Swift.String? + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json/status`. + @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { + case disconnected = "disconnected" + case connecting = "connecting" + case connected = "connected" + case error = "error" + } + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json/status`. + public var status: Operations.GetEventRelay.Output.Ok.Body.JsonPayload.StatusPayload + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json/tokenConfigured`. + public var tokenConfigured: Swift.Bool + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/json/url`. + public var url: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - error: + /// - status: + /// - tokenConfigured: + /// - url: + public init( + error: Swift.String? = nil, + status: Operations.GetEventRelay.Output.Ok.Body.JsonPayload.StatusPayload, + tokenConfigured: Swift.Bool, + url: Swift.String? = nil + ) { + self.error = error + self.status = status + self.tokenConfigured = tokenConfigured + self.url = url + } + public enum CodingKeys: String, CodingKey { + case error + case status + case tokenConfigured + case url + } + } + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/200/content/application\/json`. + case json(Operations.GetEventRelay.Output.Ok.Body.JsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.GetEventRelay.Output.Ok.Body.JsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetEventRelay.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetEventRelay.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteEventSource.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/204`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.GetEventRelay.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteEventSource.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetEventRelay.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -38872,26 +38938,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteEventSource.Output.BadRequest.Body + public var body: Operations.GetEventRelay.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteEventSource.Output.BadRequest.Body) { + public init(body: Operations.GetEventRelay.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/400`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteEventSource.Output.BadRequest) + case badRequest(Operations.GetEventRelay.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteEventSource.Output.BadRequest { + public var badRequest: Operations.GetEventRelay.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -38905,9 +38971,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -38923,26 +38989,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteEventSource.Output.Unauthorized.Body + public var body: Operations.GetEventRelay.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteEventSource.Output.Unauthorized.Body) { + public init(body: Operations.GetEventRelay.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/401`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteEventSource.Output.Unauthorized) + case unauthorized(Operations.GetEventRelay.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteEventSource.Output.Unauthorized { + public var unauthorized: Operations.GetEventRelay.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -38956,9 +39022,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -38974,26 +39040,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteEventSource.Output.NotFound.Body + public var body: Operations.GetEventRelay.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteEventSource.Output.NotFound.Body) { + public init(body: Operations.GetEventRelay.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/404`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteEventSource.Output.NotFound) + case notFound(Operations.GetEventRelay.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteEventSource.Output.NotFound { + public var notFound: Operations.GetEventRelay.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -39007,9 +39073,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39025,26 +39091,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteEventSource.Output.MethodNotAllowed.Body + public var body: Operations.GetEventRelay.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteEventSource.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetEventRelay.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/405`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteEventSource.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetEventRelay.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteEventSource.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetEventRelay.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -39058,9 +39124,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39076,26 +39142,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteEventSource.Output.Conflict.Body + public var body: Operations.GetEventRelay.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteEventSource.Output.Conflict.Body) { + public init(body: Operations.GetEventRelay.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/409`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteEventSource.Output.Conflict) + case conflict(Operations.GetEventRelay.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteEventSource.Output.Conflict { + public var conflict: Operations.GetEventRelay.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -39109,9 +39175,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -39127,26 +39193,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteEventSource.Output.ContentTooLarge.Body + public var body: Operations.GetEventRelay.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteEventSource.Output.ContentTooLarge.Body) { + public init(body: Operations.GetEventRelay.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/413`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteEventSource.Output.ContentTooLarge) + case contentTooLarge(Operations.GetEventRelay.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteEventSource.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetEventRelay.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -39160,9 +39226,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39178,26 +39244,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteEventSource.Output.InternalServerError.Body + public var body: Operations.GetEventRelay.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteEventSource.Output.InternalServerError.Body) { + public init(body: Operations.GetEventRelay.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/500`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteEventSource.Output.InternalServerError) + case internalServerError(Operations.GetEventRelay.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteEventSource.Output.InternalServerError { + public var internalServerError: Operations.GetEventRelay.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -39211,9 +39277,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39229,26 +39295,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteEventSource.Output.ServiceUnavailable.Body + public var body: Operations.GetEventRelay.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteEventSource.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetEventRelay.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/503`. + /// - Remark: Generated from `#/paths//v1/event-relay/get(getEventRelay)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteEventSource.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetEventRelay.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteEventSource.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetEventRelay.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -39298,73 +39364,151 @@ public enum Operations { } } } - /// Server-sent events. Each activity event carries a ReplyEvent or ChatPreviewEvent JSON object in data. Each learned event carries a LearnedEvent: what a bot's review of one turn changed; GET /v1/agents/{id}/reviews lists them durably. Current chat previews replay on connection; finished replies and learned events are not replayed. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. No Last-Event-ID replay. + /// Sets the event relay URL, or removes it with `null`, which disconnects the relay. /// - /// - Remark: HTTP `GET /v1/events`. - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)`. - public enum StreamActivityEvents { - public static let id: Swift.String = "streamActivityEvents" + /// - Remark: HTTP `PUT /v1/event-relay`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)`. + public enum UpdateEventRelay { + public static let id: Swift.String = "updateEventRelay" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/header`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.StreamActivityEvents.Input.Headers + public var headers: Operations.UpdateEventRelay.Input.Headers + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/requestBody/json/url`. + public var url: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - url: + public init(url: Swift.String? = nil) { + self.url = url + } + public enum CodingKeys: String, CodingKey { + case url + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.url = try container.decodeIfPresent( + Swift.String.self, + forKey: .url + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "url" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/requestBody/content/application\/json`. + case json(Operations.UpdateEventRelay.Input.Body.JsonPayload) + } + public var body: Operations.UpdateEventRelay.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - headers: - public init(headers: Operations.StreamActivityEvents.Input.Headers = .init()) { + /// - body: + public init( + headers: Operations.UpdateEventRelay.Input.Headers = .init(), + body: Operations.UpdateEventRelay.Input.Body + ) { self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/200/content/text\/event-stream`. - case textEventStream(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.textEventStream`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json/error`. + public var error: Swift.String? + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json/status`. + @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { + case disconnected = "disconnected" + case connecting = "connecting" + case connected = "connected" + case error = "error" + } + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json/status`. + public var status: Operations.UpdateEventRelay.Output.Ok.Body.JsonPayload.StatusPayload + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json/tokenConfigured`. + public var tokenConfigured: Swift.Bool + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/json/url`. + public var url: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - error: + /// - status: + /// - tokenConfigured: + /// - url: + public init( + error: Swift.String? = nil, + status: Operations.UpdateEventRelay.Output.Ok.Body.JsonPayload.StatusPayload, + tokenConfigured: Swift.Bool, + url: Swift.String? = nil + ) { + self.error = error + self.status = status + self.tokenConfigured = tokenConfigured + self.url = url + } + public enum CodingKeys: String, CodingKey { + case error + case status + case tokenConfigured + case url + } + } + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/200/content/application\/json`. + case json(Operations.UpdateEventRelay.Output.Ok.Body.JsonPayload) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.textEventStream`. - /// - SeeAlso: `.textEventStream`. - public var textEventStream: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.UpdateEventRelay.Output.Ok.Body.JsonPayload { get throws { switch self { - case let .textEventStream(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.StreamActivityEvents.Output.Ok.Body + public var body: Operations.UpdateEventRelay.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamActivityEvents.Output.Ok.Body) { + public init(body: Operations.UpdateEventRelay.Output.Ok.Body) { self.body = body } } - /// SSE stream, not a JSON array + /// Success /// - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/200`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.StreamActivityEvents.Output.Ok) + case ok(Operations.UpdateEventRelay.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.StreamActivityEvents.Output.Ok { + public var ok: Operations.UpdateEventRelay.Output.Ok { get throws { switch self { case let .ok(response): @@ -39378,9 +39522,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39396,26 +39540,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamActivityEvents.Output.BadRequest.Body + public var body: Operations.UpdateEventRelay.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamActivityEvents.Output.BadRequest.Body) { + public init(body: Operations.UpdateEventRelay.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/400`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.StreamActivityEvents.Output.BadRequest) + case badRequest(Operations.UpdateEventRelay.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.StreamActivityEvents.Output.BadRequest { + public var badRequest: Operations.UpdateEventRelay.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -39429,9 +39573,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -39447,26 +39591,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamActivityEvents.Output.Unauthorized.Body + public var body: Operations.UpdateEventRelay.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamActivityEvents.Output.Unauthorized.Body) { + public init(body: Operations.UpdateEventRelay.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/401`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.StreamActivityEvents.Output.Unauthorized) + case unauthorized(Operations.UpdateEventRelay.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.StreamActivityEvents.Output.Unauthorized { + public var unauthorized: Operations.UpdateEventRelay.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -39480,9 +39624,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39498,26 +39642,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamActivityEvents.Output.NotFound.Body + public var body: Operations.UpdateEventRelay.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamActivityEvents.Output.NotFound.Body) { + public init(body: Operations.UpdateEventRelay.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/404`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.StreamActivityEvents.Output.NotFound) + case notFound(Operations.UpdateEventRelay.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.StreamActivityEvents.Output.NotFound { + public var notFound: Operations.UpdateEventRelay.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -39531,9 +39675,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39549,26 +39693,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamActivityEvents.Output.MethodNotAllowed.Body + public var body: Operations.UpdateEventRelay.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamActivityEvents.Output.MethodNotAllowed.Body) { + public init(body: Operations.UpdateEventRelay.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/405`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.StreamActivityEvents.Output.MethodNotAllowed) + case methodNotAllowed(Operations.UpdateEventRelay.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.StreamActivityEvents.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.UpdateEventRelay.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -39582,9 +39726,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39600,26 +39744,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamActivityEvents.Output.Conflict.Body + public var body: Operations.UpdateEventRelay.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamActivityEvents.Output.Conflict.Body) { + public init(body: Operations.UpdateEventRelay.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/409`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.StreamActivityEvents.Output.Conflict) + case conflict(Operations.UpdateEventRelay.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.StreamActivityEvents.Output.Conflict { + public var conflict: Operations.UpdateEventRelay.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -39633,9 +39777,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -39651,26 +39795,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamActivityEvents.Output.ContentTooLarge.Body + public var body: Operations.UpdateEventRelay.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamActivityEvents.Output.ContentTooLarge.Body) { + public init(body: Operations.UpdateEventRelay.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/413`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.StreamActivityEvents.Output.ContentTooLarge) + case contentTooLarge(Operations.UpdateEventRelay.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.StreamActivityEvents.Output.ContentTooLarge { + public var contentTooLarge: Operations.UpdateEventRelay.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -39684,9 +39828,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39702,26 +39846,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamActivityEvents.Output.InternalServerError.Body + public var body: Operations.UpdateEventRelay.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamActivityEvents.Output.InternalServerError.Body) { + public init(body: Operations.UpdateEventRelay.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/500`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.StreamActivityEvents.Output.InternalServerError) + case internalServerError(Operations.UpdateEventRelay.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.StreamActivityEvents.Output.InternalServerError { + public var internalServerError: Operations.UpdateEventRelay.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -39735,9 +39879,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/events/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-relay/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39753,26 +39897,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamActivityEvents.Output.ServiceUnavailable.Body + public var body: Operations.UpdateEventRelay.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamActivityEvents.Output.ServiceUnavailable.Body) { + public init(body: Operations.UpdateEventRelay.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/503`. + /// - Remark: Generated from `#/paths//v1/event-relay/put(updateEventRelay)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.StreamActivityEvents.Output.ServiceUnavailable) + case serviceUnavailable(Operations.UpdateEventRelay.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.StreamActivityEvents.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.UpdateEventRelay.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -39791,14 +39935,11 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } @frozen public enum AcceptableContentType: AcceptableProtocol { - case textEventStream case json case plainText case other(Swift.String) public init?(rawValue: Swift.String) { switch rawValue.lowercased() { - case "text/event-stream": - self = .textEventStream case "application/json": self = .json case "text/plain": @@ -39811,8 +39952,6 @@ public enum Operations { switch self { case let .other(string): return string - case .textEventStream: - return "text/event-stream" case .json: return "application/json" case .plainText: @@ -39821,67 +39960,102 @@ public enum Operations { } public static var allCases: [Self] { [ - .textEventStream, .json, .plainText ] } } } - /// - Remark: HTTP `GET /v1/executions`. - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)`. - public enum ListExecutions { - public static let id: Swift.String = "listExecutions" + /// The account's event sources, each with the number of automations that use it. + /// + /// - Remark: HTTP `GET /v1/event-sources`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)`. + public enum ListEventSources { + public static let id: Swift.String = "listEventSources" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/query/agentId`. - public var agentId: Swift.String? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - agentId: - public init(agentId: Swift.String? = nil) { - self.agentId = agentId - } - } - public var query: Operations.ListExecutions.Input.Query - /// - Remark: Generated from `#/paths/v1/executions/GET/header`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListExecutions.Input.Headers + public var headers: Operations.ListEventSources.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - query: /// - headers: - public init( - query: Operations.ListExecutions.Input.Query = .init(), - headers: Operations.ListExecutions.Input.Headers = .init() - ) { - self.query = query + public init(headers: Operations.ListEventSources.Input.Headers = .init()) { self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/200/content/application\/json`. - case json([Components.Schemas.Execution]) + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/SourcesPayload`. + public struct SourcesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/SourcesPayload/createdAt`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/SourcesPayload/id`. + public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/SourcesPayload/name`. + public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/SourcesPayload/usedBy`. + public var usedBy: Swift.Int + /// Creates a new `SourcesPayloadPayload`. + /// + /// - Parameters: + /// - createdAt: + /// - id: + /// - name: + /// - usedBy: + public init( + createdAt: Swift.String, + id: Swift.String, + name: Swift.String, + usedBy: Swift.Int + ) { + self.createdAt = createdAt + self.id = id + self.name = name + self.usedBy = usedBy + } + public enum CodingKeys: String, CodingKey { + case createdAt + case id + case name + case usedBy + } + } + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/sources`. + public typealias SourcesPayload = [Operations.ListEventSources.Output.Ok.Body.JsonPayload.SourcesPayloadPayload] + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/json/sources`. + public var sources: Operations.ListEventSources.Output.Ok.Body.JsonPayload.SourcesPayload + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - sources: + public init(sources: Operations.ListEventSources.Output.Ok.Body.JsonPayload.SourcesPayload) { + self.sources = sources + } + public enum CodingKeys: String, CodingKey { + case sources + } + } + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/200/content/application\/json`. + case json(Operations.ListEventSources.Output.Ok.Body.JsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.Execution] { + public var json: Operations.ListEventSources.Output.Ok.Body.JsonPayload { get throws { switch self { case let .json(body): @@ -39891,26 +40065,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListExecutions.Output.Ok.Body + public var body: Operations.ListEventSources.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListExecutions.Output.Ok.Body) { + public init(body: Operations.ListEventSources.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/200`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListExecutions.Output.Ok) + case ok(Operations.ListEventSources.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListExecutions.Output.Ok { + public var ok: Operations.ListEventSources.Output.Ok { get throws { switch self { case let .ok(response): @@ -39924,9 +40098,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -39942,26 +40116,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListExecutions.Output.BadRequest.Body + public var body: Operations.ListEventSources.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListExecutions.Output.BadRequest.Body) { + public init(body: Operations.ListEventSources.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/400`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListExecutions.Output.BadRequest) + case badRequest(Operations.ListEventSources.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListExecutions.Output.BadRequest { + public var badRequest: Operations.ListEventSources.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -39975,9 +40149,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -39993,26 +40167,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListExecutions.Output.Unauthorized.Body + public var body: Operations.ListEventSources.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListExecutions.Output.Unauthorized.Body) { + public init(body: Operations.ListEventSources.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/401`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListExecutions.Output.Unauthorized) + case unauthorized(Operations.ListEventSources.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListExecutions.Output.Unauthorized { + public var unauthorized: Operations.ListEventSources.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -40026,9 +40200,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40044,26 +40218,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListExecutions.Output.NotFound.Body + public var body: Operations.ListEventSources.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListExecutions.Output.NotFound.Body) { + public init(body: Operations.ListEventSources.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/404`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListExecutions.Output.NotFound) + case notFound(Operations.ListEventSources.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListExecutions.Output.NotFound { + public var notFound: Operations.ListEventSources.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -40077,9 +40251,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40095,26 +40269,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListExecutions.Output.MethodNotAllowed.Body + public var body: Operations.ListEventSources.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListExecutions.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListEventSources.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/405`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListExecutions.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListEventSources.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListExecutions.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListEventSources.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -40128,9 +40302,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40146,26 +40320,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListExecutions.Output.Conflict.Body + public var body: Operations.ListEventSources.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListExecutions.Output.Conflict.Body) { + public init(body: Operations.ListEventSources.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/409`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListExecutions.Output.Conflict) + case conflict(Operations.ListEventSources.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListExecutions.Output.Conflict { + public var conflict: Operations.ListEventSources.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -40179,9 +40353,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -40197,26 +40371,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListExecutions.Output.ContentTooLarge.Body + public var body: Operations.ListEventSources.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListExecutions.Output.ContentTooLarge.Body) { + public init(body: Operations.ListEventSources.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/413`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListExecutions.Output.ContentTooLarge) + case contentTooLarge(Operations.ListEventSources.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListExecutions.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListEventSources.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -40230,9 +40404,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40248,26 +40422,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListExecutions.Output.InternalServerError.Body + public var body: Operations.ListEventSources.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListExecutions.Output.InternalServerError.Body) { + public init(body: Operations.ListEventSources.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/500`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListExecutions.Output.InternalServerError) + case internalServerError(Operations.ListEventSources.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListExecutions.Output.InternalServerError { + public var internalServerError: Operations.ListEventSources.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -40281,9 +40455,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/executions/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40299,26 +40473,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListExecutions.Output.ServiceUnavailable.Body + public var body: Operations.ListEventSources.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListExecutions.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListEventSources.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/503`. + /// - Remark: Generated from `#/paths//v1/event-sources/get(listEventSources)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListExecutions.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListEventSources.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListExecutions.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListEventSources.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -40368,59 +40542,121 @@ public enum Operations { } } } - /// The account's machine accounts: GitHub users made for bots. A bot acts as its machine account wherever none of its GitHub Apps does. + /// Creates a source on the event relay. The response's `address` contains the source's secret and is returned only once. 400 when the relay URL or token is missing, or the relay can't be reached or rejects the token. /// - /// - Remark: HTTP `GET /v1/github-accounts`. - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)`. - public enum ListGithubAccounts { - public static let id: Swift.String = "listGithubAccounts" + /// - Remark: HTTP `POST /v1/event-sources`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)`. + public enum CreateEventSource { + public static let id: Swift.String = "createEventSource" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/header`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListGithubAccounts.Input.Headers + public var headers: Operations.CreateEventSource.Input.Headers + /// - Remark: Generated from `#/paths/v1/event-sources/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/event-sources/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/event-sources/POST/requestBody/json/name`. + public var name: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - name: + public init(name: Swift.String) { + self.name = name + } + public enum CodingKeys: String, CodingKey { + case name + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.name = try container.decode( + Swift.String.self, + forKey: .name + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "name" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/event-sources/POST/requestBody/content/application\/json`. + case json(Operations.CreateEventSource.Input.Body.JsonPayload) + } + public var body: Operations.CreateEventSource.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - headers: - public init(headers: Operations.ListGithubAccounts.Input.Headers = .init()) { + /// - body: + public init( + headers: Operations.CreateEventSource.Input.Headers = .init(), + body: Operations.CreateEventSource.Input.Body + ) { self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/200/content`. + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/200/content/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/200/content/json/accounts`. - public var accounts: [Components.Schemas.GitHubAccount] + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json/address`. + public var address: Swift.String + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json/createdAt`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json/id`. + public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json/name`. + public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/json/usedBy`. + public var usedBy: Swift.Int /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - accounts: - public init(accounts: [Components.Schemas.GitHubAccount]) { - self.accounts = accounts + /// - address: + /// - createdAt: + /// - id: + /// - name: + /// - usedBy: + public init( + address: Swift.String, + createdAt: Swift.String, + id: Swift.String, + name: Swift.String, + usedBy: Swift.Int + ) { + self.address = address + self.createdAt = createdAt + self.id = id + self.name = name + self.usedBy = usedBy } public enum CodingKeys: String, CodingKey { - case accounts + case address + case createdAt + case id + case name + case usedBy } } - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/200/content/application\/json`. - case json(Operations.ListGithubAccounts.Output.Ok.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/201/content/application\/json`. + case json(Operations.CreateEventSource.Output.Created.Body.JsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.ListGithubAccounts.Output.Ok.Body.JsonPayload { + public var json: Operations.CreateEventSource.Output.Created.Body.JsonPayload { get throws { switch self { case let .json(body): @@ -40430,42 +40666,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubAccounts.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.CreateEventSource.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubAccounts.Output.Ok.Body) { + public init(body: Operations.CreateEventSource.Output.Created.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/200`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/201`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.ListGithubAccounts.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `201 created`. + case created(Operations.CreateEventSource.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.ListGithubAccounts.Output.Ok { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.CreateEventSource.Output.Created { get throws { switch self { - case let .ok(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "created", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40481,26 +40717,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubAccounts.Output.BadRequest.Body + public var body: Operations.CreateEventSource.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubAccounts.Output.BadRequest.Body) { + public init(body: Operations.CreateEventSource.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/400`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListGithubAccounts.Output.BadRequest) + case badRequest(Operations.CreateEventSource.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListGithubAccounts.Output.BadRequest { + public var badRequest: Operations.CreateEventSource.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -40514,9 +40750,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -40532,26 +40768,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubAccounts.Output.Unauthorized.Body + public var body: Operations.CreateEventSource.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubAccounts.Output.Unauthorized.Body) { + public init(body: Operations.CreateEventSource.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/401`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListGithubAccounts.Output.Unauthorized) + case unauthorized(Operations.CreateEventSource.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListGithubAccounts.Output.Unauthorized { + public var unauthorized: Operations.CreateEventSource.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -40565,9 +40801,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40583,26 +40819,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubAccounts.Output.NotFound.Body + public var body: Operations.CreateEventSource.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubAccounts.Output.NotFound.Body) { + public init(body: Operations.CreateEventSource.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/404`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListGithubAccounts.Output.NotFound) + case notFound(Operations.CreateEventSource.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListGithubAccounts.Output.NotFound { + public var notFound: Operations.CreateEventSource.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -40616,9 +40852,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40634,26 +40870,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubAccounts.Output.MethodNotAllowed.Body + public var body: Operations.CreateEventSource.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubAccounts.Output.MethodNotAllowed.Body) { + public init(body: Operations.CreateEventSource.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/405`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListGithubAccounts.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CreateEventSource.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListGithubAccounts.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CreateEventSource.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -40667,9 +40903,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40685,26 +40921,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubAccounts.Output.Conflict.Body + public var body: Operations.CreateEventSource.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubAccounts.Output.Conflict.Body) { + public init(body: Operations.CreateEventSource.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/409`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListGithubAccounts.Output.Conflict) + case conflict(Operations.CreateEventSource.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListGithubAccounts.Output.Conflict { + public var conflict: Operations.CreateEventSource.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -40718,9 +40954,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -40736,26 +40972,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubAccounts.Output.ContentTooLarge.Body + public var body: Operations.CreateEventSource.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubAccounts.Output.ContentTooLarge.Body) { + public init(body: Operations.CreateEventSource.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/413`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListGithubAccounts.Output.ContentTooLarge) + case contentTooLarge(Operations.CreateEventSource.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListGithubAccounts.Output.ContentTooLarge { + public var contentTooLarge: Operations.CreateEventSource.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -40769,9 +41005,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40787,26 +41023,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubAccounts.Output.InternalServerError.Body + public var body: Operations.CreateEventSource.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubAccounts.Output.InternalServerError.Body) { + public init(body: Operations.CreateEventSource.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/500`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListGithubAccounts.Output.InternalServerError) + case internalServerError(Operations.CreateEventSource.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListGithubAccounts.Output.InternalServerError { + public var internalServerError: Operations.CreateEventSource.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -40820,9 +41056,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -40838,26 +41074,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubAccounts.Output.ServiceUnavailable.Body + public var body: Operations.CreateEventSource.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubAccounts.Output.ServiceUnavailable.Body) { + public init(body: Operations.CreateEventSource.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/503`. + /// - Remark: Generated from `#/paths//v1/event-sources/post(createEventSource)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListGithubAccounts.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CreateEventSource.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListGithubAccounts.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CreateEventSource.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -40907,166 +41143,91 @@ public enum Operations { } } } - /// Adds the GitHub user a personal access token signs in as. 400 when GitHub refuses the token; 409 when the user is already added. + /// Deletes the source on the event relay and in Crumble; its address stops working. 409 while an automation uses it. /// - /// - Remark: HTTP `POST /v1/github-accounts`. - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)`. - public enum AddGithubAccount { - public static let id: Swift.String = "addGithubAccount" + /// - Remark: HTTP `DELETE /v1/event-sources/{id}`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)`. + public enum DeleteEventSource { + public static let id: Swift.String = "deleteEventSource" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/header`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.DeleteEventSource.Input.Path + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.AddGithubAccount.Input.Headers - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/reference/passwordManager`. - public var passwordManager: Operations.AddGithubAccount.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.AddGithubAccount.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/reference`. - public var reference: Operations.AddGithubAccount.Input.Body.JsonPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/value`. - public var value: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.AddGithubAccount.Input.Body.JsonPayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.AddGithubAccount.Input.Body.JsonPayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/content/application\/json`. - case json(Operations.AddGithubAccount.Input.Body.JsonPayload) - } - public var body: Operations.AddGithubAccount.Input.Body + public var headers: Operations.DeleteEventSource.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - /// - body: public init( - headers: Operations.AddGithubAccount.Input.Headers = .init(), - body: Operations.AddGithubAccount.Input.Body + path: Operations.DeleteEventSource.Input.Path, + headers: Operations.DeleteEventSource.Input.Headers = .init() ) { + self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/200/content/application\/json`. - case json(Components.Schemas.GitHubAccount) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.GitHubAccount { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.AddGithubAccount.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.AddGithubAccount.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/200`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.AddGithubAccount.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteEventSource.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.AddGithubAccount.Output.Ok { + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteEventSource.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41082,26 +41243,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AddGithubAccount.Output.BadRequest.Body + public var body: Operations.DeleteEventSource.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AddGithubAccount.Output.BadRequest.Body) { + public init(body: Operations.DeleteEventSource.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/400`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.AddGithubAccount.Output.BadRequest) + case badRequest(Operations.DeleteEventSource.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.AddGithubAccount.Output.BadRequest { + public var badRequest: Operations.DeleteEventSource.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -41115,9 +41276,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -41133,26 +41294,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AddGithubAccount.Output.Unauthorized.Body + public var body: Operations.DeleteEventSource.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AddGithubAccount.Output.Unauthorized.Body) { + public init(body: Operations.DeleteEventSource.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/401`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.AddGithubAccount.Output.Unauthorized) + case unauthorized(Operations.DeleteEventSource.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.AddGithubAccount.Output.Unauthorized { + public var unauthorized: Operations.DeleteEventSource.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -41166,9 +41327,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41184,26 +41345,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AddGithubAccount.Output.NotFound.Body + public var body: Operations.DeleteEventSource.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AddGithubAccount.Output.NotFound.Body) { + public init(body: Operations.DeleteEventSource.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/404`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.AddGithubAccount.Output.NotFound) + case notFound(Operations.DeleteEventSource.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.AddGithubAccount.Output.NotFound { + public var notFound: Operations.DeleteEventSource.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -41217,9 +41378,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41235,26 +41396,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AddGithubAccount.Output.MethodNotAllowed.Body + public var body: Operations.DeleteEventSource.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AddGithubAccount.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteEventSource.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/405`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.AddGithubAccount.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteEventSource.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.AddGithubAccount.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteEventSource.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -41268,9 +41429,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41286,26 +41447,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AddGithubAccount.Output.Conflict.Body + public var body: Operations.DeleteEventSource.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AddGithubAccount.Output.Conflict.Body) { + public init(body: Operations.DeleteEventSource.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/409`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.AddGithubAccount.Output.Conflict) + case conflict(Operations.DeleteEventSource.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.AddGithubAccount.Output.Conflict { + public var conflict: Operations.DeleteEventSource.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -41319,9 +41480,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -41337,26 +41498,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AddGithubAccount.Output.ContentTooLarge.Body + public var body: Operations.DeleteEventSource.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AddGithubAccount.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteEventSource.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/413`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.AddGithubAccount.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteEventSource.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.AddGithubAccount.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteEventSource.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -41370,9 +41531,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41388,26 +41549,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AddGithubAccount.Output.InternalServerError.Body + public var body: Operations.DeleteEventSource.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AddGithubAccount.Output.InternalServerError.Body) { + public init(body: Operations.DeleteEventSource.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/500`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.AddGithubAccount.Output.InternalServerError) + case internalServerError(Operations.DeleteEventSource.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.AddGithubAccount.Output.InternalServerError { + public var internalServerError: Operations.DeleteEventSource.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -41421,9 +41582,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/event-sources/{id}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41439,26 +41600,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AddGithubAccount.Output.ServiceUnavailable.Body + public var body: Operations.DeleteEventSource.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AddGithubAccount.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteEventSource.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/503`. + /// - Remark: Generated from `#/paths//v1/event-sources/{id}/delete(deleteEventSource)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.AddGithubAccount.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteEventSource.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.AddGithubAccount.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteEventSource.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -41508,91 +41669,89 @@ public enum Operations { } } } - /// Forgets the machine account and its token, and takes GH_TOKEN from bots left without an installed App. The user stays on GitHub. + /// Server-sent events. Each activity event carries a ReplyEvent or ChatPreviewEvent JSON object in data. Each learned event carries a LearnedEvent: what a bot's review of one turn changed; GET /v1/agents/{id}/reviews lists them durably. Current chat previews replay on connection; finished replies and learned events are not replayed. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. No Last-Event-ID replay. /// - /// - Remark: HTTP `DELETE /v1/github-accounts/{id}`. - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)`. - public enum DeleteGithubAccount { - public static let id: Swift.String = "deleteGithubAccount" + /// - Remark: HTTP `GET /v1/events`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)`. + public enum StreamActivityEvents { + public static let id: Swift.String = "streamActivityEvents" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.DeleteGithubAccount.Input.Path - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/header`. + /// - Remark: Generated from `#/paths/v1/events/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteGithubAccount.Input.Headers + public var headers: Operations.StreamActivityEvents.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - public init( - path: Operations.DeleteGithubAccount.Input.Path, - headers: Operations.DeleteGithubAccount.Input.Headers = .init() - ) { - self.path = path + public init(headers: Operations.StreamActivityEvents.Input.Headers = .init()) { self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/events/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/events/GET/responses/200/content/text\/event-stream`. + case textEventStream(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.textEventStream`. + /// + /// - Throws: An error if `self` is not `.textEventStream`. + /// - SeeAlso: `.textEventStream`. + public var textEventStream: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .textEventStream(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StreamActivityEvents.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StreamActivityEvents.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteGithubAccount.Output.NoContent) - /// Success, no response body + /// SSE stream, not a JSON array /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/204`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.StreamActivityEvents.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteGithubAccount.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.StreamActivityEvents.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41608,26 +41767,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubAccount.Output.BadRequest.Body + public var body: Operations.StreamActivityEvents.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubAccount.Output.BadRequest.Body) { + public init(body: Operations.StreamActivityEvents.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/400`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteGithubAccount.Output.BadRequest) + case badRequest(Operations.StreamActivityEvents.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteGithubAccount.Output.BadRequest { + public var badRequest: Operations.StreamActivityEvents.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -41641,9 +41800,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -41659,26 +41818,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubAccount.Output.Unauthorized.Body + public var body: Operations.StreamActivityEvents.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubAccount.Output.Unauthorized.Body) { + public init(body: Operations.StreamActivityEvents.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/401`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteGithubAccount.Output.Unauthorized) + case unauthorized(Operations.StreamActivityEvents.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteGithubAccount.Output.Unauthorized { + public var unauthorized: Operations.StreamActivityEvents.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -41692,9 +41851,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41710,26 +41869,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubAccount.Output.NotFound.Body + public var body: Operations.StreamActivityEvents.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubAccount.Output.NotFound.Body) { + public init(body: Operations.StreamActivityEvents.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/404`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteGithubAccount.Output.NotFound) + case notFound(Operations.StreamActivityEvents.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteGithubAccount.Output.NotFound { + public var notFound: Operations.StreamActivityEvents.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -41743,9 +41902,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41761,26 +41920,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubAccount.Output.MethodNotAllowed.Body + public var body: Operations.StreamActivityEvents.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubAccount.Output.MethodNotAllowed.Body) { + public init(body: Operations.StreamActivityEvents.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/405`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteGithubAccount.Output.MethodNotAllowed) + case methodNotAllowed(Operations.StreamActivityEvents.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteGithubAccount.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.StreamActivityEvents.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -41794,9 +41953,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41812,26 +41971,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubAccount.Output.Conflict.Body + public var body: Operations.StreamActivityEvents.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubAccount.Output.Conflict.Body) { + public init(body: Operations.StreamActivityEvents.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/409`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteGithubAccount.Output.Conflict) + case conflict(Operations.StreamActivityEvents.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteGithubAccount.Output.Conflict { + public var conflict: Operations.StreamActivityEvents.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -41845,9 +42004,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -41863,26 +42022,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubAccount.Output.ContentTooLarge.Body + public var body: Operations.StreamActivityEvents.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubAccount.Output.ContentTooLarge.Body) { + public init(body: Operations.StreamActivityEvents.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/413`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteGithubAccount.Output.ContentTooLarge) + case contentTooLarge(Operations.StreamActivityEvents.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteGithubAccount.Output.ContentTooLarge { + public var contentTooLarge: Operations.StreamActivityEvents.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -41896,9 +42055,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41914,26 +42073,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubAccount.Output.InternalServerError.Body + public var body: Operations.StreamActivityEvents.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubAccount.Output.InternalServerError.Body) { + public init(body: Operations.StreamActivityEvents.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/500`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteGithubAccount.Output.InternalServerError) + case internalServerError(Operations.StreamActivityEvents.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteGithubAccount.Output.InternalServerError { + public var internalServerError: Operations.StreamActivityEvents.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -41947,9 +42106,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/events/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -41965,26 +42124,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubAccount.Output.ServiceUnavailable.Body + public var body: Operations.StreamActivityEvents.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubAccount.Output.ServiceUnavailable.Body) { + public init(body: Operations.StreamActivityEvents.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/503`. + /// - Remark: Generated from `#/paths//v1/events/get(streamActivityEvents)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteGithubAccount.Output.ServiceUnavailable) + case serviceUnavailable(Operations.StreamActivityEvents.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteGithubAccount.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.StreamActivityEvents.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -42003,11 +42162,14 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } @frozen public enum AcceptableContentType: AcceptableProtocol { + case textEventStream case json case plainText case other(Swift.String) public init?(rawValue: Swift.String) { switch rawValue.lowercased() { + case "text/event-stream": + self = .textEventStream case "application/json": self = .json case "text/plain": @@ -42020,6 +42182,8 @@ public enum Operations { switch self { case let .other(string): return string + case .textEventStream: + return "text/event-stream" case .json: return "application/json" case .plainText: @@ -42028,102 +42192,67 @@ public enum Operations { } public static var allCases: [Self] { [ + .textEventStream, .json, .plainText ] } } } - /// Replaces the bots that act as the machine account, giving them GH_TOKEN. A bot acts as at most one; 409 when a bot already acts as another. - /// - /// - Remark: HTTP `PUT /v1/github-accounts/{id}/bots`. - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)`. - public enum SetGithubAccountBots { - public static let id: Swift.String = "setGithubAccountBots" + /// - Remark: HTTP `GET /v1/executions`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)`. + public enum ListExecutions { + public static let id: Swift.String = "listExecutions" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/path/id`. - public var id: Swift.String - /// Creates a new `Path`. + /// - Remark: Generated from `#/paths/v1/executions/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/executions/GET/query/agentId`. + public var agentId: Swift.String? + /// Creates a new `Query`. /// /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id + /// - agentId: + public init(agentId: Swift.String? = nil) { + self.agentId = agentId } } - public var path: Operations.SetGithubAccountBots.Input.Path - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/header`. + public var query: Operations.ListExecutions.Input.Query + /// - Remark: Generated from `#/paths/v1/executions/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SetGithubAccountBots.Input.Headers - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/requestBody/json/botIds`. - public var botIds: [Swift.String] - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - botIds: - public init(botIds: [Swift.String]) { - self.botIds = botIds - } - public enum CodingKeys: String, CodingKey { - case botIds - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.botIds = try container.decode( - [Swift.String].self, - forKey: .botIds - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "botIds" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/requestBody/content/application\/json`. - case json(Operations.SetGithubAccountBots.Input.Body.JsonPayload) - } - public var body: Operations.SetGithubAccountBots.Input.Body + public var headers: Operations.ListExecutions.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: + /// - query: /// - headers: - /// - body: public init( - path: Operations.SetGithubAccountBots.Input.Path, - headers: Operations.SetGithubAccountBots.Input.Headers = .init(), - body: Operations.SetGithubAccountBots.Input.Body + query: Operations.ListExecutions.Input.Query = .init(), + headers: Operations.ListExecutions.Input.Headers = .init() ) { - self.path = path + self.query = query self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.GitHubAccount) + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/200/content/application\/json`. + case json([Components.Schemas.Execution]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.GitHubAccount { + public var json: [Components.Schemas.Execution] { get throws { switch self { case let .json(body): @@ -42133,26 +42262,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountBots.Output.Ok.Body + public var body: Operations.ListExecutions.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountBots.Output.Ok.Body) { + public init(body: Operations.ListExecutions.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/200`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.SetGithubAccountBots.Output.Ok) + case ok(Operations.ListExecutions.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.SetGithubAccountBots.Output.Ok { + public var ok: Operations.ListExecutions.Output.Ok { get throws { switch self { case let .ok(response): @@ -42166,9 +42295,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -42184,26 +42313,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountBots.Output.BadRequest.Body + public var body: Operations.ListExecutions.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountBots.Output.BadRequest.Body) { + public init(body: Operations.ListExecutions.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/400`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SetGithubAccountBots.Output.BadRequest) + case badRequest(Operations.ListExecutions.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SetGithubAccountBots.Output.BadRequest { + public var badRequest: Operations.ListExecutions.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -42217,9 +42346,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -42235,26 +42364,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountBots.Output.Unauthorized.Body + public var body: Operations.ListExecutions.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountBots.Output.Unauthorized.Body) { + public init(body: Operations.ListExecutions.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/401`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SetGithubAccountBots.Output.Unauthorized) + case unauthorized(Operations.ListExecutions.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SetGithubAccountBots.Output.Unauthorized { + public var unauthorized: Operations.ListExecutions.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -42268,9 +42397,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -42286,26 +42415,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountBots.Output.NotFound.Body + public var body: Operations.ListExecutions.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountBots.Output.NotFound.Body) { + public init(body: Operations.ListExecutions.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/404`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SetGithubAccountBots.Output.NotFound) + case notFound(Operations.ListExecutions.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SetGithubAccountBots.Output.NotFound { + public var notFound: Operations.ListExecutions.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -42319,9 +42448,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -42337,26 +42466,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountBots.Output.MethodNotAllowed.Body + public var body: Operations.ListExecutions.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountBots.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListExecutions.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/405`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SetGithubAccountBots.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListExecutions.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SetGithubAccountBots.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListExecutions.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -42370,9 +42499,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -42388,26 +42517,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountBots.Output.Conflict.Body + public var body: Operations.ListExecutions.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountBots.Output.Conflict.Body) { + public init(body: Operations.ListExecutions.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/409`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SetGithubAccountBots.Output.Conflict) + case conflict(Operations.ListExecutions.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SetGithubAccountBots.Output.Conflict { + public var conflict: Operations.ListExecutions.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -42421,9 +42550,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -42439,26 +42568,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountBots.Output.ContentTooLarge.Body + public var body: Operations.ListExecutions.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountBots.Output.ContentTooLarge.Body) { + public init(body: Operations.ListExecutions.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/413`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SetGithubAccountBots.Output.ContentTooLarge) + case contentTooLarge(Operations.ListExecutions.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SetGithubAccountBots.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListExecutions.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -42472,9 +42601,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -42490,26 +42619,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountBots.Output.InternalServerError.Body + public var body: Operations.ListExecutions.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountBots.Output.InternalServerError.Body) { + public init(body: Operations.ListExecutions.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/500`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SetGithubAccountBots.Output.InternalServerError) + case internalServerError(Operations.ListExecutions.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SetGithubAccountBots.Output.InternalServerError { + public var internalServerError: Operations.ListExecutions.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -42523,9 +42652,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/executions/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -42541,26 +42670,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountBots.Output.ServiceUnavailable.Body + public var body: Operations.ListExecutions.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountBots.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListExecutions.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/503`. + /// - Remark: Generated from `#/paths//v1/executions/get(listExecutions)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SetGithubAccountBots.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListExecutions.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SetGithubAccountBots.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListExecutions.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -42610,137 +42739,59 @@ public enum Operations { } } } - /// Replaces the machine account's token. 400 when GitHub refuses it or it signs in as another user. + /// The account's machine accounts: GitHub users made for bots. A bot acts as its machine account wherever none of its GitHub Apps does. /// - /// - Remark: HTTP `PUT /v1/github-accounts/{id}/token`. - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)`. - public enum SetGithubAccountToken { - public static let id: Swift.String = "setGithubAccountToken" + /// - Remark: HTTP `GET /v1/github-accounts`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)`. + public enum ListGithubAccounts { + public static let id: Swift.String = "listGithubAccounts" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.SetGithubAccountToken.Input.Path - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/header`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SetGithubAccountToken.Input.Headers - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/reference/passwordManager`. - public var passwordManager: Operations.SetGithubAccountToken.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.SetGithubAccountToken.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/reference`. - public var reference: Operations.SetGithubAccountToken.Input.Body.JsonPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/value`. - public var value: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.SetGithubAccountToken.Input.Body.JsonPayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.SetGithubAccountToken.Input.Body.JsonPayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/content/application\/json`. - case json(Operations.SetGithubAccountToken.Input.Body.JsonPayload) - } - public var body: Operations.SetGithubAccountToken.Input.Body + public var headers: Operations.ListGithubAccounts.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - /// - body: - public init( - path: Operations.SetGithubAccountToken.Input.Path, - headers: Operations.SetGithubAccountToken.Input.Headers = .init(), - body: Operations.SetGithubAccountToken.Input.Body - ) { - self.path = path + public init(headers: Operations.ListGithubAccounts.Input.Headers = .init()) { self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.GitHubAccount) + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/200/content/json/accounts`. + public var accounts: [Components.Schemas.GitHubAccount] + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - accounts: + public init(accounts: [Components.Schemas.GitHubAccount]) { + self.accounts = accounts + } + public enum CodingKeys: String, CodingKey { + case accounts + } + } + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/200/content/application\/json`. + case json(Operations.ListGithubAccounts.Output.Ok.Body.JsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.GitHubAccount { + public var json: Operations.ListGithubAccounts.Output.Ok.Body.JsonPayload { get throws { switch self { case let .json(body): @@ -42750,26 +42801,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountToken.Output.Ok.Body + public var body: Operations.ListGithubAccounts.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountToken.Output.Ok.Body) { + public init(body: Operations.ListGithubAccounts.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.SetGithubAccountToken.Output.Ok) + case ok(Operations.ListGithubAccounts.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.SetGithubAccountToken.Output.Ok { + public var ok: Operations.ListGithubAccounts.Output.Ok { get throws { switch self { case let .ok(response): @@ -42783,9 +42834,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -42801,26 +42852,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountToken.Output.BadRequest.Body + public var body: Operations.ListGithubAccounts.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountToken.Output.BadRequest.Body) { + public init(body: Operations.ListGithubAccounts.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SetGithubAccountToken.Output.BadRequest) + case badRequest(Operations.ListGithubAccounts.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SetGithubAccountToken.Output.BadRequest { + public var badRequest: Operations.ListGithubAccounts.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -42834,9 +42885,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -42852,26 +42903,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountToken.Output.Unauthorized.Body + public var body: Operations.ListGithubAccounts.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountToken.Output.Unauthorized.Body) { + public init(body: Operations.ListGithubAccounts.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SetGithubAccountToken.Output.Unauthorized) + case unauthorized(Operations.ListGithubAccounts.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SetGithubAccountToken.Output.Unauthorized { + public var unauthorized: Operations.ListGithubAccounts.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -42885,9 +42936,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -42903,26 +42954,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountToken.Output.NotFound.Body + public var body: Operations.ListGithubAccounts.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountToken.Output.NotFound.Body) { + public init(body: Operations.ListGithubAccounts.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SetGithubAccountToken.Output.NotFound) + case notFound(Operations.ListGithubAccounts.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SetGithubAccountToken.Output.NotFound { + public var notFound: Operations.ListGithubAccounts.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -42936,9 +42987,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -42954,26 +43005,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountToken.Output.MethodNotAllowed.Body + public var body: Operations.ListGithubAccounts.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountToken.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListGithubAccounts.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SetGithubAccountToken.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListGithubAccounts.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SetGithubAccountToken.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListGithubAccounts.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -42987,9 +43038,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -43005,26 +43056,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountToken.Output.Conflict.Body + public var body: Operations.ListGithubAccounts.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountToken.Output.Conflict.Body) { + public init(body: Operations.ListGithubAccounts.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SetGithubAccountToken.Output.Conflict) + case conflict(Operations.ListGithubAccounts.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SetGithubAccountToken.Output.Conflict { + public var conflict: Operations.ListGithubAccounts.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -43038,9 +43089,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -43056,26 +43107,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountToken.Output.ContentTooLarge.Body + public var body: Operations.ListGithubAccounts.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountToken.Output.ContentTooLarge.Body) { + public init(body: Operations.ListGithubAccounts.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SetGithubAccountToken.Output.ContentTooLarge) + case contentTooLarge(Operations.ListGithubAccounts.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SetGithubAccountToken.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListGithubAccounts.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -43089,9 +43140,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -43107,26 +43158,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountToken.Output.InternalServerError.Body + public var body: Operations.ListGithubAccounts.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountToken.Output.InternalServerError.Body) { + public init(body: Operations.ListGithubAccounts.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SetGithubAccountToken.Output.InternalServerError) + case internalServerError(Operations.ListGithubAccounts.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SetGithubAccountToken.Output.InternalServerError { + public var internalServerError: Operations.ListGithubAccounts.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -43140,9 +43191,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -43158,26 +43209,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAccountToken.Output.ServiceUnavailable.Body + public var body: Operations.ListGithubAccounts.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAccountToken.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListGithubAccounts.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-accounts/get(listGithubAccounts)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SetGithubAccountToken.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListGithubAccounts.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SetGithubAccountToken.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListGithubAccounts.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -43227,59 +43278,121 @@ public enum Operations { } } } - /// The account's GitHub Apps, each the GitHub identity its bots act through in one GitHub account's repositories. + /// Adds the GitHub user a personal access token signs in as. 400 when GitHub refuses the token; 409 when the user is already added. /// - /// - Remark: HTTP `GET /v1/github-apps`. - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)`. - public enum ListGithubApps { - public static let id: Swift.String = "listGithubApps" + /// - Remark: HTTP `POST /v1/github-accounts`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)`. + public enum AddGithubAccount { + public static let id: Swift.String = "addGithubAccount" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/header`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListGithubApps.Input.Headers + public var headers: Operations.AddGithubAccount.Input.Headers + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/reference/passwordManager`. + public var passwordManager: Operations.AddGithubAccount.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.AddGithubAccount.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/reference`. + public var reference: Operations.AddGithubAccount.Input.Body.JsonPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/json/value`. + public var value: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.AddGithubAccount.Input.Body.JsonPayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.AddGithubAccount.Input.Body.JsonPayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/requestBody/content/application\/json`. + case json(Operations.AddGithubAccount.Input.Body.JsonPayload) + } + public var body: Operations.AddGithubAccount.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - headers: - public init(headers: Operations.ListGithubApps.Input.Headers = .init()) { + /// - body: + public init( + headers: Operations.AddGithubAccount.Input.Headers = .init(), + body: Operations.AddGithubAccount.Input.Body + ) { self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/200/content/json/apps`. - public var apps: [Components.Schemas.GitHubApp] - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - apps: - public init(apps: [Components.Schemas.GitHubApp]) { - self.apps = apps - } - public enum CodingKeys: String, CodingKey { - case apps - } - } - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/200/content/application\/json`. - case json(Operations.ListGithubApps.Output.Ok.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/200/content/application\/json`. + case json(Components.Schemas.GitHubAccount) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.ListGithubApps.Output.Ok.Body.JsonPayload { + public var json: Components.Schemas.GitHubAccount { get throws { switch self { case let .json(body): @@ -43289,26 +43402,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubApps.Output.Ok.Body + public var body: Operations.AddGithubAccount.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubApps.Output.Ok.Body) { + public init(body: Operations.AddGithubAccount.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListGithubApps.Output.Ok) + case ok(Operations.AddGithubAccount.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListGithubApps.Output.Ok { + public var ok: Operations.AddGithubAccount.Output.Ok { get throws { switch self { case let .ok(response): @@ -43322,9 +43435,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -43340,26 +43453,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubApps.Output.BadRequest.Body + public var body: Operations.AddGithubAccount.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubApps.Output.BadRequest.Body) { + public init(body: Operations.AddGithubAccount.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListGithubApps.Output.BadRequest) + case badRequest(Operations.AddGithubAccount.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListGithubApps.Output.BadRequest { + public var badRequest: Operations.AddGithubAccount.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -43373,9 +43486,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -43391,26 +43504,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubApps.Output.Unauthorized.Body + public var body: Operations.AddGithubAccount.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubApps.Output.Unauthorized.Body) { + public init(body: Operations.AddGithubAccount.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListGithubApps.Output.Unauthorized) + case unauthorized(Operations.AddGithubAccount.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListGithubApps.Output.Unauthorized { + public var unauthorized: Operations.AddGithubAccount.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -43424,9 +43537,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -43442,26 +43555,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubApps.Output.NotFound.Body + public var body: Operations.AddGithubAccount.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubApps.Output.NotFound.Body) { + public init(body: Operations.AddGithubAccount.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListGithubApps.Output.NotFound) + case notFound(Operations.AddGithubAccount.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListGithubApps.Output.NotFound { + public var notFound: Operations.AddGithubAccount.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -43475,9 +43588,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -43493,26 +43606,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubApps.Output.MethodNotAllowed.Body + public var body: Operations.AddGithubAccount.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubApps.Output.MethodNotAllowed.Body) { + public init(body: Operations.AddGithubAccount.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListGithubApps.Output.MethodNotAllowed) + case methodNotAllowed(Operations.AddGithubAccount.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListGithubApps.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.AddGithubAccount.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -43526,9 +43639,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -43544,26 +43657,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubApps.Output.Conflict.Body + public var body: Operations.AddGithubAccount.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubApps.Output.Conflict.Body) { + public init(body: Operations.AddGithubAccount.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListGithubApps.Output.Conflict) + case conflict(Operations.AddGithubAccount.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListGithubApps.Output.Conflict { + public var conflict: Operations.AddGithubAccount.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -43577,9 +43690,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -43595,26 +43708,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubApps.Output.ContentTooLarge.Body + public var body: Operations.AddGithubAccount.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubApps.Output.ContentTooLarge.Body) { + public init(body: Operations.AddGithubAccount.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListGithubApps.Output.ContentTooLarge) + case contentTooLarge(Operations.AddGithubAccount.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListGithubApps.Output.ContentTooLarge { + public var contentTooLarge: Operations.AddGithubAccount.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -43628,9 +43741,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -43646,26 +43759,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubApps.Output.InternalServerError.Body + public var body: Operations.AddGithubAccount.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubApps.Output.InternalServerError.Body) { + public init(body: Operations.AddGithubAccount.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListGithubApps.Output.InternalServerError) + case internalServerError(Operations.AddGithubAccount.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListGithubApps.Output.InternalServerError { + public var internalServerError: Operations.AddGithubAccount.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -43679,9 +43792,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -43697,26 +43810,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGithubApps.Output.ServiceUnavailable.Body + public var body: Operations.AddGithubAccount.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGithubApps.Output.ServiceUnavailable.Body) { + public init(body: Operations.AddGithubAccount.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-accounts/post(addGithubAccount)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListGithubApps.Output.ServiceUnavailable) + case serviceUnavailable(Operations.AddGithubAccount.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListGithubApps.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.AddGithubAccount.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -43766,138 +43879,91 @@ public enum Operations { } } } - /// Exchanges the code GitHub redirected back with for the App's keys, within an hour of starting. 400 for a stale or reused state. + /// Forgets the machine account and its token, and takes GH_TOKEN from bots left without an installed App. The user stays on GitHub. /// - /// - Remark: HTTP `POST /v1/github-apps/complete`. - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)`. - public enum CompleteGithubApp { - public static let id: Swift.String = "completeGithubApp" + /// - Remark: HTTP `DELETE /v1/github-accounts/{id}`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)`. + public enum DeleteGithubAccount { + public static let id: Swift.String = "deleteGithubAccount" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/header`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.DeleteGithubAccount.Input.Path + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CompleteGithubApp.Input.Headers - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/requestBody/json/code`. - public var code: Swift.String - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/requestBody/json/state`. - public var state: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - code: - /// - state: - public init( - code: Swift.String, - state: Swift.String - ) { - self.code = code - self.state = state - } - public enum CodingKeys: String, CodingKey { - case code - case state - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.code = try container.decode( - Swift.String.self, - forKey: .code - ) - self.state = try container.decode( - Swift.String.self, - forKey: .state - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "code", - "state" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/requestBody/content/application\/json`. - case json(Operations.CompleteGithubApp.Input.Body.JsonPayload) - } - public var body: Operations.CompleteGithubApp.Input.Body + public var headers: Operations.DeleteGithubAccount.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - /// - body: public init( - headers: Operations.CompleteGithubApp.Input.Headers = .init(), - body: Operations.CompleteGithubApp.Input.Body + path: Operations.DeleteGithubAccount.Input.Path, + headers: Operations.DeleteGithubAccount.Input.Headers = .init() ) { + self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/200/content/application\/json`. - case json(Components.Schemas.GitHubApp) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.GitHubApp { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.CompleteGithubApp.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubApp.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.CompleteGithubApp.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteGithubAccount.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.CompleteGithubApp.Output.Ok { + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteGithubAccount.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -43913,26 +43979,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubApp.Output.BadRequest.Body + public var body: Operations.DeleteGithubAccount.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubApp.Output.BadRequest.Body) { + public init(body: Operations.DeleteGithubAccount.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CompleteGithubApp.Output.BadRequest) + case badRequest(Operations.DeleteGithubAccount.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CompleteGithubApp.Output.BadRequest { + public var badRequest: Operations.DeleteGithubAccount.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -43946,9 +44012,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -43964,26 +44030,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubApp.Output.Unauthorized.Body + public var body: Operations.DeleteGithubAccount.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubApp.Output.Unauthorized.Body) { + public init(body: Operations.DeleteGithubAccount.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CompleteGithubApp.Output.Unauthorized) + case unauthorized(Operations.DeleteGithubAccount.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CompleteGithubApp.Output.Unauthorized { + public var unauthorized: Operations.DeleteGithubAccount.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -43997,9 +44063,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44015,26 +44081,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubApp.Output.NotFound.Body + public var body: Operations.DeleteGithubAccount.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubApp.Output.NotFound.Body) { + public init(body: Operations.DeleteGithubAccount.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CompleteGithubApp.Output.NotFound) + case notFound(Operations.DeleteGithubAccount.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CompleteGithubApp.Output.NotFound { + public var notFound: Operations.DeleteGithubAccount.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -44048,9 +44114,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44066,26 +44132,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubApp.Output.MethodNotAllowed.Body + public var body: Operations.DeleteGithubAccount.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubApp.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteGithubAccount.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CompleteGithubApp.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteGithubAccount.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CompleteGithubApp.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteGithubAccount.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -44099,9 +44165,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44117,26 +44183,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubApp.Output.Conflict.Body + public var body: Operations.DeleteGithubAccount.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubApp.Output.Conflict.Body) { + public init(body: Operations.DeleteGithubAccount.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CompleteGithubApp.Output.Conflict) + case conflict(Operations.DeleteGithubAccount.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CompleteGithubApp.Output.Conflict { + public var conflict: Operations.DeleteGithubAccount.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -44150,9 +44216,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -44168,26 +44234,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubApp.Output.ContentTooLarge.Body + public var body: Operations.DeleteGithubAccount.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubApp.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteGithubAccount.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CompleteGithubApp.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteGithubAccount.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CompleteGithubApp.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteGithubAccount.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -44201,9 +44267,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44219,26 +44285,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubApp.Output.InternalServerError.Body + public var body: Operations.DeleteGithubAccount.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubApp.Output.InternalServerError.Body) { + public init(body: Operations.DeleteGithubAccount.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CompleteGithubApp.Output.InternalServerError) + case internalServerError(Operations.DeleteGithubAccount.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CompleteGithubApp.Output.InternalServerError { + public var internalServerError: Operations.DeleteGithubAccount.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -44252,9 +44318,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44270,26 +44336,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubApp.Output.ServiceUnavailable.Body + public var body: Operations.DeleteGithubAccount.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubApp.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteGithubAccount.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/delete(deleteGithubAccount)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CompleteGithubApp.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteGithubAccount.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CompleteGithubApp.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteGithubAccount.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -44339,127 +44405,96 @@ public enum Operations { } } } - /// Starts creating a private GitHub App. The client posts `manifest` as a form field to `url`; GitHub then sends the owner to `{origin}/github-app/callback` with a code and state. + /// Replaces the bots that act as the machine account, giving them GH_TOKEN. A bot acts as at most one; 409 when a bot already acts as another. /// - /// - Remark: HTTP `POST /v1/github-apps/manifest`. - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)`. - public enum CreateGithubAppManifest { - public static let id: Swift.String = "createGithubAppManifest" + /// - Remark: HTTP `PUT /v1/github-accounts/{id}/bots`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)`. + public enum SetGithubAccountBots { + public static let id: Swift.String = "setGithubAccountBots" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/header`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.SetGithubAccountBots.Input.Path + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CreateGithubAppManifest.Input.Headers - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody`. + public var headers: Operations.SetGithubAccountBots.Input.Headers + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody/json/name`. - public var name: Swift.String - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody/json/organization`. - public var organization: Swift.String? - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody/json/origin`. - public var origin: Swift.String + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/requestBody/json/botIds`. + public var botIds: [Swift.String] /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - name: - /// - organization: - /// - origin: - public init( - name: Swift.String, - organization: Swift.String? = nil, - origin: Swift.String - ) { - self.name = name - self.organization = organization - self.origin = origin + /// - botIds: + public init(botIds: [Swift.String]) { + self.botIds = botIds } public enum CodingKeys: String, CodingKey { - case name - case organization - case origin + case botIds } public init(from decoder: any Swift.Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - self.name = try container.decode( - Swift.String.self, - forKey: .name - ) - self.organization = try container.decodeIfPresent( - Swift.String.self, - forKey: .organization - ) - self.origin = try container.decode( - Swift.String.self, - forKey: .origin + self.botIds = try container.decode( + [Swift.String].self, + forKey: .botIds ) try decoder.ensureNoAdditionalProperties(knownKeys: [ - "name", - "organization", - "origin" + "botIds" ]) } } - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody/content/application\/json`. - case json(Operations.CreateGithubAppManifest.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/requestBody/content/application\/json`. + case json(Operations.SetGithubAccountBots.Input.Body.JsonPayload) } - public var body: Operations.CreateGithubAppManifest.Input.Body + public var body: Operations.SetGithubAccountBots.Input.Body /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: /// - body: public init( - headers: Operations.CreateGithubAppManifest.Input.Headers = .init(), - body: Operations.CreateGithubAppManifest.Input.Body + path: Operations.SetGithubAccountBots.Input.Path, + headers: Operations.SetGithubAccountBots.Input.Headers = .init(), + body: Operations.SetGithubAccountBots.Input.Body ) { + self.path = path self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/200/content/json/manifest`. - public var manifest: Swift.String - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/200/content/json/url`. - public var url: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - manifest: - /// - url: - public init( - manifest: Swift.String, - url: Swift.String - ) { - self.manifest = manifest - self.url = url - } - public enum CodingKeys: String, CodingKey { - case manifest - case url - } - } - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/200/content/application\/json`. - case json(Operations.CreateGithubAppManifest.Output.Ok.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.GitHubAccount) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.CreateGithubAppManifest.Output.Ok.Body.JsonPayload { + public var json: Components.Schemas.GitHubAccount { get throws { switch self { case let .json(body): @@ -44469,26 +44504,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGithubAppManifest.Output.Ok.Body + public var body: Operations.SetGithubAccountBots.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGithubAppManifest.Output.Ok.Body) { + public init(body: Operations.SetGithubAccountBots.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.CreateGithubAppManifest.Output.Ok) + case ok(Operations.SetGithubAccountBots.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.CreateGithubAppManifest.Output.Ok { + public var ok: Operations.SetGithubAccountBots.Output.Ok { get throws { switch self { case let .ok(response): @@ -44502,9 +44537,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44520,26 +44555,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGithubAppManifest.Output.BadRequest.Body + public var body: Operations.SetGithubAccountBots.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGithubAppManifest.Output.BadRequest.Body) { + public init(body: Operations.SetGithubAccountBots.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CreateGithubAppManifest.Output.BadRequest) + case badRequest(Operations.SetGithubAccountBots.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CreateGithubAppManifest.Output.BadRequest { + public var badRequest: Operations.SetGithubAccountBots.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -44553,9 +44588,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -44571,26 +44606,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGithubAppManifest.Output.Unauthorized.Body + public var body: Operations.SetGithubAccountBots.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGithubAppManifest.Output.Unauthorized.Body) { + public init(body: Operations.SetGithubAccountBots.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CreateGithubAppManifest.Output.Unauthorized) + case unauthorized(Operations.SetGithubAccountBots.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CreateGithubAppManifest.Output.Unauthorized { + public var unauthorized: Operations.SetGithubAccountBots.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -44604,9 +44639,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44622,26 +44657,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGithubAppManifest.Output.NotFound.Body + public var body: Operations.SetGithubAccountBots.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGithubAppManifest.Output.NotFound.Body) { + public init(body: Operations.SetGithubAccountBots.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CreateGithubAppManifest.Output.NotFound) + case notFound(Operations.SetGithubAccountBots.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CreateGithubAppManifest.Output.NotFound { + public var notFound: Operations.SetGithubAccountBots.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -44655,9 +44690,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44673,26 +44708,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGithubAppManifest.Output.MethodNotAllowed.Body + public var body: Operations.SetGithubAccountBots.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGithubAppManifest.Output.MethodNotAllowed.Body) { + public init(body: Operations.SetGithubAccountBots.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CreateGithubAppManifest.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SetGithubAccountBots.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CreateGithubAppManifest.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SetGithubAccountBots.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -44706,9 +44741,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44724,26 +44759,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGithubAppManifest.Output.Conflict.Body + public var body: Operations.SetGithubAccountBots.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGithubAppManifest.Output.Conflict.Body) { + public init(body: Operations.SetGithubAccountBots.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CreateGithubAppManifest.Output.Conflict) + case conflict(Operations.SetGithubAccountBots.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CreateGithubAppManifest.Output.Conflict { + public var conflict: Operations.SetGithubAccountBots.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -44757,9 +44792,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -44775,26 +44810,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGithubAppManifest.Output.ContentTooLarge.Body + public var body: Operations.SetGithubAccountBots.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGithubAppManifest.Output.ContentTooLarge.Body) { + public init(body: Operations.SetGithubAccountBots.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CreateGithubAppManifest.Output.ContentTooLarge) + case contentTooLarge(Operations.SetGithubAccountBots.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CreateGithubAppManifest.Output.ContentTooLarge { + public var contentTooLarge: Operations.SetGithubAccountBots.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -44808,9 +44843,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44826,26 +44861,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGithubAppManifest.Output.InternalServerError.Body + public var body: Operations.SetGithubAccountBots.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGithubAppManifest.Output.InternalServerError.Body) { + public init(body: Operations.SetGithubAccountBots.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CreateGithubAppManifest.Output.InternalServerError) + case internalServerError(Operations.SetGithubAccountBots.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CreateGithubAppManifest.Output.InternalServerError { + public var internalServerError: Operations.SetGithubAccountBots.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -44859,9 +44894,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/bots/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -44877,26 +44912,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGithubAppManifest.Output.ServiceUnavailable.Body + public var body: Operations.SetGithubAccountBots.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGithubAppManifest.Output.ServiceUnavailable.Body) { + public init(body: Operations.SetGithubAccountBots.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/bots/put(setGithubAccountBots)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CreateGithubAppManifest.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SetGithubAccountBots.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CreateGithubAppManifest.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SetGithubAccountBots.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -44946,93 +44981,137 @@ public enum Operations { } } } - /// Exchanges the code GitHub sent the owner back with for the owner's tokens, within ten minutes of starting. 400 for a stale or reused state or a refused sign-in. + /// Replaces the machine account's token. 400 when GitHub refuses it or it signs in as another user. /// - /// - Remark: HTTP `POST /v1/github-apps/sign-in/complete`. - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)`. - public enum CompleteGithubAppSignIn { - public static let id: Swift.String = "completeGithubAppSignIn" + /// - Remark: HTTP `PUT /v1/github-accounts/{id}/token`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)`. + public enum SetGithubAccountToken { + public static let id: Swift.String = "setGithubAccountToken" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/header`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.SetGithubAccountToken.Input.Path + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CompleteGithubAppSignIn.Input.Headers - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/requestBody`. + public var headers: Operations.SetGithubAccountToken.Input.Headers + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/requestBody/json/code`. - public var code: Swift.String - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/requestBody/json/state`. - public var state: Swift.String + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/reference/passwordManager`. + public var passwordManager: Operations.SetGithubAccountToken.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.SetGithubAccountToken.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/reference`. + public var reference: Operations.SetGithubAccountToken.Input.Body.JsonPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/json/value`. + public var value: Swift.String? /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - code: - /// - state: + /// - reference: + /// - value: public init( - code: Swift.String, - state: Swift.String + reference: Operations.SetGithubAccountToken.Input.Body.JsonPayload.ReferencePayload? = nil, + value: Swift.String? = nil ) { - self.code = code - self.state = state + self.reference = reference + self.value = value } public enum CodingKeys: String, CodingKey { - case code - case state + case reference + case value } public init(from decoder: any Swift.Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - self.code = try container.decode( - Swift.String.self, - forKey: .code + self.reference = try container.decodeIfPresent( + Operations.SetGithubAccountToken.Input.Body.JsonPayload.ReferencePayload.self, + forKey: .reference ) - self.state = try container.decode( + self.value = try container.decodeIfPresent( Swift.String.self, - forKey: .state + forKey: .value ) try decoder.ensureNoAdditionalProperties(knownKeys: [ - "code", - "state" + "reference", + "value" ]) } } - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/requestBody/content/application\/json`. - case json(Operations.CompleteGithubAppSignIn.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/requestBody/content/application\/json`. + case json(Operations.SetGithubAccountToken.Input.Body.JsonPayload) } - public var body: Operations.CompleteGithubAppSignIn.Input.Body + public var body: Operations.SetGithubAccountToken.Input.Body /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: /// - body: public init( - headers: Operations.CompleteGithubAppSignIn.Input.Headers = .init(), - body: Operations.CompleteGithubAppSignIn.Input.Body + path: Operations.SetGithubAccountToken.Input.Path, + headers: Operations.SetGithubAccountToken.Input.Headers = .init(), + body: Operations.SetGithubAccountToken.Input.Body ) { + self.path = path self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/200/content/application\/json`. - case json(Components.Schemas.GitHubApp) + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.GitHubAccount) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.GitHubApp { + public var json: Components.Schemas.GitHubAccount { get throws { switch self { case let .json(body): @@ -45042,26 +45121,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubAppSignIn.Output.Ok.Body + public var body: Operations.SetGithubAccountToken.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubAppSignIn.Output.Ok.Body) { + public init(body: Operations.SetGithubAccountToken.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.CompleteGithubAppSignIn.Output.Ok) + case ok(Operations.SetGithubAccountToken.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.CompleteGithubAppSignIn.Output.Ok { + public var ok: Operations.SetGithubAccountToken.Output.Ok { get throws { switch self { case let .ok(response): @@ -45075,9 +45154,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45093,26 +45172,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubAppSignIn.Output.BadRequest.Body + public var body: Operations.SetGithubAccountToken.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubAppSignIn.Output.BadRequest.Body) { + public init(body: Operations.SetGithubAccountToken.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CompleteGithubAppSignIn.Output.BadRequest) + case badRequest(Operations.SetGithubAccountToken.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CompleteGithubAppSignIn.Output.BadRequest { + public var badRequest: Operations.SetGithubAccountToken.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -45126,9 +45205,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -45144,26 +45223,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubAppSignIn.Output.Unauthorized.Body + public var body: Operations.SetGithubAccountToken.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubAppSignIn.Output.Unauthorized.Body) { + public init(body: Operations.SetGithubAccountToken.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CompleteGithubAppSignIn.Output.Unauthorized) + case unauthorized(Operations.SetGithubAccountToken.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CompleteGithubAppSignIn.Output.Unauthorized { + public var unauthorized: Operations.SetGithubAccountToken.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -45177,9 +45256,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45195,26 +45274,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubAppSignIn.Output.NotFound.Body + public var body: Operations.SetGithubAccountToken.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubAppSignIn.Output.NotFound.Body) { + public init(body: Operations.SetGithubAccountToken.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CompleteGithubAppSignIn.Output.NotFound) + case notFound(Operations.SetGithubAccountToken.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CompleteGithubAppSignIn.Output.NotFound { + public var notFound: Operations.SetGithubAccountToken.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -45228,9 +45307,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45246,26 +45325,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubAppSignIn.Output.MethodNotAllowed.Body + public var body: Operations.SetGithubAccountToken.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubAppSignIn.Output.MethodNotAllowed.Body) { + public init(body: Operations.SetGithubAccountToken.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CompleteGithubAppSignIn.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SetGithubAccountToken.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CompleteGithubAppSignIn.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SetGithubAccountToken.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -45279,9 +45358,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45297,26 +45376,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubAppSignIn.Output.Conflict.Body + public var body: Operations.SetGithubAccountToken.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubAppSignIn.Output.Conflict.Body) { + public init(body: Operations.SetGithubAccountToken.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CompleteGithubAppSignIn.Output.Conflict) + case conflict(Operations.SetGithubAccountToken.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CompleteGithubAppSignIn.Output.Conflict { + public var conflict: Operations.SetGithubAccountToken.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -45330,9 +45409,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -45348,26 +45427,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubAppSignIn.Output.ContentTooLarge.Body + public var body: Operations.SetGithubAccountToken.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubAppSignIn.Output.ContentTooLarge.Body) { + public init(body: Operations.SetGithubAccountToken.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CompleteGithubAppSignIn.Output.ContentTooLarge) + case contentTooLarge(Operations.SetGithubAccountToken.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CompleteGithubAppSignIn.Output.ContentTooLarge { + public var contentTooLarge: Operations.SetGithubAccountToken.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -45381,9 +45460,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45399,26 +45478,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubAppSignIn.Output.InternalServerError.Body + public var body: Operations.SetGithubAccountToken.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubAppSignIn.Output.InternalServerError.Body) { + public init(body: Operations.SetGithubAccountToken.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CompleteGithubAppSignIn.Output.InternalServerError) + case internalServerError(Operations.SetGithubAccountToken.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CompleteGithubAppSignIn.Output.InternalServerError { + public var internalServerError: Operations.SetGithubAccountToken.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -45432,9 +45511,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-accounts/{id}/token/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45450,26 +45529,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CompleteGithubAppSignIn.Output.ServiceUnavailable.Body + public var body: Operations.SetGithubAccountToken.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CompleteGithubAppSignIn.Output.ServiceUnavailable.Body) { + public init(body: Operations.SetGithubAccountToken.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-accounts/{id}/token/put(setGithubAccountToken)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CompleteGithubAppSignIn.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SetGithubAccountToken.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CompleteGithubAppSignIn.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SetGithubAccountToken.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -45519,91 +45598,104 @@ public enum Operations { } } } - /// Forgets the App, signs the owner out of it, and takes GH_TOKEN from bots left without an installed App. The App stays on GitHub until the owner deletes it there. + /// The account's GitHub Apps, each the GitHub identity its bots act through in one GitHub account's repositories. /// - /// - Remark: HTTP `DELETE /v1/github-apps/{id}`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)`. - public enum DeleteGithubApp { - public static let id: Swift.String = "deleteGithubApp" + /// - Remark: HTTP `GET /v1/github-apps`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)`. + public enum ListGithubApps { + public static let id: Swift.String = "listGithubApps" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.DeleteGithubApp.Input.Path - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/header`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteGithubApp.Input.Headers + public var headers: Operations.ListGithubApps.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - public init( - path: Operations.DeleteGithubApp.Input.Path, - headers: Operations.DeleteGithubApp.Input.Headers = .init() - ) { - self.path = path + public init(headers: Operations.ListGithubApps.Input.Headers = .init()) { self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/200/content/json/apps`. + public var apps: [Components.Schemas.GitHubApp] + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - apps: + public init(apps: [Components.Schemas.GitHubApp]) { + self.apps = apps + } + public enum CodingKeys: String, CodingKey { + case apps + } + } + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/200/content/application\/json`. + case json(Operations.ListGithubApps.Output.Ok.Body.JsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.ListGithubApps.Output.Ok.Body.JsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListGithubApps.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListGithubApps.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteGithubApp.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/204`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.ListGithubApps.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteGithubApp.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ListGithubApps.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45619,26 +45711,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubApp.Output.BadRequest.Body + public var body: Operations.ListGithubApps.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubApp.Output.BadRequest.Body) { + public init(body: Operations.ListGithubApps.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteGithubApp.Output.BadRequest) + case badRequest(Operations.ListGithubApps.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteGithubApp.Output.BadRequest { + public var badRequest: Operations.ListGithubApps.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -45652,9 +45744,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -45670,26 +45762,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubApp.Output.Unauthorized.Body + public var body: Operations.ListGithubApps.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubApp.Output.Unauthorized.Body) { + public init(body: Operations.ListGithubApps.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteGithubApp.Output.Unauthorized) + case unauthorized(Operations.ListGithubApps.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteGithubApp.Output.Unauthorized { + public var unauthorized: Operations.ListGithubApps.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -45703,9 +45795,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45721,26 +45813,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubApp.Output.NotFound.Body + public var body: Operations.ListGithubApps.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubApp.Output.NotFound.Body) { + public init(body: Operations.ListGithubApps.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteGithubApp.Output.NotFound) + case notFound(Operations.ListGithubApps.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteGithubApp.Output.NotFound { + public var notFound: Operations.ListGithubApps.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -45754,9 +45846,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45772,26 +45864,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubApp.Output.MethodNotAllowed.Body + public var body: Operations.ListGithubApps.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubApp.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListGithubApps.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteGithubApp.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListGithubApps.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteGithubApp.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListGithubApps.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -45805,9 +45897,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45823,26 +45915,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubApp.Output.Conflict.Body + public var body: Operations.ListGithubApps.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubApp.Output.Conflict.Body) { + public init(body: Operations.ListGithubApps.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteGithubApp.Output.Conflict) + case conflict(Operations.ListGithubApps.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteGithubApp.Output.Conflict { + public var conflict: Operations.ListGithubApps.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -45856,9 +45948,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -45874,26 +45966,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubApp.Output.ContentTooLarge.Body + public var body: Operations.ListGithubApps.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubApp.Output.ContentTooLarge.Body) { + public init(body: Operations.ListGithubApps.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteGithubApp.Output.ContentTooLarge) + case contentTooLarge(Operations.ListGithubApps.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteGithubApp.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListGithubApps.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -45907,9 +45999,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45925,26 +46017,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubApp.Output.InternalServerError.Body + public var body: Operations.ListGithubApps.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubApp.Output.InternalServerError.Body) { + public init(body: Operations.ListGithubApps.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteGithubApp.Output.InternalServerError) + case internalServerError(Operations.ListGithubApps.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteGithubApp.Output.InternalServerError { + public var internalServerError: Operations.ListGithubApps.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -45958,9 +46050,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -45976,26 +46068,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGithubApp.Output.ServiceUnavailable.Body + public var body: Operations.ListGithubApps.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGithubApp.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListGithubApps.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-apps/get(listGithubApps)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteGithubApp.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListGithubApps.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteGithubApp.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListGithubApps.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -46045,90 +46137,87 @@ public enum Operations { } } } - /// Replaces the bots that act through the App. A bot uses at most one App per GitHub account; 409 when a bot already uses another App for this App's account. + /// Exchanges the code GitHub redirected back with for the App's keys, within an hour of starting. 400 for a stale or reused state. /// - /// - Remark: HTTP `PUT /v1/github-apps/{id}/bots`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)`. - public enum SetGithubAppBots { - public static let id: Swift.String = "setGithubAppBots" + /// - Remark: HTTP `POST /v1/github-apps/complete`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)`. + public enum CompleteGithubApp { + public static let id: Swift.String = "completeGithubApp" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.SetGithubAppBots.Input.Path - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/header`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SetGithubAppBots.Input.Headers - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/requestBody`. + public var headers: Operations.CompleteGithubApp.Input.Headers + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/requestBody/json/botIds`. - public var botIds: [Swift.String] + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/requestBody/json/code`. + public var code: Swift.String + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/requestBody/json/state`. + public var state: Swift.String /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - botIds: - public init(botIds: [Swift.String]) { - self.botIds = botIds + /// - code: + /// - state: + public init( + code: Swift.String, + state: Swift.String + ) { + self.code = code + self.state = state } public enum CodingKeys: String, CodingKey { - case botIds + case code + case state } public init(from decoder: any Swift.Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - self.botIds = try container.decode( - [Swift.String].self, - forKey: .botIds + self.code = try container.decode( + Swift.String.self, + forKey: .code + ) + self.state = try container.decode( + Swift.String.self, + forKey: .state ) try decoder.ensureNoAdditionalProperties(knownKeys: [ - "botIds" + "code", + "state" ]) } } - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/requestBody/content/application\/json`. - case json(Operations.SetGithubAppBots.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/requestBody/content/application\/json`. + case json(Operations.CompleteGithubApp.Input.Body.JsonPayload) } - public var body: Operations.SetGithubAppBots.Input.Body + public var body: Operations.CompleteGithubApp.Input.Body /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: /// - body: public init( - path: Operations.SetGithubAppBots.Input.Path, - headers: Operations.SetGithubAppBots.Input.Headers = .init(), - body: Operations.SetGithubAppBots.Input.Body + headers: Operations.CompleteGithubApp.Input.Headers = .init(), + body: Operations.CompleteGithubApp.Input.Body ) { - self.path = path self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/200/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/200/content/application\/json`. case json(Components.Schemas.GitHubApp) /// The associated value of the enum case if `self` is `.json`. /// @@ -46144,26 +46233,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppBots.Output.Ok.Body + public var body: Operations.CompleteGithubApp.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppBots.Output.Ok.Body) { + public init(body: Operations.CompleteGithubApp.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.SetGithubAppBots.Output.Ok) + case ok(Operations.CompleteGithubApp.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.SetGithubAppBots.Output.Ok { + public var ok: Operations.CompleteGithubApp.Output.Ok { get throws { switch self { case let .ok(response): @@ -46177,9 +46266,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -46195,26 +46284,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppBots.Output.BadRequest.Body + public var body: Operations.CompleteGithubApp.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppBots.Output.BadRequest.Body) { + public init(body: Operations.CompleteGithubApp.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SetGithubAppBots.Output.BadRequest) + case badRequest(Operations.CompleteGithubApp.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SetGithubAppBots.Output.BadRequest { + public var badRequest: Operations.CompleteGithubApp.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -46228,9 +46317,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -46246,26 +46335,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppBots.Output.Unauthorized.Body + public var body: Operations.CompleteGithubApp.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppBots.Output.Unauthorized.Body) { + public init(body: Operations.CompleteGithubApp.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SetGithubAppBots.Output.Unauthorized) + case unauthorized(Operations.CompleteGithubApp.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SetGithubAppBots.Output.Unauthorized { + public var unauthorized: Operations.CompleteGithubApp.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -46279,9 +46368,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -46297,26 +46386,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppBots.Output.NotFound.Body + public var body: Operations.CompleteGithubApp.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppBots.Output.NotFound.Body) { + public init(body: Operations.CompleteGithubApp.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SetGithubAppBots.Output.NotFound) + case notFound(Operations.CompleteGithubApp.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SetGithubAppBots.Output.NotFound { + public var notFound: Operations.CompleteGithubApp.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -46330,9 +46419,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -46348,26 +46437,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppBots.Output.MethodNotAllowed.Body + public var body: Operations.CompleteGithubApp.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppBots.Output.MethodNotAllowed.Body) { + public init(body: Operations.CompleteGithubApp.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SetGithubAppBots.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CompleteGithubApp.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SetGithubAppBots.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CompleteGithubApp.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -46381,9 +46470,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -46399,26 +46488,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppBots.Output.Conflict.Body + public var body: Operations.CompleteGithubApp.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppBots.Output.Conflict.Body) { + public init(body: Operations.CompleteGithubApp.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SetGithubAppBots.Output.Conflict) + case conflict(Operations.CompleteGithubApp.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SetGithubAppBots.Output.Conflict { + public var conflict: Operations.CompleteGithubApp.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -46432,9 +46521,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -46450,26 +46539,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppBots.Output.ContentTooLarge.Body + public var body: Operations.CompleteGithubApp.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppBots.Output.ContentTooLarge.Body) { + public init(body: Operations.CompleteGithubApp.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SetGithubAppBots.Output.ContentTooLarge) + case contentTooLarge(Operations.CompleteGithubApp.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SetGithubAppBots.Output.ContentTooLarge { + public var contentTooLarge: Operations.CompleteGithubApp.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -46483,9 +46572,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -46501,26 +46590,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppBots.Output.InternalServerError.Body + public var body: Operations.CompleteGithubApp.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppBots.Output.InternalServerError.Body) { + public init(body: Operations.CompleteGithubApp.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SetGithubAppBots.Output.InternalServerError) + case internalServerError(Operations.CompleteGithubApp.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SetGithubAppBots.Output.InternalServerError { + public var internalServerError: Operations.CompleteGithubApp.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -46534,9 +46623,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/complete/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -46552,26 +46641,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppBots.Output.ServiceUnavailable.Body + public var body: Operations.CompleteGithubApp.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppBots.Output.ServiceUnavailable.Body) { + public init(body: Operations.CompleteGithubApp.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-apps/complete/post(completeGithubApp)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SetGithubAppBots.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CompleteGithubApp.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SetGithubAppBots.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CompleteGithubApp.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -46621,137 +46710,127 @@ public enum Operations { } } } - /// Stores a client secret generated in the App's GitHub settings, for an App created before Crumble kept it. + /// Starts creating a private GitHub App. The client posts `manifest` as a form field to `url`; GitHub then sends the owner to `{origin}/github-app/callback` with a code and state. /// - /// - Remark: HTTP `PUT /v1/github-apps/{id}/client-secret`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)`. - public enum SetGithubAppClientSecret { - public static let id: Swift.String = "setGithubAppClientSecret" + /// - Remark: HTTP `POST /v1/github-apps/manifest`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)`. + public enum CreateGithubAppManifest { + public static let id: Swift.String = "createGithubAppManifest" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.SetGithubAppClientSecret.Input.Path - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/header`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SetGithubAppClientSecret.Input.Headers - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody`. + public var headers: Operations.CreateGithubAppManifest.Input.Headers + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/reference/passwordManager`. - public var passwordManager: Operations.SetGithubAppClientSecret.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.SetGithubAppClientSecret.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/reference`. - public var reference: Operations.SetGithubAppClientSecret.Input.Body.JsonPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/value`. - public var value: Swift.String? + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody/json/name`. + public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody/json/organization`. + public var organization: Swift.String? + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody/json/origin`. + public var origin: Swift.String /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - reference: - /// - value: + /// - name: + /// - organization: + /// - origin: public init( - reference: Operations.SetGithubAppClientSecret.Input.Body.JsonPayload.ReferencePayload? = nil, - value: Swift.String? = nil + name: Swift.String, + organization: Swift.String? = nil, + origin: Swift.String ) { - self.reference = reference - self.value = value + self.name = name + self.organization = organization + self.origin = origin } public enum CodingKeys: String, CodingKey { - case reference - case value + case name + case organization + case origin } public init(from decoder: any Swift.Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.SetGithubAppClientSecret.Input.Body.JsonPayload.ReferencePayload.self, - forKey: .reference + self.name = try container.decode( + Swift.String.self, + forKey: .name ) - self.value = try container.decodeIfPresent( + self.organization = try container.decodeIfPresent( Swift.String.self, - forKey: .value + forKey: .organization + ) + self.origin = try container.decode( + Swift.String.self, + forKey: .origin ) try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" + "name", + "organization", + "origin" ]) } } - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/content/application\/json`. - case json(Operations.SetGithubAppClientSecret.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/requestBody/content/application\/json`. + case json(Operations.CreateGithubAppManifest.Input.Body.JsonPayload) } - public var body: Operations.SetGithubAppClientSecret.Input.Body + public var body: Operations.CreateGithubAppManifest.Input.Body /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: /// - body: public init( - path: Operations.SetGithubAppClientSecret.Input.Path, - headers: Operations.SetGithubAppClientSecret.Input.Headers = .init(), - body: Operations.SetGithubAppClientSecret.Input.Body + headers: Operations.CreateGithubAppManifest.Input.Headers = .init(), + body: Operations.CreateGithubAppManifest.Input.Body ) { - self.path = path self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.GitHubApp) + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/200/content/json/manifest`. + public var manifest: Swift.String + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/200/content/json/url`. + public var url: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - manifest: + /// - url: + public init( + manifest: Swift.String, + url: Swift.String + ) { + self.manifest = manifest + self.url = url + } + public enum CodingKeys: String, CodingKey { + case manifest + case url + } + } + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/200/content/application\/json`. + case json(Operations.CreateGithubAppManifest.Output.Ok.Body.JsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.GitHubApp { + public var json: Operations.CreateGithubAppManifest.Output.Ok.Body.JsonPayload { get throws { switch self { case let .json(body): @@ -46761,26 +46840,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppClientSecret.Output.Ok.Body + public var body: Operations.CreateGithubAppManifest.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppClientSecret.Output.Ok.Body) { + public init(body: Operations.CreateGithubAppManifest.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.SetGithubAppClientSecret.Output.Ok) + case ok(Operations.CreateGithubAppManifest.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.SetGithubAppClientSecret.Output.Ok { + public var ok: Operations.CreateGithubAppManifest.Output.Ok { get throws { switch self { case let .ok(response): @@ -46794,9 +46873,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -46812,26 +46891,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppClientSecret.Output.BadRequest.Body + public var body: Operations.CreateGithubAppManifest.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppClientSecret.Output.BadRequest.Body) { + public init(body: Operations.CreateGithubAppManifest.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SetGithubAppClientSecret.Output.BadRequest) + case badRequest(Operations.CreateGithubAppManifest.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SetGithubAppClientSecret.Output.BadRequest { + public var badRequest: Operations.CreateGithubAppManifest.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -46845,9 +46924,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -46863,26 +46942,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppClientSecret.Output.Unauthorized.Body + public var body: Operations.CreateGithubAppManifest.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppClientSecret.Output.Unauthorized.Body) { + public init(body: Operations.CreateGithubAppManifest.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SetGithubAppClientSecret.Output.Unauthorized) + case unauthorized(Operations.CreateGithubAppManifest.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SetGithubAppClientSecret.Output.Unauthorized { + public var unauthorized: Operations.CreateGithubAppManifest.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -46896,9 +46975,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -46914,26 +46993,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppClientSecret.Output.NotFound.Body + public var body: Operations.CreateGithubAppManifest.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppClientSecret.Output.NotFound.Body) { + public init(body: Operations.CreateGithubAppManifest.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SetGithubAppClientSecret.Output.NotFound) + case notFound(Operations.CreateGithubAppManifest.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SetGithubAppClientSecret.Output.NotFound { + public var notFound: Operations.CreateGithubAppManifest.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -46947,9 +47026,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -46965,26 +47044,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppClientSecret.Output.MethodNotAllowed.Body + public var body: Operations.CreateGithubAppManifest.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppClientSecret.Output.MethodNotAllowed.Body) { + public init(body: Operations.CreateGithubAppManifest.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SetGithubAppClientSecret.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CreateGithubAppManifest.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SetGithubAppClientSecret.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CreateGithubAppManifest.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -46998,9 +47077,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -47016,26 +47095,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppClientSecret.Output.Conflict.Body + public var body: Operations.CreateGithubAppManifest.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppClientSecret.Output.Conflict.Body) { + public init(body: Operations.CreateGithubAppManifest.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SetGithubAppClientSecret.Output.Conflict) + case conflict(Operations.CreateGithubAppManifest.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SetGithubAppClientSecret.Output.Conflict { + public var conflict: Operations.CreateGithubAppManifest.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -47049,9 +47128,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -47067,26 +47146,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppClientSecret.Output.ContentTooLarge.Body + public var body: Operations.CreateGithubAppManifest.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppClientSecret.Output.ContentTooLarge.Body) { + public init(body: Operations.CreateGithubAppManifest.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SetGithubAppClientSecret.Output.ContentTooLarge) + case contentTooLarge(Operations.CreateGithubAppManifest.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SetGithubAppClientSecret.Output.ContentTooLarge { + public var contentTooLarge: Operations.CreateGithubAppManifest.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -47100,9 +47179,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -47118,26 +47197,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppClientSecret.Output.InternalServerError.Body + public var body: Operations.CreateGithubAppManifest.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppClientSecret.Output.InternalServerError.Body) { + public init(body: Operations.CreateGithubAppManifest.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SetGithubAppClientSecret.Output.InternalServerError) + case internalServerError(Operations.CreateGithubAppManifest.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SetGithubAppClientSecret.Output.InternalServerError { + public var internalServerError: Operations.CreateGithubAppManifest.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -47151,9 +47230,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/manifest/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -47169,26 +47248,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetGithubAppClientSecret.Output.ServiceUnavailable.Body + public var body: Operations.CreateGithubAppManifest.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetGithubAppClientSecret.Output.ServiceUnavailable.Body) { + public init(body: Operations.CreateGithubAppManifest.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-apps/manifest/post(createGithubAppManifest)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SetGithubAppClientSecret.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CreateGithubAppManifest.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SetGithubAppClientSecret.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CreateGithubAppManifest.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -47238,56 +47317,87 @@ public enum Operations { } } } - /// Finds the App's installation on its account and gives its bots the GH_TOKEN credential. 409 until the owner installs the App. + /// Exchanges the code GitHub sent the owner back with for the owner's tokens, within ten minutes of starting. 400 for a stale or reused state or a refused sign-in. /// - /// - Remark: HTTP `POST /v1/github-apps/{id}/connect`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)`. - public enum ConnectGithubApp { - public static let id: Swift.String = "connectGithubApp" + /// - Remark: HTTP `POST /v1/github-apps/sign-in/complete`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)`. + public enum CompleteGithubAppSignIn { + public static let id: Swift.String = "completeGithubAppSignIn" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.ConnectGithubApp.Input.Path - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/header`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ConnectGithubApp.Input.Headers + public var headers: Operations.CompleteGithubAppSignIn.Input.Headers + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/requestBody/json/code`. + public var code: Swift.String + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/requestBody/json/state`. + public var state: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - code: + /// - state: + public init( + code: Swift.String, + state: Swift.String + ) { + self.code = code + self.state = state + } + public enum CodingKeys: String, CodingKey { + case code + case state + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.code = try container.decode( + Swift.String.self, + forKey: .code + ) + self.state = try container.decode( + Swift.String.self, + forKey: .state + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "code", + "state" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/requestBody/content/application\/json`. + case json(Operations.CompleteGithubAppSignIn.Input.Body.JsonPayload) + } + public var body: Operations.CompleteGithubAppSignIn.Input.Body /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: + /// - body: public init( - path: Operations.ConnectGithubApp.Input.Path, - headers: Operations.ConnectGithubApp.Input.Headers = .init() + headers: Operations.CompleteGithubAppSignIn.Input.Headers = .init(), + body: Operations.CompleteGithubAppSignIn.Input.Body ) { - self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/200/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/200/content/application\/json`. case json(Components.Schemas.GitHubApp) /// The associated value of the enum case if `self` is `.json`. /// @@ -47303,26 +47413,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectGithubApp.Output.Ok.Body + public var body: Operations.CompleteGithubAppSignIn.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectGithubApp.Output.Ok.Body) { + public init(body: Operations.CompleteGithubAppSignIn.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ConnectGithubApp.Output.Ok) + case ok(Operations.CompleteGithubAppSignIn.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ConnectGithubApp.Output.Ok { + public var ok: Operations.CompleteGithubAppSignIn.Output.Ok { get throws { switch self { case let .ok(response): @@ -47336,9 +47446,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -47354,26 +47464,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectGithubApp.Output.BadRequest.Body + public var body: Operations.CompleteGithubAppSignIn.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectGithubApp.Output.BadRequest.Body) { + public init(body: Operations.CompleteGithubAppSignIn.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ConnectGithubApp.Output.BadRequest) + case badRequest(Operations.CompleteGithubAppSignIn.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ConnectGithubApp.Output.BadRequest { + public var badRequest: Operations.CompleteGithubAppSignIn.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -47387,9 +47497,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -47405,26 +47515,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectGithubApp.Output.Unauthorized.Body + public var body: Operations.CompleteGithubAppSignIn.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectGithubApp.Output.Unauthorized.Body) { + public init(body: Operations.CompleteGithubAppSignIn.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ConnectGithubApp.Output.Unauthorized) + case unauthorized(Operations.CompleteGithubAppSignIn.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ConnectGithubApp.Output.Unauthorized { + public var unauthorized: Operations.CompleteGithubAppSignIn.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -47438,9 +47548,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -47456,26 +47566,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectGithubApp.Output.NotFound.Body + public var body: Operations.CompleteGithubAppSignIn.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectGithubApp.Output.NotFound.Body) { + public init(body: Operations.CompleteGithubAppSignIn.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ConnectGithubApp.Output.NotFound) + case notFound(Operations.CompleteGithubAppSignIn.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ConnectGithubApp.Output.NotFound { + public var notFound: Operations.CompleteGithubAppSignIn.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -47489,9 +47599,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -47507,26 +47617,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectGithubApp.Output.MethodNotAllowed.Body + public var body: Operations.CompleteGithubAppSignIn.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectGithubApp.Output.MethodNotAllowed.Body) { + public init(body: Operations.CompleteGithubAppSignIn.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ConnectGithubApp.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CompleteGithubAppSignIn.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ConnectGithubApp.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CompleteGithubAppSignIn.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -47540,9 +47650,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -47558,26 +47668,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectGithubApp.Output.Conflict.Body + public var body: Operations.CompleteGithubAppSignIn.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectGithubApp.Output.Conflict.Body) { + public init(body: Operations.CompleteGithubAppSignIn.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ConnectGithubApp.Output.Conflict) + case conflict(Operations.CompleteGithubAppSignIn.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ConnectGithubApp.Output.Conflict { + public var conflict: Operations.CompleteGithubAppSignIn.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -47591,9 +47701,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -47609,26 +47719,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectGithubApp.Output.ContentTooLarge.Body + public var body: Operations.CompleteGithubAppSignIn.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectGithubApp.Output.ContentTooLarge.Body) { + public init(body: Operations.CompleteGithubAppSignIn.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ConnectGithubApp.Output.ContentTooLarge) + case contentTooLarge(Operations.CompleteGithubAppSignIn.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ConnectGithubApp.Output.ContentTooLarge { + public var contentTooLarge: Operations.CompleteGithubAppSignIn.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -47642,9 +47752,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -47660,26 +47770,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectGithubApp.Output.InternalServerError.Body + public var body: Operations.CompleteGithubAppSignIn.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectGithubApp.Output.InternalServerError.Body) { + public init(body: Operations.CompleteGithubAppSignIn.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ConnectGithubApp.Output.InternalServerError) + case internalServerError(Operations.CompleteGithubAppSignIn.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ConnectGithubApp.Output.InternalServerError { + public var internalServerError: Operations.CompleteGithubAppSignIn.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -47693,9 +47803,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/sign-in/complete/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -47711,26 +47821,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectGithubApp.Output.ServiceUnavailable.Body + public var body: Operations.CompleteGithubAppSignIn.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectGithubApp.Output.ServiceUnavailable.Body) { + public init(body: Operations.CompleteGithubAppSignIn.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-apps/sign-in/complete/post(completeGithubAppSignIn)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ConnectGithubApp.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CompleteGithubAppSignIn.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ConnectGithubApp.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CompleteGithubAppSignIn.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -47780,16 +47890,16 @@ public enum Operations { } } } - /// Starts signing the owner in to GitHub through the App, so its bots act as the owner. The client opens `url`; GitHub sends the owner to the App's callback URL, `{origin}/github-app/authorized`, or `{origin}/ui/github-app/authorized` for Apps created before the web UI moved to `/`, with a code and state. `origin` is no longer used. 409 without a client secret. + /// Forgets the App, signs the owner out of it, and takes GH_TOKEN from bots left without an installed App. The App stays on GitHub until the owner deletes it there. /// - /// - Remark: HTTP `POST /v1/github-apps/{id}/sign-in`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)`. - public enum SignInGithubApp { - public static let id: Swift.String = "signInGithubApp" + /// - Remark: HTTP `DELETE /v1/github-apps/{id}`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)`. + public enum DeleteGithubApp { + public static let id: Swift.String = "deleteGithubApp" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/path`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -47799,137 +47909,72 @@ public enum Operations { self.id = id } } - public var path: Operations.SignInGithubApp.Input.Path - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/header`. + public var path: Operations.DeleteGithubApp.Input.Path + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SignInGithubApp.Input.Headers - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/requestBody/json/origin`. - public var origin: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - origin: - public init(origin: Swift.String) { - self.origin = origin - } - public enum CodingKeys: String, CodingKey { - case origin - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.origin = try container.decode( - Swift.String.self, - forKey: .origin - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "origin" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/requestBody/content/application\/json`. - case json(Operations.SignInGithubApp.Input.Body.JsonPayload) - } - public var body: Operations.SignInGithubApp.Input.Body + public var headers: Operations.DeleteGithubApp.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.SignInGithubApp.Input.Path, - headers: Operations.SignInGithubApp.Input.Headers = .init(), - body: Operations.SignInGithubApp.Input.Body + path: Operations.DeleteGithubApp.Input.Path, + headers: Operations.DeleteGithubApp.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/200/content/json/url`. - public var url: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - url: - public init(url: Swift.String) { - self.url = url - } - public enum CodingKeys: String, CodingKey { - case url - } - } - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/200/content/application\/json`. - case json(Operations.SignInGithubApp.Output.Ok.Body.JsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.SignInGithubApp.Output.Ok.Body.JsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.SignInGithubApp.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.SignInGithubApp.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.SignInGithubApp.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteGithubApp.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.SignInGithubApp.Output.Ok { + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteGithubApp.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -47945,26 +47990,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignInGithubApp.Output.BadRequest.Body + public var body: Operations.DeleteGithubApp.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignInGithubApp.Output.BadRequest.Body) { + public init(body: Operations.DeleteGithubApp.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SignInGithubApp.Output.BadRequest) + case badRequest(Operations.DeleteGithubApp.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SignInGithubApp.Output.BadRequest { + public var badRequest: Operations.DeleteGithubApp.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -47978,9 +48023,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -47996,26 +48041,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignInGithubApp.Output.Unauthorized.Body + public var body: Operations.DeleteGithubApp.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignInGithubApp.Output.Unauthorized.Body) { + public init(body: Operations.DeleteGithubApp.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SignInGithubApp.Output.Unauthorized) + case unauthorized(Operations.DeleteGithubApp.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SignInGithubApp.Output.Unauthorized { + public var unauthorized: Operations.DeleteGithubApp.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -48029,9 +48074,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48047,26 +48092,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignInGithubApp.Output.NotFound.Body + public var body: Operations.DeleteGithubApp.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignInGithubApp.Output.NotFound.Body) { + public init(body: Operations.DeleteGithubApp.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SignInGithubApp.Output.NotFound) + case notFound(Operations.DeleteGithubApp.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SignInGithubApp.Output.NotFound { + public var notFound: Operations.DeleteGithubApp.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -48080,9 +48125,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48098,26 +48143,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignInGithubApp.Output.MethodNotAllowed.Body + public var body: Operations.DeleteGithubApp.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignInGithubApp.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteGithubApp.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SignInGithubApp.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteGithubApp.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SignInGithubApp.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteGithubApp.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -48131,9 +48176,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48149,26 +48194,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignInGithubApp.Output.Conflict.Body + public var body: Operations.DeleteGithubApp.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignInGithubApp.Output.Conflict.Body) { + public init(body: Operations.DeleteGithubApp.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SignInGithubApp.Output.Conflict) + case conflict(Operations.DeleteGithubApp.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SignInGithubApp.Output.Conflict { + public var conflict: Operations.DeleteGithubApp.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -48182,9 +48227,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -48200,26 +48245,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignInGithubApp.Output.ContentTooLarge.Body + public var body: Operations.DeleteGithubApp.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignInGithubApp.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteGithubApp.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SignInGithubApp.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteGithubApp.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SignInGithubApp.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteGithubApp.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -48233,9 +48278,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48251,26 +48296,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignInGithubApp.Output.InternalServerError.Body + public var body: Operations.DeleteGithubApp.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignInGithubApp.Output.InternalServerError.Body) { + public init(body: Operations.DeleteGithubApp.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SignInGithubApp.Output.InternalServerError) + case internalServerError(Operations.DeleteGithubApp.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SignInGithubApp.Output.InternalServerError { + public var internalServerError: Operations.DeleteGithubApp.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -48284,9 +48329,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48302,26 +48347,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignInGithubApp.Output.ServiceUnavailable.Body + public var body: Operations.DeleteGithubApp.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignInGithubApp.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteGithubApp.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/delete(deleteGithubApp)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SignInGithubApp.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteGithubApp.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SignInGithubApp.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteGithubApp.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -48371,16 +48416,16 @@ public enum Operations { } } } - /// Revokes and forgets the owner's sign-in through the App; its bots act as the App again. + /// Replaces the bots that act through the App. A bot uses at most one App per GitHub account; 409 when a bot already uses another App for this App's account. /// - /// - Remark: HTTP `DELETE /v1/github-apps/{id}/user`. - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)`. - public enum SignOutGithubApp { - public static let id: Swift.String = "signOutGithubApp" + /// - Remark: HTTP `PUT /v1/github-apps/{id}/bots`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)`. + public enum SetGithubAppBots { + public static let id: Swift.String = "setGithubAppBots" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/path`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/path/id`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -48390,37 +48435,71 @@ public enum Operations { self.id = id } } - public var path: Operations.SignOutGithubApp.Input.Path - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/header`. + public var path: Operations.SetGithubAppBots.Input.Path + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SignOutGithubApp.Input.Headers + public var headers: Operations.SetGithubAppBots.Input.Headers + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/requestBody/json/botIds`. + public var botIds: [Swift.String] + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - botIds: + public init(botIds: [Swift.String]) { + self.botIds = botIds + } + public enum CodingKeys: String, CodingKey { + case botIds + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.botIds = try container.decode( + [Swift.String].self, + forKey: .botIds + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "botIds" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/requestBody/content/application\/json`. + case json(Operations.SetGithubAppBots.Input.Body.JsonPayload) + } + public var body: Operations.SetGithubAppBots.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.SignOutGithubApp.Input.Path, - headers: Operations.SignOutGithubApp.Input.Headers = .init() + path: Operations.SetGithubAppBots.Input.Path, + headers: Operations.SetGithubAppBots.Input.Headers = .init(), + body: Operations.SetGithubAppBots.Input.Body ) { self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/200/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/200/content/application\/json`. case json(Components.Schemas.GitHubApp) /// The associated value of the enum case if `self` is `.json`. /// @@ -48436,26 +48515,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutGithubApp.Output.Ok.Body + public var body: Operations.SetGithubAppBots.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutGithubApp.Output.Ok.Body) { + public init(body: Operations.SetGithubAppBots.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.SignOutGithubApp.Output.Ok) + case ok(Operations.SetGithubAppBots.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.SignOutGithubApp.Output.Ok { + public var ok: Operations.SetGithubAppBots.Output.Ok { get throws { switch self { case let .ok(response): @@ -48469,9 +48548,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48487,26 +48566,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutGithubApp.Output.BadRequest.Body + public var body: Operations.SetGithubAppBots.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutGithubApp.Output.BadRequest.Body) { + public init(body: Operations.SetGithubAppBots.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SignOutGithubApp.Output.BadRequest) + case badRequest(Operations.SetGithubAppBots.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SignOutGithubApp.Output.BadRequest { + public var badRequest: Operations.SetGithubAppBots.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -48520,9 +48599,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -48538,26 +48617,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutGithubApp.Output.Unauthorized.Body + public var body: Operations.SetGithubAppBots.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutGithubApp.Output.Unauthorized.Body) { + public init(body: Operations.SetGithubAppBots.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SignOutGithubApp.Output.Unauthorized) + case unauthorized(Operations.SetGithubAppBots.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SignOutGithubApp.Output.Unauthorized { + public var unauthorized: Operations.SetGithubAppBots.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -48571,9 +48650,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48589,26 +48668,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutGithubApp.Output.NotFound.Body + public var body: Operations.SetGithubAppBots.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutGithubApp.Output.NotFound.Body) { + public init(body: Operations.SetGithubAppBots.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SignOutGithubApp.Output.NotFound) + case notFound(Operations.SetGithubAppBots.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SignOutGithubApp.Output.NotFound { + public var notFound: Operations.SetGithubAppBots.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -48622,9 +48701,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48640,26 +48719,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutGithubApp.Output.MethodNotAllowed.Body + public var body: Operations.SetGithubAppBots.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutGithubApp.Output.MethodNotAllowed.Body) { + public init(body: Operations.SetGithubAppBots.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SignOutGithubApp.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SetGithubAppBots.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SignOutGithubApp.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SetGithubAppBots.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -48673,9 +48752,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48691,26 +48770,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutGithubApp.Output.Conflict.Body + public var body: Operations.SetGithubAppBots.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutGithubApp.Output.Conflict.Body) { + public init(body: Operations.SetGithubAppBots.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SignOutGithubApp.Output.Conflict) + case conflict(Operations.SetGithubAppBots.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SignOutGithubApp.Output.Conflict { + public var conflict: Operations.SetGithubAppBots.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -48724,9 +48803,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -48742,26 +48821,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutGithubApp.Output.ContentTooLarge.Body + public var body: Operations.SetGithubAppBots.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutGithubApp.Output.ContentTooLarge.Body) { + public init(body: Operations.SetGithubAppBots.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SignOutGithubApp.Output.ContentTooLarge) + case contentTooLarge(Operations.SetGithubAppBots.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SignOutGithubApp.Output.ContentTooLarge { + public var contentTooLarge: Operations.SetGithubAppBots.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -48775,9 +48854,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48793,26 +48872,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutGithubApp.Output.InternalServerError.Body + public var body: Operations.SetGithubAppBots.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutGithubApp.Output.InternalServerError.Body) { + public init(body: Operations.SetGithubAppBots.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SignOutGithubApp.Output.InternalServerError) + case internalServerError(Operations.SetGithubAppBots.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SignOutGithubApp.Output.InternalServerError { + public var internalServerError: Operations.SetGithubAppBots.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -48826,9 +48905,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/bots/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -48844,26 +48923,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutGithubApp.Output.ServiceUnavailable.Body + public var body: Operations.SetGithubAppBots.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutGithubApp.Output.ServiceUnavailable.Body) { + public init(body: Operations.SetGithubAppBots.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/bots/put(setGithubAppBots)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SignOutGithubApp.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SetGithubAppBots.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SignOutGithubApp.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SetGithubAppBots.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -48913,42 +48992,137 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/group-chats`. - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)`. - public enum ListGroupChats { - public static let id: Swift.String = "listGroupChats" + /// Stores a client secret generated in the App's GitHub settings, for an App created before Crumble kept it. + /// + /// - Remark: HTTP `PUT /v1/github-apps/{id}/client-secret`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)`. + public enum SetGithubAppClientSecret { + public static let id: Swift.String = "setGithubAppClientSecret" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/header`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.SetGithubAppClientSecret.Input.Path + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListGroupChats.Input.Headers + public var headers: Operations.SetGithubAppClientSecret.Input.Headers + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/reference/passwordManager`. + public var passwordManager: Operations.SetGithubAppClientSecret.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.SetGithubAppClientSecret.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/reference`. + public var reference: Operations.SetGithubAppClientSecret.Input.Body.JsonPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/json/value`. + public var value: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.SetGithubAppClientSecret.Input.Body.JsonPayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.SetGithubAppClientSecret.Input.Body.JsonPayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/requestBody/content/application\/json`. + case json(Operations.SetGithubAppClientSecret.Input.Body.JsonPayload) + } + public var body: Operations.SetGithubAppClientSecret.Input.Body /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - public init(headers: Operations.ListGroupChats.Input.Headers = .init()) { + /// - body: + public init( + path: Operations.SetGithubAppClientSecret.Input.Path, + headers: Operations.SetGithubAppClientSecret.Input.Headers = .init(), + body: Operations.SetGithubAppClientSecret.Input.Body + ) { + self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/200/content/application\/json`. - case json([Components.Schemas.GroupChat]) + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.GitHubApp) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.GroupChat] { + public var json: Components.Schemas.GitHubApp { get throws { switch self { case let .json(body): @@ -48958,26 +49132,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGroupChats.Output.Ok.Body + public var body: Operations.SetGithubAppClientSecret.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGroupChats.Output.Ok.Body) { + public init(body: Operations.SetGithubAppClientSecret.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListGroupChats.Output.Ok) + case ok(Operations.SetGithubAppClientSecret.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListGroupChats.Output.Ok { + public var ok: Operations.SetGithubAppClientSecret.Output.Ok { get throws { switch self { case let .ok(response): @@ -48991,9 +49165,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49009,26 +49183,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGroupChats.Output.BadRequest.Body + public var body: Operations.SetGithubAppClientSecret.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGroupChats.Output.BadRequest.Body) { + public init(body: Operations.SetGithubAppClientSecret.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListGroupChats.Output.BadRequest) + case badRequest(Operations.SetGithubAppClientSecret.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListGroupChats.Output.BadRequest { + public var badRequest: Operations.SetGithubAppClientSecret.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -49042,9 +49216,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -49060,26 +49234,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGroupChats.Output.Unauthorized.Body + public var body: Operations.SetGithubAppClientSecret.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGroupChats.Output.Unauthorized.Body) { + public init(body: Operations.SetGithubAppClientSecret.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListGroupChats.Output.Unauthorized) + case unauthorized(Operations.SetGithubAppClientSecret.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListGroupChats.Output.Unauthorized { + public var unauthorized: Operations.SetGithubAppClientSecret.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -49093,9 +49267,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49111,26 +49285,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGroupChats.Output.NotFound.Body + public var body: Operations.SetGithubAppClientSecret.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGroupChats.Output.NotFound.Body) { + public init(body: Operations.SetGithubAppClientSecret.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListGroupChats.Output.NotFound) + case notFound(Operations.SetGithubAppClientSecret.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListGroupChats.Output.NotFound { + public var notFound: Operations.SetGithubAppClientSecret.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -49144,9 +49318,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49162,26 +49336,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGroupChats.Output.MethodNotAllowed.Body + public var body: Operations.SetGithubAppClientSecret.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGroupChats.Output.MethodNotAllowed.Body) { + public init(body: Operations.SetGithubAppClientSecret.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListGroupChats.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SetGithubAppClientSecret.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListGroupChats.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SetGithubAppClientSecret.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -49195,9 +49369,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49213,26 +49387,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGroupChats.Output.Conflict.Body + public var body: Operations.SetGithubAppClientSecret.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGroupChats.Output.Conflict.Body) { + public init(body: Operations.SetGithubAppClientSecret.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListGroupChats.Output.Conflict) + case conflict(Operations.SetGithubAppClientSecret.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListGroupChats.Output.Conflict { + public var conflict: Operations.SetGithubAppClientSecret.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -49246,9 +49420,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -49264,26 +49438,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGroupChats.Output.ContentTooLarge.Body + public var body: Operations.SetGithubAppClientSecret.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGroupChats.Output.ContentTooLarge.Body) { + public init(body: Operations.SetGithubAppClientSecret.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListGroupChats.Output.ContentTooLarge) + case contentTooLarge(Operations.SetGithubAppClientSecret.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListGroupChats.Output.ContentTooLarge { + public var contentTooLarge: Operations.SetGithubAppClientSecret.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -49297,9 +49471,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49315,26 +49489,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGroupChats.Output.InternalServerError.Body + public var body: Operations.SetGithubAppClientSecret.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGroupChats.Output.InternalServerError.Body) { + public init(body: Operations.SetGithubAppClientSecret.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListGroupChats.Output.InternalServerError) + case internalServerError(Operations.SetGithubAppClientSecret.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListGroupChats.Output.InternalServerError { + public var internalServerError: Operations.SetGithubAppClientSecret.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -49348,9 +49522,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/client-secret/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49366,26 +49540,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListGroupChats.Output.ServiceUnavailable.Body + public var body: Operations.SetGithubAppClientSecret.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListGroupChats.Output.ServiceUnavailable.Body) { + public init(body: Operations.SetGithubAppClientSecret.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/client-secret/put(setGithubAppClientSecret)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListGroupChats.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SetGithubAppClientSecret.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListGroupChats.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SetGithubAppClientSecret.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -49435,76 +49609,62 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/group-chats`. - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)`. - public enum CreateGroupChat { - public static let id: Swift.String = "createGroupChat" + /// Finds the App's installation on its account and gives its bots the GH_TOKEN credential. 409 until the owner installs the App. + /// + /// - Remark: HTTP `POST /v1/github-apps/{id}/connect`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)`. + public enum ConnectGithubApp { + public static let id: Swift.String = "connectGithubApp" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/header`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.ConnectGithubApp.Input.Path + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CreateGroupChat.Input.Headers - /// - Remark: Generated from `#/paths/v1/group-chats/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/requestBody/json/memberIds`. - public var memberIds: [Swift.String] - /// - Remark: Generated from `#/paths/v1/group-chats/POST/requestBody/json/name`. - public var name: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - memberIds: - /// - name: - public init( - memberIds: [Swift.String], - name: Swift.String - ) { - self.memberIds = memberIds - self.name = name - } - public enum CodingKeys: String, CodingKey { - case memberIds - case name - } - } - /// - Remark: Generated from `#/paths/v1/group-chats/POST/requestBody/content/application\/json`. - case json(Operations.CreateGroupChat.Input.Body.JsonPayload) - } - public var body: Operations.CreateGroupChat.Input.Body + public var headers: Operations.ConnectGithubApp.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - /// - body: public init( - headers: Operations.CreateGroupChat.Input.Headers = .init(), - body: Operations.CreateGroupChat.Input.Body + path: Operations.ConnectGithubApp.Input.Path, + headers: Operations.ConnectGithubApp.Input.Headers = .init() ) { + self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/201/content/application\/json`. - case json(Components.Schemas.GroupChat) + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/200/content/application\/json`. + case json(Components.Schemas.GitHubApp) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.GroupChat { + public var json: Components.Schemas.GitHubApp { get throws { switch self { case let .json(body): @@ -49514,42 +49674,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGroupChat.Output.Created.Body - /// Creates a new `Created`. + public var body: Operations.ConnectGithubApp.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGroupChat.Output.Created.Body) { + public init(body: Operations.ConnectGithubApp.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/201`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/200`. /// - /// HTTP response code: `201 created`. - case created(Operations.CreateGroupChat.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `200 ok`. + case ok(Operations.ConnectGithubApp.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.CreateGroupChat.Output.Created { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ConnectGithubApp.Output.Ok { get throws { switch self { - case let .created(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49565,26 +49725,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGroupChat.Output.BadRequest.Body + public var body: Operations.ConnectGithubApp.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGroupChat.Output.BadRequest.Body) { + public init(body: Operations.ConnectGithubApp.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CreateGroupChat.Output.BadRequest) + case badRequest(Operations.ConnectGithubApp.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CreateGroupChat.Output.BadRequest { + public var badRequest: Operations.ConnectGithubApp.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -49598,9 +49758,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -49616,26 +49776,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGroupChat.Output.Unauthorized.Body + public var body: Operations.ConnectGithubApp.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGroupChat.Output.Unauthorized.Body) { + public init(body: Operations.ConnectGithubApp.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CreateGroupChat.Output.Unauthorized) + case unauthorized(Operations.ConnectGithubApp.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CreateGroupChat.Output.Unauthorized { + public var unauthorized: Operations.ConnectGithubApp.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -49649,9 +49809,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49667,26 +49827,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGroupChat.Output.NotFound.Body + public var body: Operations.ConnectGithubApp.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGroupChat.Output.NotFound.Body) { + public init(body: Operations.ConnectGithubApp.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CreateGroupChat.Output.NotFound) + case notFound(Operations.ConnectGithubApp.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CreateGroupChat.Output.NotFound { + public var notFound: Operations.ConnectGithubApp.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -49700,9 +49860,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49718,26 +49878,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGroupChat.Output.MethodNotAllowed.Body + public var body: Operations.ConnectGithubApp.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGroupChat.Output.MethodNotAllowed.Body) { + public init(body: Operations.ConnectGithubApp.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CreateGroupChat.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ConnectGithubApp.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CreateGroupChat.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ConnectGithubApp.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -49751,9 +49911,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49769,26 +49929,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGroupChat.Output.Conflict.Body + public var body: Operations.ConnectGithubApp.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGroupChat.Output.Conflict.Body) { + public init(body: Operations.ConnectGithubApp.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CreateGroupChat.Output.Conflict) + case conflict(Operations.ConnectGithubApp.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CreateGroupChat.Output.Conflict { + public var conflict: Operations.ConnectGithubApp.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -49802,9 +49962,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -49820,26 +49980,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGroupChat.Output.ContentTooLarge.Body + public var body: Operations.ConnectGithubApp.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGroupChat.Output.ContentTooLarge.Body) { + public init(body: Operations.ConnectGithubApp.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CreateGroupChat.Output.ContentTooLarge) + case contentTooLarge(Operations.ConnectGithubApp.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CreateGroupChat.Output.ContentTooLarge { + public var contentTooLarge: Operations.ConnectGithubApp.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -49853,9 +50013,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49871,26 +50031,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGroupChat.Output.InternalServerError.Body + public var body: Operations.ConnectGithubApp.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGroupChat.Output.InternalServerError.Body) { + public init(body: Operations.ConnectGithubApp.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CreateGroupChat.Output.InternalServerError) + case internalServerError(Operations.ConnectGithubApp.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CreateGroupChat.Output.InternalServerError { + public var internalServerError: Operations.ConnectGithubApp.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -49904,9 +50064,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/connect/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -49922,26 +50082,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateGroupChat.Output.ServiceUnavailable.Body + public var body: Operations.ConnectGithubApp.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateGroupChat.Output.ServiceUnavailable.Body) { + public init(body: Operations.ConnectGithubApp.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/connect/post(connectGithubApp)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CreateGroupChat.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ConnectGithubApp.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CreateGroupChat.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ConnectGithubApp.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -49991,14 +50151,16 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/group-chats/{id}`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)`. - public enum GetGroupChat { - public static let id: Swift.String = "getGroupChat" + /// Starts signing the owner in to GitHub through the App, so its bots act as the owner. The client opens `url`; GitHub sends the owner to the App's callback URL, `{origin}/github-app/authorized`, or `{origin}/ui/github-app/authorized` for Apps created before the web UI moved to `/`, with a code and state. `origin` is no longer used. 409 without a client secret. + /// + /// - Remark: HTTP `POST /v1/github-apps/{id}/sign-in`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)`. + public enum SignInGithubApp { + public static let id: Swift.String = "signInGithubApp" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/path`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -50008,43 +50170,92 @@ public enum Operations { self.id = id } } - public var path: Operations.GetGroupChat.Input.Path - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/header`. + public var path: Operations.SignInGithubApp.Input.Path + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetGroupChat.Input.Headers + public var headers: Operations.SignInGithubApp.Input.Headers + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/requestBody/json/origin`. + public var origin: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - origin: + public init(origin: Swift.String) { + self.origin = origin + } + public enum CodingKeys: String, CodingKey { + case origin + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.origin = try container.decode( + Swift.String.self, + forKey: .origin + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "origin" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/requestBody/content/application\/json`. + case json(Operations.SignInGithubApp.Input.Body.JsonPayload) + } + public var body: Operations.SignInGithubApp.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.GetGroupChat.Input.Path, - headers: Operations.GetGroupChat.Input.Headers = .init() + path: Operations.SignInGithubApp.Input.Path, + headers: Operations.SignInGithubApp.Input.Headers = .init(), + body: Operations.SignInGithubApp.Input.Body ) { self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.GroupChat) + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/200/content/json/url`. + public var url: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - url: + public init(url: Swift.String) { + self.url = url + } + public enum CodingKeys: String, CodingKey { + case url + } + } + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/200/content/application\/json`. + case json(Operations.SignInGithubApp.Output.Ok.Body.JsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.GroupChat { + public var json: Operations.SignInGithubApp.Output.Ok.Body.JsonPayload { get throws { switch self { case let .json(body): @@ -50054,26 +50265,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChat.Output.Ok.Body + public var body: Operations.SignInGithubApp.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChat.Output.Ok.Body) { + public init(body: Operations.SignInGithubApp.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.GetGroupChat.Output.Ok) + case ok(Operations.SignInGithubApp.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.GetGroupChat.Output.Ok { + public var ok: Operations.SignInGithubApp.Output.Ok { get throws { switch self { case let .ok(response): @@ -50087,9 +50298,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50105,26 +50316,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChat.Output.BadRequest.Body + public var body: Operations.SignInGithubApp.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChat.Output.BadRequest.Body) { + public init(body: Operations.SignInGithubApp.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetGroupChat.Output.BadRequest) + case badRequest(Operations.SignInGithubApp.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetGroupChat.Output.BadRequest { + public var badRequest: Operations.SignInGithubApp.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -50138,9 +50349,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -50156,26 +50367,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChat.Output.Unauthorized.Body + public var body: Operations.SignInGithubApp.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChat.Output.Unauthorized.Body) { + public init(body: Operations.SignInGithubApp.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetGroupChat.Output.Unauthorized) + case unauthorized(Operations.SignInGithubApp.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetGroupChat.Output.Unauthorized { + public var unauthorized: Operations.SignInGithubApp.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -50189,9 +50400,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50207,26 +50418,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChat.Output.NotFound.Body + public var body: Operations.SignInGithubApp.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChat.Output.NotFound.Body) { + public init(body: Operations.SignInGithubApp.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetGroupChat.Output.NotFound) + case notFound(Operations.SignInGithubApp.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetGroupChat.Output.NotFound { + public var notFound: Operations.SignInGithubApp.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -50240,9 +50451,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50258,26 +50469,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChat.Output.MethodNotAllowed.Body + public var body: Operations.SignInGithubApp.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChat.Output.MethodNotAllowed.Body) { + public init(body: Operations.SignInGithubApp.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetGroupChat.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SignInGithubApp.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetGroupChat.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SignInGithubApp.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -50291,9 +50502,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50309,26 +50520,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChat.Output.Conflict.Body + public var body: Operations.SignInGithubApp.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChat.Output.Conflict.Body) { + public init(body: Operations.SignInGithubApp.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetGroupChat.Output.Conflict) + case conflict(Operations.SignInGithubApp.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetGroupChat.Output.Conflict { + public var conflict: Operations.SignInGithubApp.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -50342,9 +50553,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -50360,26 +50571,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChat.Output.ContentTooLarge.Body + public var body: Operations.SignInGithubApp.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChat.Output.ContentTooLarge.Body) { + public init(body: Operations.SignInGithubApp.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetGroupChat.Output.ContentTooLarge) + case contentTooLarge(Operations.SignInGithubApp.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetGroupChat.Output.ContentTooLarge { + public var contentTooLarge: Operations.SignInGithubApp.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -50393,9 +50604,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50411,26 +50622,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChat.Output.InternalServerError.Body + public var body: Operations.SignInGithubApp.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChat.Output.InternalServerError.Body) { + public init(body: Operations.SignInGithubApp.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetGroupChat.Output.InternalServerError) + case internalServerError(Operations.SignInGithubApp.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetGroupChat.Output.InternalServerError { + public var internalServerError: Operations.SignInGithubApp.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -50444,9 +50655,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/sign-in/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50462,26 +50673,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChat.Output.ServiceUnavailable.Body + public var body: Operations.SignInGithubApp.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChat.Output.ServiceUnavailable.Body) { + public init(body: Operations.SignInGithubApp.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/sign-in/post(signInGithubApp)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetGroupChat.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SignInGithubApp.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetGroupChat.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SignInGithubApp.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -50531,14 +50742,16 @@ public enum Operations { } } } - /// - Remark: HTTP `PATCH /v1/group-chats/{id}`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)`. - public enum UpdateGroupChat { - public static let id: Swift.String = "updateGroupChat" + /// Revokes and forgets the owner's sign-in through the App; its bots act as the App again. + /// + /// - Remark: HTTP `DELETE /v1/github-apps/{id}/user`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)`. + public enum SignOutGithubApp { + public static let id: Swift.String = "signOutGithubApp" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/path`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/path/id`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -50548,75 +50761,43 @@ public enum Operations { self.id = id } } - public var path: Operations.UpdateGroupChat.Input.Path - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/header`. + public var path: Operations.SignOutGithubApp.Input.Path + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateGroupChat.Input.Headers - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/requestBody/json/memberIds`. - public var memberIds: [Swift.String]? - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/requestBody/json/name`. - public var name: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - memberIds: - /// - name: - public init( - memberIds: [Swift.String]? = nil, - name: Swift.String? = nil - ) { - self.memberIds = memberIds - self.name = name - } - public enum CodingKeys: String, CodingKey { - case memberIds - case name - } - } - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/requestBody/content/application\/json`. - case json(Operations.UpdateGroupChat.Input.Body.JsonPayload) - } - public var body: Operations.UpdateGroupChat.Input.Body + public var headers: Operations.SignOutGithubApp.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.UpdateGroupChat.Input.Path, - headers: Operations.UpdateGroupChat.Input.Headers = .init(), - body: Operations.UpdateGroupChat.Input.Body + path: Operations.SignOutGithubApp.Input.Path, + headers: Operations.SignOutGithubApp.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/200/content/application\/json`. - case json(Components.Schemas.GroupChat) + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/200/content/application\/json`. + case json(Components.Schemas.GitHubApp) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.GroupChat { + public var json: Components.Schemas.GitHubApp { get throws { switch self { case let .json(body): @@ -50626,26 +50807,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateGroupChat.Output.Ok.Body + public var body: Operations.SignOutGithubApp.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateGroupChat.Output.Ok.Body) { + public init(body: Operations.SignOutGithubApp.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/200`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.UpdateGroupChat.Output.Ok) + case ok(Operations.SignOutGithubApp.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateGroupChat.Output.Ok { + public var ok: Operations.SignOutGithubApp.Output.Ok { get throws { switch self { case let .ok(response): @@ -50659,9 +50840,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50677,26 +50858,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateGroupChat.Output.BadRequest.Body + public var body: Operations.SignOutGithubApp.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateGroupChat.Output.BadRequest.Body) { + public init(body: Operations.SignOutGithubApp.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/400`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateGroupChat.Output.BadRequest) + case badRequest(Operations.SignOutGithubApp.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateGroupChat.Output.BadRequest { + public var badRequest: Operations.SignOutGithubApp.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -50710,9 +50891,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -50728,26 +50909,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateGroupChat.Output.Unauthorized.Body + public var body: Operations.SignOutGithubApp.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateGroupChat.Output.Unauthorized.Body) { + public init(body: Operations.SignOutGithubApp.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/401`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateGroupChat.Output.Unauthorized) + case unauthorized(Operations.SignOutGithubApp.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateGroupChat.Output.Unauthorized { + public var unauthorized: Operations.SignOutGithubApp.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -50761,9 +50942,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50779,26 +50960,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateGroupChat.Output.NotFound.Body + public var body: Operations.SignOutGithubApp.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateGroupChat.Output.NotFound.Body) { + public init(body: Operations.SignOutGithubApp.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/404`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateGroupChat.Output.NotFound) + case notFound(Operations.SignOutGithubApp.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateGroupChat.Output.NotFound { + public var notFound: Operations.SignOutGithubApp.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -50812,9 +50993,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50830,26 +51011,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateGroupChat.Output.MethodNotAllowed.Body + public var body: Operations.SignOutGithubApp.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateGroupChat.Output.MethodNotAllowed.Body) { + public init(body: Operations.SignOutGithubApp.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/405`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateGroupChat.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SignOutGithubApp.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateGroupChat.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SignOutGithubApp.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -50863,9 +51044,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50881,26 +51062,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateGroupChat.Output.Conflict.Body + public var body: Operations.SignOutGithubApp.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateGroupChat.Output.Conflict.Body) { + public init(body: Operations.SignOutGithubApp.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/409`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateGroupChat.Output.Conflict) + case conflict(Operations.SignOutGithubApp.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateGroupChat.Output.Conflict { + public var conflict: Operations.SignOutGithubApp.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -50914,9 +51095,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -50932,26 +51113,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateGroupChat.Output.ContentTooLarge.Body + public var body: Operations.SignOutGithubApp.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateGroupChat.Output.ContentTooLarge.Body) { + public init(body: Operations.SignOutGithubApp.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/413`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateGroupChat.Output.ContentTooLarge) + case contentTooLarge(Operations.SignOutGithubApp.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateGroupChat.Output.ContentTooLarge { + public var contentTooLarge: Operations.SignOutGithubApp.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -50965,9 +51146,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -50983,26 +51164,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateGroupChat.Output.InternalServerError.Body + public var body: Operations.SignOutGithubApp.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateGroupChat.Output.InternalServerError.Body) { + public init(body: Operations.SignOutGithubApp.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/500`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateGroupChat.Output.InternalServerError) + case internalServerError(Operations.SignOutGithubApp.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateGroupChat.Output.InternalServerError { + public var internalServerError: Operations.SignOutGithubApp.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -51016,9 +51197,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/github-apps/{id}/user/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51034,26 +51215,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateGroupChat.Output.ServiceUnavailable.Body + public var body: Operations.SignOutGithubApp.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateGroupChat.Output.ServiceUnavailable.Body) { + public init(body: Operations.SignOutGithubApp.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/503`. + /// - Remark: Generated from `#/paths//v1/github-apps/{id}/user/delete(signOutGithubApp)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateGroupChat.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SignOutGithubApp.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateGroupChat.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SignOutGithubApp.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -51103,89 +51284,87 @@ public enum Operations { } } } - /// - Remark: HTTP `DELETE /v1/group-chats/{id}`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)`. - public enum DeleteGroupChat { - public static let id: Swift.String = "deleteGroupChat" + /// - Remark: HTTP `GET /v1/group-chats`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)`. + public enum ListGroupChats { + public static let id: Swift.String = "listGroupChats" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.DeleteGroupChat.Input.Path - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/header`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteGroupChat.Input.Headers + public var headers: Operations.ListGroupChats.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - public init( - path: Operations.DeleteGroupChat.Input.Path, - headers: Operations.DeleteGroupChat.Input.Headers = .init() - ) { - self.path = path + public init(headers: Operations.ListGroupChats.Input.Headers = .init()) { self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/200/content/application\/json`. + case json([Components.Schemas.GroupChat]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.GroupChat] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListGroupChats.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListGroupChats.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteGroupChat.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/204`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.ListGroupChats.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteGroupChat.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ListGroupChats.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51201,26 +51380,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGroupChat.Output.BadRequest.Body + public var body: Operations.ListGroupChats.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGroupChat.Output.BadRequest.Body) { + public init(body: Operations.ListGroupChats.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/400`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteGroupChat.Output.BadRequest) + case badRequest(Operations.ListGroupChats.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteGroupChat.Output.BadRequest { + public var badRequest: Operations.ListGroupChats.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -51234,9 +51413,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -51252,26 +51431,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGroupChat.Output.Unauthorized.Body + public var body: Operations.ListGroupChats.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGroupChat.Output.Unauthorized.Body) { + public init(body: Operations.ListGroupChats.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/401`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteGroupChat.Output.Unauthorized) + case unauthorized(Operations.ListGroupChats.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteGroupChat.Output.Unauthorized { + public var unauthorized: Operations.ListGroupChats.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -51285,9 +51464,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51303,26 +51482,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGroupChat.Output.NotFound.Body + public var body: Operations.ListGroupChats.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGroupChat.Output.NotFound.Body) { + public init(body: Operations.ListGroupChats.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/404`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteGroupChat.Output.NotFound) + case notFound(Operations.ListGroupChats.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteGroupChat.Output.NotFound { + public var notFound: Operations.ListGroupChats.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -51336,9 +51515,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51354,26 +51533,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGroupChat.Output.MethodNotAllowed.Body + public var body: Operations.ListGroupChats.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGroupChat.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListGroupChats.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/405`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteGroupChat.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListGroupChats.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteGroupChat.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListGroupChats.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -51387,9 +51566,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51405,26 +51584,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGroupChat.Output.Conflict.Body + public var body: Operations.ListGroupChats.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGroupChat.Output.Conflict.Body) { + public init(body: Operations.ListGroupChats.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/409`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteGroupChat.Output.Conflict) + case conflict(Operations.ListGroupChats.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteGroupChat.Output.Conflict { + public var conflict: Operations.ListGroupChats.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -51438,9 +51617,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -51456,26 +51635,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGroupChat.Output.ContentTooLarge.Body + public var body: Operations.ListGroupChats.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGroupChat.Output.ContentTooLarge.Body) { + public init(body: Operations.ListGroupChats.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/413`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteGroupChat.Output.ContentTooLarge) + case contentTooLarge(Operations.ListGroupChats.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteGroupChat.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListGroupChats.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -51489,9 +51668,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51507,26 +51686,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGroupChat.Output.InternalServerError.Body + public var body: Operations.ListGroupChats.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGroupChat.Output.InternalServerError.Body) { + public init(body: Operations.ListGroupChats.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/500`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteGroupChat.Output.InternalServerError) + case internalServerError(Operations.ListGroupChats.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteGroupChat.Output.InternalServerError { + public var internalServerError: Operations.ListGroupChats.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -51540,9 +51719,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51558,26 +51737,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteGroupChat.Output.ServiceUnavailable.Body + public var body: Operations.ListGroupChats.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteGroupChat.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListGroupChats.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/503`. + /// - Remark: Generated from `#/paths//v1/group-chats/get(listGroupChats)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteGroupChat.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListGroupChats.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteGroupChat.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListGroupChats.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -51627,138 +51806,121 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/group-chats/{id}/attachments/{entryId}/{index}`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)`. - public enum GetGroupAttachment { - public static let id: Swift.String = "getGroupAttachment" + /// - Remark: HTTP `POST /v1/group-chats`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)`. + public enum CreateGroupChat { + public static let id: Swift.String = "createGroupChat" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/path/id`. - public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/path/entryId`. - public var entryId: Swift.String - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/path/index`. - public var index: Swift.Int - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - /// - entryId: - /// - index: - public init( - id: Swift.String, - entryId: Swift.String, - index: Swift.Int - ) { - self.id = id - self.entryId = entryId - self.index = index - } - } - public var path: Operations.GetGroupAttachment.Input.Path - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/header`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetGroupAttachment.Input.Headers + public var headers: Operations.CreateGroupChat.Input.Headers + /// - Remark: Generated from `#/paths/v1/group-chats/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/group-chats/POST/requestBody/json/memberIds`. + public var memberIds: [Swift.String] + /// - Remark: Generated from `#/paths/v1/group-chats/POST/requestBody/json/name`. + public var name: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - memberIds: + /// - name: + public init( + memberIds: [Swift.String], + name: Swift.String + ) { + self.memberIds = memberIds + self.name = name + } + public enum CodingKeys: String, CodingKey { + case memberIds + case name + } + } + /// - Remark: Generated from `#/paths/v1/group-chats/POST/requestBody/content/application\/json`. + case json(Operations.CreateGroupChat.Input.Body.JsonPayload) + } + public var body: Operations.CreateGroupChat.Input.Body /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: + /// - body: public init( - path: Operations.GetGroupAttachment.Input.Path, - headers: Operations.GetGroupAttachment.Input.Headers = .init() + headers: Operations.CreateGroupChat.Input.Headers = .init(), + body: Operations.CreateGroupChat.Input.Body ) { - self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/200/headers`. - public struct Headers: Sendable, Hashable { - /// private, max-age=31536000, immutable - /// - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/200/headers/Cache-Control`. - public var cacheControl: Swift.String? - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - cacheControl: private, max-age=31536000, immutable - public init(cacheControl: Swift.String? = nil) { - self.cacheControl = cacheControl - } - } - /// Received HTTP response headers - public var headers: Operations.GetGroupAttachment.Output.Ok.Headers - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/200/content`. + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/200/content/*\/*`. - case any(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.any`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/201/content/application\/json`. + case json(Components.Schemas.GroupChat) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.any`. - /// - SeeAlso: `.any`. - public var any: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.GroupChat { get throws { switch self { - case let .any(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.GetGroupAttachment.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.CreateGroupChat.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: - /// - headers: Received HTTP response headers /// - body: Received HTTP response body - public init( - headers: Operations.GetGroupAttachment.Output.Ok.Headers = .init(), - body: Operations.GetGroupAttachment.Output.Ok.Body - ) { - self.headers = headers + public init(body: Operations.CreateGroupChat.Output.Created.Body) { self.body = body } } - /// Attachment bytes; Content-Type identifies the image or text format + /// Success /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/200`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/201`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.GetGroupAttachment.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `201 created`. + case created(Operations.CreateGroupChat.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.GetGroupAttachment.Output.Ok { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.CreateGroupChat.Output.Created { get throws { switch self { - case let .ok(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "created", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51774,26 +51936,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupAttachment.Output.BadRequest.Body + public var body: Operations.CreateGroupChat.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupAttachment.Output.BadRequest.Body) { + public init(body: Operations.CreateGroupChat.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/400`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetGroupAttachment.Output.BadRequest) + case badRequest(Operations.CreateGroupChat.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetGroupAttachment.Output.BadRequest { + public var badRequest: Operations.CreateGroupChat.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -51807,9 +51969,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -51825,26 +51987,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupAttachment.Output.Unauthorized.Body + public var body: Operations.CreateGroupChat.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupAttachment.Output.Unauthorized.Body) { + public init(body: Operations.CreateGroupChat.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/401`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetGroupAttachment.Output.Unauthorized) + case unauthorized(Operations.CreateGroupChat.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetGroupAttachment.Output.Unauthorized { + public var unauthorized: Operations.CreateGroupChat.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -51858,9 +52020,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51876,26 +52038,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupAttachment.Output.NotFound.Body + public var body: Operations.CreateGroupChat.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupAttachment.Output.NotFound.Body) { + public init(body: Operations.CreateGroupChat.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/404`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetGroupAttachment.Output.NotFound) + case notFound(Operations.CreateGroupChat.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetGroupAttachment.Output.NotFound { + public var notFound: Operations.CreateGroupChat.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -51909,9 +52071,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51927,26 +52089,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupAttachment.Output.MethodNotAllowed.Body + public var body: Operations.CreateGroupChat.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupAttachment.Output.MethodNotAllowed.Body) { + public init(body: Operations.CreateGroupChat.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/405`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetGroupAttachment.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CreateGroupChat.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetGroupAttachment.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CreateGroupChat.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -51960,9 +52122,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -51978,26 +52140,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupAttachment.Output.Conflict.Body + public var body: Operations.CreateGroupChat.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupAttachment.Output.Conflict.Body) { + public init(body: Operations.CreateGroupChat.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/409`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetGroupAttachment.Output.Conflict) + case conflict(Operations.CreateGroupChat.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetGroupAttachment.Output.Conflict { + public var conflict: Operations.CreateGroupChat.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -52011,9 +52173,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -52029,26 +52191,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupAttachment.Output.ContentTooLarge.Body + public var body: Operations.CreateGroupChat.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupAttachment.Output.ContentTooLarge.Body) { + public init(body: Operations.CreateGroupChat.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/413`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetGroupAttachment.Output.ContentTooLarge) + case contentTooLarge(Operations.CreateGroupChat.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetGroupAttachment.Output.ContentTooLarge { + public var contentTooLarge: Operations.CreateGroupChat.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -52062,9 +52224,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -52080,26 +52242,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupAttachment.Output.InternalServerError.Body + public var body: Operations.CreateGroupChat.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupAttachment.Output.InternalServerError.Body) { + public init(body: Operations.CreateGroupChat.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/500`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetGroupAttachment.Output.InternalServerError) + case internalServerError(Operations.CreateGroupChat.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetGroupAttachment.Output.InternalServerError { + public var internalServerError: Operations.CreateGroupChat.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -52113,9 +52275,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -52131,26 +52293,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupAttachment.Output.ServiceUnavailable.Body + public var body: Operations.CreateGroupChat.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupAttachment.Output.ServiceUnavailable.Body) { + public init(body: Operations.CreateGroupChat.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/503`. + /// - Remark: Generated from `#/paths//v1/group-chats/post(createGroupChat)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetGroupAttachment.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CreateGroupChat.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetGroupAttachment.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CreateGroupChat.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -52169,14 +52331,11 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } @frozen public enum AcceptableContentType: AcceptableProtocol { - case any case json case plainText case other(Swift.String) public init?(rawValue: Swift.String) { switch rawValue.lowercased() { - case "*/*": - self = .any case "application/json": self = .json case "text/plain": @@ -52189,8 +52348,6 @@ public enum Operations { switch self { case let .other(string): return string - case .any: - return "*/*" case .json: return "application/json" case .plainText: @@ -52199,21 +52356,20 @@ public enum Operations { } public static var allCases: [Self] { [ - .any, .json, .plainText ] } } } - /// - Remark: HTTP `GET /v1/group-chats/{id}/chat`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)`. - public enum GetGroupChatSnapshot { - public static let id: Swift.String = "getGroupChatSnapshot" + /// - Remark: HTTP `GET /v1/group-chats/{id}`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)`. + public enum GetGroupChat { + public static let id: Swift.String = "getGroupChat" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/path`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -52223,59 +52379,43 @@ public enum Operations { self.id = id } } - public var path: Operations.GetGroupChatSnapshot.Input.Path - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/query/limit`. - public var limit: Swift.Int? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - public init(limit: Swift.Int? = nil) { - self.limit = limit - } - } - public var query: Operations.GetGroupChatSnapshot.Input.Query - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/header`. + public var path: Operations.GetGroupChat.Input.Path + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetGroupChatSnapshot.Input.Headers + public var headers: Operations.GetGroupChat.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: public init( - path: Operations.GetGroupChatSnapshot.Input.Path, - query: Operations.GetGroupChatSnapshot.Input.Query = .init(), - headers: Operations.GetGroupChatSnapshot.Input.Headers = .init() + path: Operations.GetGroupChat.Input.Path, + headers: Operations.GetGroupChat.Input.Headers = .init() ) { self.path = path - self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/200/content/application\/json`. - case json(Components.Schemas.GroupChatSnapshot) + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.GroupChat) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.GroupChatSnapshot { + public var json: Components.Schemas.GroupChat { get throws { switch self { case let .json(body): @@ -52285,26 +52425,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatSnapshot.Output.Ok.Body + public var body: Operations.GetGroupChat.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatSnapshot.Output.Ok.Body) { + public init(body: Operations.GetGroupChat.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/200`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.GetGroupChatSnapshot.Output.Ok) + case ok(Operations.GetGroupChat.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.GetGroupChatSnapshot.Output.Ok { + public var ok: Operations.GetGroupChat.Output.Ok { get throws { switch self { case let .ok(response): @@ -52318,9 +52458,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -52336,26 +52476,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatSnapshot.Output.BadRequest.Body + public var body: Operations.GetGroupChat.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatSnapshot.Output.BadRequest.Body) { + public init(body: Operations.GetGroupChat.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/400`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetGroupChatSnapshot.Output.BadRequest) + case badRequest(Operations.GetGroupChat.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetGroupChatSnapshot.Output.BadRequest { + public var badRequest: Operations.GetGroupChat.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -52369,9 +52509,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -52387,26 +52527,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatSnapshot.Output.Unauthorized.Body + public var body: Operations.GetGroupChat.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatSnapshot.Output.Unauthorized.Body) { + public init(body: Operations.GetGroupChat.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/401`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetGroupChatSnapshot.Output.Unauthorized) + case unauthorized(Operations.GetGroupChat.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetGroupChatSnapshot.Output.Unauthorized { + public var unauthorized: Operations.GetGroupChat.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -52420,9 +52560,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -52438,26 +52578,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatSnapshot.Output.NotFound.Body + public var body: Operations.GetGroupChat.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatSnapshot.Output.NotFound.Body) { + public init(body: Operations.GetGroupChat.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/404`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetGroupChatSnapshot.Output.NotFound) + case notFound(Operations.GetGroupChat.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetGroupChatSnapshot.Output.NotFound { + public var notFound: Operations.GetGroupChat.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -52471,9 +52611,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -52489,26 +52629,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatSnapshot.Output.MethodNotAllowed.Body + public var body: Operations.GetGroupChat.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatSnapshot.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetGroupChat.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/405`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetGroupChatSnapshot.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetGroupChat.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetGroupChatSnapshot.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetGroupChat.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -52522,9 +52662,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -52540,26 +52680,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatSnapshot.Output.Conflict.Body + public var body: Operations.GetGroupChat.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatSnapshot.Output.Conflict.Body) { + public init(body: Operations.GetGroupChat.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/409`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetGroupChatSnapshot.Output.Conflict) + case conflict(Operations.GetGroupChat.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetGroupChatSnapshot.Output.Conflict { + public var conflict: Operations.GetGroupChat.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -52573,9 +52713,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -52591,26 +52731,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatSnapshot.Output.ContentTooLarge.Body + public var body: Operations.GetGroupChat.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatSnapshot.Output.ContentTooLarge.Body) { + public init(body: Operations.GetGroupChat.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/413`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetGroupChatSnapshot.Output.ContentTooLarge) + case contentTooLarge(Operations.GetGroupChat.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetGroupChatSnapshot.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetGroupChat.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -52624,9 +52764,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -52642,26 +52782,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatSnapshot.Output.InternalServerError.Body + public var body: Operations.GetGroupChat.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatSnapshot.Output.InternalServerError.Body) { + public init(body: Operations.GetGroupChat.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/500`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetGroupChatSnapshot.Output.InternalServerError) + case internalServerError(Operations.GetGroupChat.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetGroupChatSnapshot.Output.InternalServerError { + public var internalServerError: Operations.GetGroupChat.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -52675,9 +52815,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -52693,26 +52833,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatSnapshot.Output.ServiceUnavailable.Body + public var body: Operations.GetGroupChat.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatSnapshot.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetGroupChat.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/503`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/get(getGroupChat)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetGroupChatSnapshot.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetGroupChat.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetGroupChatSnapshot.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetGroupChat.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -52762,16 +52902,14 @@ public enum Operations { } } } - /// Server-sent events. Each snapshot event carries a GroupChatSnapshot JSON object in data, sent on connection and after every change. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. Reconnect by fetching the current snapshot; there is no Last-Event-ID replay. - /// - /// - Remark: HTTP `GET /v1/group-chats/{id}/events`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)`. - public enum StreamGroupChatEvents { - public static let id: Swift.String = "streamGroupChatEvents" + /// - Remark: HTTP `PATCH /v1/group-chats/{id}`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)`. + public enum UpdateGroupChat { + public static let id: Swift.String = "updateGroupChat" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/path`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -52781,88 +52919,104 @@ public enum Operations { self.id = id } } - public var path: Operations.StreamGroupChatEvents.Input.Path - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/query/limit`. - public var limit: Swift.Int? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - public init(limit: Swift.Int? = nil) { - self.limit = limit - } - } - public var query: Operations.StreamGroupChatEvents.Input.Query - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/header`. + public var path: Operations.UpdateGroupChat.Input.Path + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.StreamGroupChatEvents.Input.Headers + public var headers: Operations.UpdateGroupChat.Input.Headers + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/requestBody/json/memberIds`. + public var memberIds: [Swift.String]? + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/requestBody/json/name`. + public var name: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - memberIds: + /// - name: + public init( + memberIds: [Swift.String]? = nil, + name: Swift.String? = nil + ) { + self.memberIds = memberIds + self.name = name + } + public enum CodingKeys: String, CodingKey { + case memberIds + case name + } + } + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/requestBody/content/application\/json`. + case json(Operations.UpdateGroupChat.Input.Body.JsonPayload) + } + public var body: Operations.UpdateGroupChat.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: + /// - body: public init( - path: Operations.StreamGroupChatEvents.Input.Path, - query: Operations.StreamGroupChatEvents.Input.Query = .init(), - headers: Operations.StreamGroupChatEvents.Input.Headers = .init() + path: Operations.UpdateGroupChat.Input.Path, + headers: Operations.UpdateGroupChat.Input.Headers = .init(), + body: Operations.UpdateGroupChat.Input.Body ) { self.path = path - self.query = query self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/200/content/text\/event-stream`. - case textEventStream(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.textEventStream`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/200/content/application\/json`. + case json(Components.Schemas.GroupChat) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.textEventStream`. - /// - SeeAlso: `.textEventStream`. - public var textEventStream: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.GroupChat { get throws { switch self { - case let .textEventStream(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.StreamGroupChatEvents.Output.Ok.Body + public var body: Operations.UpdateGroupChat.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamGroupChatEvents.Output.Ok.Body) { + public init(body: Operations.UpdateGroupChat.Output.Ok.Body) { self.body = body } } - /// SSE stream, not a JSON array + /// Success /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/200`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.StreamGroupChatEvents.Output.Ok) + case ok(Operations.UpdateGroupChat.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.StreamGroupChatEvents.Output.Ok { + public var ok: Operations.UpdateGroupChat.Output.Ok { get throws { switch self { case let .ok(response): @@ -52876,9 +53030,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -52894,26 +53048,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamGroupChatEvents.Output.BadRequest.Body + public var body: Operations.UpdateGroupChat.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamGroupChatEvents.Output.BadRequest.Body) { + public init(body: Operations.UpdateGroupChat.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/400`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.StreamGroupChatEvents.Output.BadRequest) + case badRequest(Operations.UpdateGroupChat.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.StreamGroupChatEvents.Output.BadRequest { + public var badRequest: Operations.UpdateGroupChat.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -52927,9 +53081,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -52945,26 +53099,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamGroupChatEvents.Output.Unauthorized.Body + public var body: Operations.UpdateGroupChat.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamGroupChatEvents.Output.Unauthorized.Body) { + public init(body: Operations.UpdateGroupChat.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/401`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.StreamGroupChatEvents.Output.Unauthorized) + case unauthorized(Operations.UpdateGroupChat.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.StreamGroupChatEvents.Output.Unauthorized { + public var unauthorized: Operations.UpdateGroupChat.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -52978,9 +53132,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -52996,26 +53150,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamGroupChatEvents.Output.NotFound.Body + public var body: Operations.UpdateGroupChat.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamGroupChatEvents.Output.NotFound.Body) { + public init(body: Operations.UpdateGroupChat.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/404`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.StreamGroupChatEvents.Output.NotFound) + case notFound(Operations.UpdateGroupChat.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.StreamGroupChatEvents.Output.NotFound { + public var notFound: Operations.UpdateGroupChat.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -53029,9 +53183,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -53047,26 +53201,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamGroupChatEvents.Output.MethodNotAllowed.Body + public var body: Operations.UpdateGroupChat.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamGroupChatEvents.Output.MethodNotAllowed.Body) { + public init(body: Operations.UpdateGroupChat.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/405`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.StreamGroupChatEvents.Output.MethodNotAllowed) + case methodNotAllowed(Operations.UpdateGroupChat.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.StreamGroupChatEvents.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.UpdateGroupChat.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -53080,9 +53234,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -53098,26 +53252,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamGroupChatEvents.Output.Conflict.Body + public var body: Operations.UpdateGroupChat.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamGroupChatEvents.Output.Conflict.Body) { + public init(body: Operations.UpdateGroupChat.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/409`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.StreamGroupChatEvents.Output.Conflict) + case conflict(Operations.UpdateGroupChat.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.StreamGroupChatEvents.Output.Conflict { + public var conflict: Operations.UpdateGroupChat.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -53131,9 +53285,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -53149,26 +53303,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamGroupChatEvents.Output.ContentTooLarge.Body + public var body: Operations.UpdateGroupChat.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamGroupChatEvents.Output.ContentTooLarge.Body) { + public init(body: Operations.UpdateGroupChat.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/413`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.StreamGroupChatEvents.Output.ContentTooLarge) + case contentTooLarge(Operations.UpdateGroupChat.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.StreamGroupChatEvents.Output.ContentTooLarge { + public var contentTooLarge: Operations.UpdateGroupChat.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -53182,9 +53336,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -53200,26 +53354,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamGroupChatEvents.Output.InternalServerError.Body + public var body: Operations.UpdateGroupChat.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamGroupChatEvents.Output.InternalServerError.Body) { + public init(body: Operations.UpdateGroupChat.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/500`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.StreamGroupChatEvents.Output.InternalServerError) + case internalServerError(Operations.UpdateGroupChat.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.StreamGroupChatEvents.Output.InternalServerError { + public var internalServerError: Operations.UpdateGroupChat.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -53233,9 +53387,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/PATCH/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -53251,26 +53405,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StreamGroupChatEvents.Output.ServiceUnavailable.Body + public var body: Operations.UpdateGroupChat.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StreamGroupChatEvents.Output.ServiceUnavailable.Body) { + public init(body: Operations.UpdateGroupChat.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/503`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/patch(updateGroupChat)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.StreamGroupChatEvents.Output.ServiceUnavailable) + case serviceUnavailable(Operations.UpdateGroupChat.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.StreamGroupChatEvents.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.UpdateGroupChat.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -53289,14 +53443,11 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } @frozen public enum AcceptableContentType: AcceptableProtocol { - case textEventStream case json case plainText case other(Swift.String) public init?(rawValue: Swift.String) { switch rawValue.lowercased() { - case "text/event-stream": - self = .textEventStream case "application/json": self = .json case "text/plain": @@ -53309,8 +53460,6 @@ public enum Operations { switch self { case let .other(string): return string - case .textEventStream: - return "text/event-stream" case .json: return "application/json" case .plainText: @@ -53319,21 +53468,20 @@ public enum Operations { } public static var allCases: [Self] { [ - .textEventStream, .json, .plainText ] } } } - /// - Remark: HTTP `GET /v1/group-chats/{id}/history`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)`. - public enum GetGroupChatHistory { - public static let id: Swift.String = "getGroupChatHistory" + /// - Remark: HTTP `DELETE /v1/group-chats/{id}`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)`. + public enum DeleteGroupChat { + public static let id: Swift.String = "deleteGroupChat" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/path`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -53343,111 +53491,72 @@ public enum Operations { self.id = id } } - public var path: Operations.GetGroupChatHistory.Input.Path - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/query/limit`. - public var limit: Swift.Int? - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/query/before`. - public var before: Swift.String? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - /// - before: - public init( - limit: Swift.Int? = nil, - before: Swift.String? = nil - ) { - self.limit = limit - self.before = before - } - } - public var query: Operations.GetGroupChatHistory.Input.Query - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/header`. + public var path: Operations.DeleteGroupChat.Input.Path + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetGroupChatHistory.Input.Headers + public var headers: Operations.DeleteGroupChat.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: public init( - path: Operations.GetGroupChatHistory.Input.Path, - query: Operations.GetGroupChatHistory.Input.Query = .init(), - headers: Operations.GetGroupChatHistory.Input.Headers = .init() + path: Operations.DeleteGroupChat.Input.Path, + headers: Operations.DeleteGroupChat.Input.Headers = .init() ) { self.path = path - self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/200/content/application\/json`. - case json(Components.Schemas.TranscriptPage) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.TranscriptPage { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.GetGroupChatHistory.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatHistory.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/200`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.GetGroupChatHistory.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteGroupChat.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.GetGroupChatHistory.Output.Ok { + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteGroupChat.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -53463,26 +53572,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatHistory.Output.BadRequest.Body + public var body: Operations.DeleteGroupChat.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatHistory.Output.BadRequest.Body) { + public init(body: Operations.DeleteGroupChat.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/400`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetGroupChatHistory.Output.BadRequest) + case badRequest(Operations.DeleteGroupChat.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetGroupChatHistory.Output.BadRequest { + public var badRequest: Operations.DeleteGroupChat.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -53496,9 +53605,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -53514,26 +53623,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatHistory.Output.Unauthorized.Body + public var body: Operations.DeleteGroupChat.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatHistory.Output.Unauthorized.Body) { + public init(body: Operations.DeleteGroupChat.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/401`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetGroupChatHistory.Output.Unauthorized) + case unauthorized(Operations.DeleteGroupChat.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetGroupChatHistory.Output.Unauthorized { + public var unauthorized: Operations.DeleteGroupChat.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -53547,9 +53656,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -53565,26 +53674,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatHistory.Output.NotFound.Body + public var body: Operations.DeleteGroupChat.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatHistory.Output.NotFound.Body) { + public init(body: Operations.DeleteGroupChat.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/404`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetGroupChatHistory.Output.NotFound) + case notFound(Operations.DeleteGroupChat.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetGroupChatHistory.Output.NotFound { + public var notFound: Operations.DeleteGroupChat.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -53598,9 +53707,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -53616,26 +53725,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatHistory.Output.MethodNotAllowed.Body + public var body: Operations.DeleteGroupChat.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatHistory.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteGroupChat.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/405`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetGroupChatHistory.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteGroupChat.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetGroupChatHistory.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteGroupChat.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -53649,9 +53758,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -53667,26 +53776,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatHistory.Output.Conflict.Body + public var body: Operations.DeleteGroupChat.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatHistory.Output.Conflict.Body) { + public init(body: Operations.DeleteGroupChat.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/409`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetGroupChatHistory.Output.Conflict) + case conflict(Operations.DeleteGroupChat.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetGroupChatHistory.Output.Conflict { + public var conflict: Operations.DeleteGroupChat.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -53700,9 +53809,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -53718,26 +53827,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatHistory.Output.ContentTooLarge.Body + public var body: Operations.DeleteGroupChat.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatHistory.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteGroupChat.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/413`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetGroupChatHistory.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteGroupChat.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetGroupChatHistory.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteGroupChat.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -53751,9 +53860,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -53769,26 +53878,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatHistory.Output.InternalServerError.Body + public var body: Operations.DeleteGroupChat.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatHistory.Output.InternalServerError.Body) { + public init(body: Operations.DeleteGroupChat.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/500`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetGroupChatHistory.Output.InternalServerError) + case internalServerError(Operations.DeleteGroupChat.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetGroupChatHistory.Output.InternalServerError { + public var internalServerError: Operations.DeleteGroupChat.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -53802,9 +53911,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -53820,26 +53929,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetGroupChatHistory.Output.ServiceUnavailable.Body + public var body: Operations.DeleteGroupChat.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetGroupChatHistory.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteGroupChat.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/503`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/delete(deleteGroupChat)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetGroupChatHistory.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteGroupChat.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetGroupChatHistory.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteGroupChat.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -53889,180 +53998,138 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/group-chats/{id}/messages`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)`. - public enum SendGroupMessage { - public static let id: Swift.String = "sendGroupMessage" + /// - Remark: HTTP `GET /v1/group-chats/{id}/attachments/{entryId}/{index}`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)`. + public enum GetGroupAttachment { + public static let id: Swift.String = "getGroupAttachment" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/path`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/path/id`. public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/path/entryId`. + public var entryId: Swift.String + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/path/index`. + public var index: Swift.Int /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + /// - entryId: + /// - index: + public init( + id: Swift.String, + entryId: Swift.String, + index: Swift.Int + ) { self.id = id + self.entryId = entryId + self.index = index } } - public var path: Operations.SendGroupMessage.Input.Path - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/header`. + public var path: Operations.GetGroupAttachment.Input.Path + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SendGroupMessage.Input.Headers - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/AttachmentsPayload`. - public struct AttachmentsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/AttachmentsPayload/data`. - public var data: Swift.String - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/AttachmentsPayload/mimeType`. - public var mimeType: Swift.String - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/AttachmentsPayload/name`. - public var name: Swift.String - /// Creates a new `AttachmentsPayloadPayload`. - /// - /// - Parameters: - /// - data: - /// - mimeType: - /// - name: - public init( - data: Swift.String, - mimeType: Swift.String, - name: Swift.String - ) { - self.data = data - self.mimeType = mimeType - self.name = name - } - public enum CodingKeys: String, CodingKey { - case data - case mimeType - case name - } - } - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/attachments`. - public typealias AttachmentsPayload = [Operations.SendGroupMessage.Input.Body.JsonPayload.AttachmentsPayloadPayload] - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/attachments`. - public var attachments: Operations.SendGroupMessage.Input.Body.JsonPayload.AttachmentsPayload? - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/content`. - public var content: Swift.String - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/replyTo`. - public var replyTo: Swift.String? - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/requestId`. - public var requestId: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - attachments: - /// - content: - /// - replyTo: - /// - requestId: - public init( - attachments: Operations.SendGroupMessage.Input.Body.JsonPayload.AttachmentsPayload? = nil, - content: Swift.String, - replyTo: Swift.String? = nil, - requestId: Swift.String - ) { - self.attachments = attachments - self.content = content - self.replyTo = replyTo - self.requestId = requestId - } - public enum CodingKeys: String, CodingKey { - case attachments - case content - case replyTo - case requestId - } - } - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/content/application\/json`. - case json(Operations.SendGroupMessage.Input.Body.JsonPayload) - } - public var body: Operations.SendGroupMessage.Input.Body + public var headers: Operations.GetGroupAttachment.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.SendGroupMessage.Input.Path, - headers: Operations.SendGroupMessage.Input.Headers = .init(), - body: Operations.SendGroupMessage.Input.Body + path: Operations.GetGroupAttachment.Input.Path, + headers: Operations.GetGroupAttachment.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/200/headers`. + public struct Headers: Sendable, Hashable { + /// private, max-age=31536000, immutable + /// + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/200/headers/Cache-Control`. + public var cacheControl: Swift.String? + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - cacheControl: private, max-age=31536000, immutable + public init(cacheControl: Swift.String? = nil) { + self.cacheControl = cacheControl + } + } + /// Received HTTP response headers + public var headers: Operations.GetGroupAttachment.Output.Ok.Headers + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/201/content/application\/json`. - case json(Components.Schemas.GroupMessageReceipt) - /// The associated value of the enum case if `self` is `.json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/200/content/*\/*`. + case any(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.any`. /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.GroupMessageReceipt { + /// - Throws: An error if `self` is not `.any`. + /// - SeeAlso: `.any`. + public var any: OpenAPIRuntime.HTTPBody { get throws { switch self { - case let .json(body): + case let .any(body): return body } } } } /// Received HTTP response body - public var body: Operations.SendGroupMessage.Output.Created.Body - /// Creates a new `Created`. + public var body: Operations.GetGroupAttachment.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: + /// - headers: Received HTTP response headers /// - body: Received HTTP response body - public init(body: Operations.SendGroupMessage.Output.Created.Body) { + public init( + headers: Operations.GetGroupAttachment.Output.Ok.Headers = .init(), + body: Operations.GetGroupAttachment.Output.Ok.Body + ) { + self.headers = headers self.body = body } } - /// Success + /// Attachment bytes; Content-Type identifies the image or text format /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/201`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/200`. /// - /// HTTP response code: `201 created`. - case created(Operations.SendGroupMessage.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `200 ok`. + case ok(Operations.GetGroupAttachment.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.SendGroupMessage.Output.Created { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetGroupAttachment.Output.Ok { get throws { switch self { - case let .created(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54078,26 +54145,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendGroupMessage.Output.BadRequest.Body + public var body: Operations.GetGroupAttachment.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendGroupMessage.Output.BadRequest.Body) { + public init(body: Operations.GetGroupAttachment.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/400`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SendGroupMessage.Output.BadRequest) + case badRequest(Operations.GetGroupAttachment.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SendGroupMessage.Output.BadRequest { + public var badRequest: Operations.GetGroupAttachment.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -54111,9 +54178,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -54129,26 +54196,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendGroupMessage.Output.Unauthorized.Body + public var body: Operations.GetGroupAttachment.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendGroupMessage.Output.Unauthorized.Body) { + public init(body: Operations.GetGroupAttachment.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/401`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SendGroupMessage.Output.Unauthorized) + case unauthorized(Operations.GetGroupAttachment.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SendGroupMessage.Output.Unauthorized { + public var unauthorized: Operations.GetGroupAttachment.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -54162,9 +54229,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54180,26 +54247,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendGroupMessage.Output.NotFound.Body + public var body: Operations.GetGroupAttachment.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendGroupMessage.Output.NotFound.Body) { + public init(body: Operations.GetGroupAttachment.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/404`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SendGroupMessage.Output.NotFound) + case notFound(Operations.GetGroupAttachment.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SendGroupMessage.Output.NotFound { + public var notFound: Operations.GetGroupAttachment.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -54213,9 +54280,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54231,26 +54298,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendGroupMessage.Output.MethodNotAllowed.Body + public var body: Operations.GetGroupAttachment.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendGroupMessage.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetGroupAttachment.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/405`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SendGroupMessage.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetGroupAttachment.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SendGroupMessage.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetGroupAttachment.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -54264,9 +54331,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54282,26 +54349,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendGroupMessage.Output.Conflict.Body + public var body: Operations.GetGroupAttachment.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendGroupMessage.Output.Conflict.Body) { + public init(body: Operations.GetGroupAttachment.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/409`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SendGroupMessage.Output.Conflict) + case conflict(Operations.GetGroupAttachment.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SendGroupMessage.Output.Conflict { + public var conflict: Operations.GetGroupAttachment.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -54315,9 +54382,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -54333,26 +54400,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendGroupMessage.Output.ContentTooLarge.Body + public var body: Operations.GetGroupAttachment.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendGroupMessage.Output.ContentTooLarge.Body) { + public init(body: Operations.GetGroupAttachment.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/413`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SendGroupMessage.Output.ContentTooLarge) + case contentTooLarge(Operations.GetGroupAttachment.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SendGroupMessage.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetGroupAttachment.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -54366,9 +54433,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54384,26 +54451,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendGroupMessage.Output.InternalServerError.Body + public var body: Operations.GetGroupAttachment.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendGroupMessage.Output.InternalServerError.Body) { + public init(body: Operations.GetGroupAttachment.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/500`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SendGroupMessage.Output.InternalServerError) + case internalServerError(Operations.GetGroupAttachment.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SendGroupMessage.Output.InternalServerError { + public var internalServerError: Operations.GetGroupAttachment.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -54417,9 +54484,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/attachments/{entryId}/{index}/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54435,26 +54502,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SendGroupMessage.Output.ServiceUnavailable.Body + public var body: Operations.GetGroupAttachment.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SendGroupMessage.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetGroupAttachment.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/503`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/attachments/{entryId}/{index}/get(getGroupAttachment)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SendGroupMessage.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetGroupAttachment.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SendGroupMessage.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetGroupAttachment.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -54473,11 +54540,14 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } @frozen public enum AcceptableContentType: AcceptableProtocol { + case any case json case plainText case other(Swift.String) public init?(rawValue: Swift.String) { switch rawValue.lowercased() { + case "*/*": + self = .any case "application/json": self = .json case "text/plain": @@ -54490,6 +54560,8 @@ public enum Operations { switch self { case let .other(string): return string + case .any: + return "*/*" case .json: return "application/json" case .plainText: @@ -54498,22 +54570,21 @@ public enum Operations { } public static var allCases: [Self] { [ + .any, .json, .plainText ] } } } - /// Ends every running bot turn in the group and drops the queued ones. The group is not paused; the next message starts turns again. - /// - /// - Remark: HTTP `POST /v1/group-chats/{id}/stop`. - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)`. - public enum StopGroupChat { - public static let id: Swift.String = "stopGroupChat" + /// - Remark: HTTP `GET /v1/group-chats/{id}/chat`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)`. + public enum GetGroupChatSnapshot { + public static let id: Swift.String = "getGroupChatSnapshot" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/path`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -54523,72 +54594,104 @@ public enum Operations { self.id = id } } - public var path: Operations.StopGroupChat.Input.Path - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/header`. + public var path: Operations.GetGroupChatSnapshot.Input.Path + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/query/limit`. + public var limit: Swift.Int? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + public init(limit: Swift.Int? = nil) { + self.limit = limit + } + } + public var query: Operations.GetGroupChatSnapshot.Input.Query + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.StopGroupChat.Input.Headers + public var headers: Operations.GetGroupChatSnapshot.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.StopGroupChat.Input.Path, - headers: Operations.StopGroupChat.Input.Headers = .init() + path: Operations.GetGroupChatSnapshot.Input.Path, + query: Operations.GetGroupChatSnapshot.Input.Query = .init(), + headers: Operations.GetGroupChatSnapshot.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/200/content/application\/json`. + case json(Components.Schemas.GroupChatSnapshot) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.GroupChatSnapshot { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetGroupChatSnapshot.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetGroupChatSnapshot.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.StopGroupChat.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/204`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.GetGroupChatSnapshot.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.StopGroupChat.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetGroupChatSnapshot.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54604,26 +54707,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StopGroupChat.Output.BadRequest.Body + public var body: Operations.GetGroupChatSnapshot.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StopGroupChat.Output.BadRequest.Body) { + public init(body: Operations.GetGroupChatSnapshot.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/400`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.StopGroupChat.Output.BadRequest) + case badRequest(Operations.GetGroupChatSnapshot.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.StopGroupChat.Output.BadRequest { + public var badRequest: Operations.GetGroupChatSnapshot.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -54637,9 +54740,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -54655,26 +54758,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StopGroupChat.Output.Unauthorized.Body + public var body: Operations.GetGroupChatSnapshot.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StopGroupChat.Output.Unauthorized.Body) { + public init(body: Operations.GetGroupChatSnapshot.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/401`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.StopGroupChat.Output.Unauthorized) + case unauthorized(Operations.GetGroupChatSnapshot.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.StopGroupChat.Output.Unauthorized { + public var unauthorized: Operations.GetGroupChatSnapshot.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -54688,9 +54791,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54706,26 +54809,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StopGroupChat.Output.NotFound.Body + public var body: Operations.GetGroupChatSnapshot.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StopGroupChat.Output.NotFound.Body) { + public init(body: Operations.GetGroupChatSnapshot.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/404`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.StopGroupChat.Output.NotFound) + case notFound(Operations.GetGroupChatSnapshot.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.StopGroupChat.Output.NotFound { + public var notFound: Operations.GetGroupChatSnapshot.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -54739,9 +54842,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54757,26 +54860,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StopGroupChat.Output.MethodNotAllowed.Body + public var body: Operations.GetGroupChatSnapshot.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StopGroupChat.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetGroupChatSnapshot.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/405`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.StopGroupChat.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetGroupChatSnapshot.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.StopGroupChat.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetGroupChatSnapshot.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -54790,9 +54893,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54808,26 +54911,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StopGroupChat.Output.Conflict.Body + public var body: Operations.GetGroupChatSnapshot.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StopGroupChat.Output.Conflict.Body) { + public init(body: Operations.GetGroupChatSnapshot.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/409`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.StopGroupChat.Output.Conflict) + case conflict(Operations.GetGroupChatSnapshot.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.StopGroupChat.Output.Conflict { + public var conflict: Operations.GetGroupChatSnapshot.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -54841,9 +54944,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -54859,26 +54962,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StopGroupChat.Output.ContentTooLarge.Body + public var body: Operations.GetGroupChatSnapshot.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StopGroupChat.Output.ContentTooLarge.Body) { + public init(body: Operations.GetGroupChatSnapshot.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/413`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.StopGroupChat.Output.ContentTooLarge) + case contentTooLarge(Operations.GetGroupChatSnapshot.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.StopGroupChat.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetGroupChatSnapshot.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -54892,9 +54995,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54910,26 +55013,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StopGroupChat.Output.InternalServerError.Body + public var body: Operations.GetGroupChatSnapshot.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StopGroupChat.Output.InternalServerError.Body) { + public init(body: Operations.GetGroupChatSnapshot.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/500`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.StopGroupChat.Output.InternalServerError) + case internalServerError(Operations.GetGroupChatSnapshot.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.StopGroupChat.Output.InternalServerError { + public var internalServerError: Operations.GetGroupChatSnapshot.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -54943,9 +55046,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/chat/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -54961,26 +55064,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StopGroupChat.Output.ServiceUnavailable.Body + public var body: Operations.GetGroupChatSnapshot.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StopGroupChat.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetGroupChatSnapshot.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/503`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/chat/get(getGroupChatSnapshot)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.StopGroupChat.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetGroupChatSnapshot.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.StopGroupChat.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetGroupChatSnapshot.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -55030,73 +55133,107 @@ public enum Operations { } } } - /// The account's judge model for desktop jobs' intent checks, and the models the account's provider keys reach. + /// Server-sent events. Each snapshot event carries a GroupChatSnapshot JSON object in data, sent on connection and after every change. Heartbeat events carry {} every 15 seconds. Authenticate with the Authorization header. Reconnect by fetching the current snapshot; there is no Last-Event-ID replay. /// - /// - Remark: HTTP `GET /v1/judge-model`. - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)`. - public enum GetJudgeModel { - public static let id: Swift.String = "getJudgeModel" + /// - Remark: HTTP `GET /v1/group-chats/{id}/events`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)`. + public enum StreamGroupChatEvents { + public static let id: Swift.String = "streamGroupChatEvents" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/header`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.StreamGroupChatEvents.Input.Path + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/query/limit`. + public var limit: Swift.Int? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + public init(limit: Swift.Int? = nil) { + self.limit = limit + } + } + public var query: Operations.StreamGroupChatEvents.Input.Query + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetJudgeModel.Input.Headers + public var headers: Operations.StreamGroupChatEvents.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: + /// - query: /// - headers: - public init(headers: Operations.GetJudgeModel.Input.Headers = .init()) { + public init( + path: Operations.StreamGroupChatEvents.Input.Path, + query: Operations.StreamGroupChatEvents.Input.Query = .init(), + headers: Operations.StreamGroupChatEvents.Input.Headers = .init() + ) { + self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/200/content/application\/json`. - case json(Components.Schemas.JudgeModel) - /// The associated value of the enum case if `self` is `.json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/200/content/text\/event-stream`. + case textEventStream(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.textEventStream`. /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.JudgeModel { + /// - Throws: An error if `self` is not `.textEventStream`. + /// - SeeAlso: `.textEventStream`. + public var textEventStream: OpenAPIRuntime.HTTPBody { get throws { switch self { - case let .json(body): + case let .textEventStream(body): return body } } } } /// Received HTTP response body - public var body: Operations.GetJudgeModel.Output.Ok.Body + public var body: Operations.StreamGroupChatEvents.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetJudgeModel.Output.Ok.Body) { + public init(body: Operations.StreamGroupChatEvents.Output.Ok.Body) { self.body = body } } - /// Success + /// SSE stream, not a JSON array /// - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/200`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.GetJudgeModel.Output.Ok) + case ok(Operations.StreamGroupChatEvents.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.GetJudgeModel.Output.Ok { + public var ok: Operations.StreamGroupChatEvents.Output.Ok { get throws { switch self { case let .ok(response): @@ -55110,9 +55247,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -55128,26 +55265,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetJudgeModel.Output.BadRequest.Body + public var body: Operations.StreamGroupChatEvents.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetJudgeModel.Output.BadRequest.Body) { + public init(body: Operations.StreamGroupChatEvents.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/400`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetJudgeModel.Output.BadRequest) + case badRequest(Operations.StreamGroupChatEvents.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetJudgeModel.Output.BadRequest { + public var badRequest: Operations.StreamGroupChatEvents.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -55161,9 +55298,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -55179,26 +55316,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetJudgeModel.Output.Unauthorized.Body + public var body: Operations.StreamGroupChatEvents.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetJudgeModel.Output.Unauthorized.Body) { + public init(body: Operations.StreamGroupChatEvents.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/401`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetJudgeModel.Output.Unauthorized) + case unauthorized(Operations.StreamGroupChatEvents.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetJudgeModel.Output.Unauthorized { + public var unauthorized: Operations.StreamGroupChatEvents.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -55212,9 +55349,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -55230,26 +55367,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetJudgeModel.Output.NotFound.Body + public var body: Operations.StreamGroupChatEvents.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetJudgeModel.Output.NotFound.Body) { + public init(body: Operations.StreamGroupChatEvents.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/404`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetJudgeModel.Output.NotFound) + case notFound(Operations.StreamGroupChatEvents.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetJudgeModel.Output.NotFound { + public var notFound: Operations.StreamGroupChatEvents.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -55263,9 +55400,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -55281,26 +55418,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetJudgeModel.Output.MethodNotAllowed.Body + public var body: Operations.StreamGroupChatEvents.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetJudgeModel.Output.MethodNotAllowed.Body) { + public init(body: Operations.StreamGroupChatEvents.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/405`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetJudgeModel.Output.MethodNotAllowed) + case methodNotAllowed(Operations.StreamGroupChatEvents.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetJudgeModel.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.StreamGroupChatEvents.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -55314,9 +55451,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -55332,26 +55469,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetJudgeModel.Output.Conflict.Body + public var body: Operations.StreamGroupChatEvents.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetJudgeModel.Output.Conflict.Body) { + public init(body: Operations.StreamGroupChatEvents.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/409`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetJudgeModel.Output.Conflict) + case conflict(Operations.StreamGroupChatEvents.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetJudgeModel.Output.Conflict { + public var conflict: Operations.StreamGroupChatEvents.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -55365,9 +55502,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -55383,26 +55520,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetJudgeModel.Output.ContentTooLarge.Body + public var body: Operations.StreamGroupChatEvents.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetJudgeModel.Output.ContentTooLarge.Body) { + public init(body: Operations.StreamGroupChatEvents.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/413`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetJudgeModel.Output.ContentTooLarge) + case contentTooLarge(Operations.StreamGroupChatEvents.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetJudgeModel.Output.ContentTooLarge { + public var contentTooLarge: Operations.StreamGroupChatEvents.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -55416,9 +55553,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -55434,26 +55571,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetJudgeModel.Output.InternalServerError.Body + public var body: Operations.StreamGroupChatEvents.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetJudgeModel.Output.InternalServerError.Body) { + public init(body: Operations.StreamGroupChatEvents.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/500`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetJudgeModel.Output.InternalServerError) + case internalServerError(Operations.StreamGroupChatEvents.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetJudgeModel.Output.InternalServerError { + public var internalServerError: Operations.StreamGroupChatEvents.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -55467,9 +55604,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/events/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -55485,26 +55622,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetJudgeModel.Output.ServiceUnavailable.Body + public var body: Operations.StreamGroupChatEvents.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetJudgeModel.Output.ServiceUnavailable.Body) { + public init(body: Operations.StreamGroupChatEvents.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/503`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/events/get(streamGroupChatEvents)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetJudgeModel.Output.ServiceUnavailable) + case serviceUnavailable(Operations.StreamGroupChatEvents.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetJudgeModel.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.StreamGroupChatEvents.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -55523,11 +55660,14 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } @frozen public enum AcceptableContentType: AcceptableProtocol { + case textEventStream case json case plainText case other(Swift.String) public init?(rawValue: Swift.String) { switch rawValue.lowercased() { + case "text/event-stream": + self = .textEventStream case "application/json": self = .json case "text/plain": @@ -55540,6 +55680,8 @@ public enum Operations { switch self { case let .other(string): return string + case .textEventStream: + return "text/event-stream" case .json: return "application/json" case .plainText: @@ -55548,97 +55690,90 @@ public enum Operations { } public static var allCases: [Self] { [ + .textEventStream, .json, .plainText ] } } } - /// - Remark: HTTP `PUT /v1/judge-model`. - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)`. - public enum UpdateJudgeModel { - public static let id: Swift.String = "updateJudgeModel" + /// - Remark: HTTP `GET /v1/group-chats/{id}/history`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)`. + public enum GetGroupChatHistory { + public static let id: Swift.String = "getGroupChatHistory" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/header`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.GetGroupChatHistory.Input.Path + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/query/limit`. + public var limit: Swift.Int? + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/query/before`. + public var before: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - before: + public init( + limit: Swift.Int? = nil, + before: Swift.String? = nil + ) { + self.limit = limit + self.before = before + } + } + public var query: Operations.GetGroupChatHistory.Input.Query + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateJudgeModel.Input.Headers - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/json/judgeModel`. - public struct JudgeModelPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/json/judgeModel/model`. - public var model: Swift.String - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/json/judgeModel/provider`. - public var provider: Swift.String - /// Creates a new `JudgeModelPayload`. - /// - /// - Parameters: - /// - model: - /// - provider: - public init( - model: Swift.String, - provider: Swift.String - ) { - self.model = model - self.provider = provider - } - public enum CodingKeys: String, CodingKey { - case model - case provider - } - } - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/json/judgeModel`. - public var judgeModel: Operations.UpdateJudgeModel.Input.Body.JsonPayload.JudgeModelPayload? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - judgeModel: - public init(judgeModel: Operations.UpdateJudgeModel.Input.Body.JsonPayload.JudgeModelPayload? = nil) { - self.judgeModel = judgeModel - } - public enum CodingKeys: String, CodingKey { - case judgeModel - } - } - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/content/application\/json`. - case json(Operations.UpdateJudgeModel.Input.Body.JsonPayload) - } - public var body: Operations.UpdateJudgeModel.Input.Body + public var headers: Operations.GetGroupChatHistory.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: + /// - query: /// - headers: - /// - body: public init( - headers: Operations.UpdateJudgeModel.Input.Headers = .init(), - body: Operations.UpdateJudgeModel.Input.Body + path: Operations.GetGroupChatHistory.Input.Path, + query: Operations.GetGroupChatHistory.Input.Query = .init(), + headers: Operations.GetGroupChatHistory.Input.Headers = .init() ) { + self.path = path + self.query = query self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.JudgeModel) + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/200/content/application\/json`. + case json(Components.Schemas.TranscriptPage) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.JudgeModel { + public var json: Components.Schemas.TranscriptPage { get throws { switch self { case let .json(body): @@ -55648,26 +55783,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateJudgeModel.Output.Ok.Body + public var body: Operations.GetGroupChatHistory.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateJudgeModel.Output.Ok.Body) { + public init(body: Operations.GetGroupChatHistory.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/200`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.UpdateJudgeModel.Output.Ok) + case ok(Operations.GetGroupChatHistory.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateJudgeModel.Output.Ok { + public var ok: Operations.GetGroupChatHistory.Output.Ok { get throws { switch self { case let .ok(response): @@ -55681,9 +55816,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -55699,26 +55834,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateJudgeModel.Output.BadRequest.Body + public var body: Operations.GetGroupChatHistory.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateJudgeModel.Output.BadRequest.Body) { + public init(body: Operations.GetGroupChatHistory.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/400`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateJudgeModel.Output.BadRequest) + case badRequest(Operations.GetGroupChatHistory.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateJudgeModel.Output.BadRequest { + public var badRequest: Operations.GetGroupChatHistory.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -55732,9 +55867,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -55750,26 +55885,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateJudgeModel.Output.Unauthorized.Body + public var body: Operations.GetGroupChatHistory.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateJudgeModel.Output.Unauthorized.Body) { + public init(body: Operations.GetGroupChatHistory.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/401`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateJudgeModel.Output.Unauthorized) + case unauthorized(Operations.GetGroupChatHistory.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateJudgeModel.Output.Unauthorized { + public var unauthorized: Operations.GetGroupChatHistory.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -55783,9 +55918,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -55801,26 +55936,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateJudgeModel.Output.NotFound.Body + public var body: Operations.GetGroupChatHistory.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateJudgeModel.Output.NotFound.Body) { + public init(body: Operations.GetGroupChatHistory.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/404`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateJudgeModel.Output.NotFound) + case notFound(Operations.GetGroupChatHistory.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateJudgeModel.Output.NotFound { + public var notFound: Operations.GetGroupChatHistory.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -55834,9 +55969,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -55852,26 +55987,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateJudgeModel.Output.MethodNotAllowed.Body + public var body: Operations.GetGroupChatHistory.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateJudgeModel.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetGroupChatHistory.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/405`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateJudgeModel.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetGroupChatHistory.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateJudgeModel.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetGroupChatHistory.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -55885,9 +56020,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -55903,26 +56038,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateJudgeModel.Output.Conflict.Body + public var body: Operations.GetGroupChatHistory.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateJudgeModel.Output.Conflict.Body) { + public init(body: Operations.GetGroupChatHistory.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/409`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateJudgeModel.Output.Conflict) + case conflict(Operations.GetGroupChatHistory.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateJudgeModel.Output.Conflict { + public var conflict: Operations.GetGroupChatHistory.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -55936,9 +56071,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -55954,26 +56089,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateJudgeModel.Output.ContentTooLarge.Body + public var body: Operations.GetGroupChatHistory.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateJudgeModel.Output.ContentTooLarge.Body) { + public init(body: Operations.GetGroupChatHistory.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/413`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateJudgeModel.Output.ContentTooLarge) + case contentTooLarge(Operations.GetGroupChatHistory.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateJudgeModel.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetGroupChatHistory.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -55987,9 +56122,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -56005,26 +56140,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateJudgeModel.Output.InternalServerError.Body + public var body: Operations.GetGroupChatHistory.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateJudgeModel.Output.InternalServerError.Body) { + public init(body: Operations.GetGroupChatHistory.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/500`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateJudgeModel.Output.InternalServerError) + case internalServerError(Operations.GetGroupChatHistory.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateJudgeModel.Output.InternalServerError { + public var internalServerError: Operations.GetGroupChatHistory.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -56038,9 +56173,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/history/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -56056,26 +56191,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateJudgeModel.Output.ServiceUnavailable.Body + public var body: Operations.GetGroupChatHistory.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateJudgeModel.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetGroupChatHistory.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/503`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/history/get(getGroupChatHistory)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateJudgeModel.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetGroupChatHistory.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateJudgeModel.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetGroupChatHistory.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -56125,42 +56260,135 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/mcp-servers`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)`. - public enum ListMcpServers { - public static let id: Swift.String = "listMcpServers" + /// - Remark: HTTP `POST /v1/group-chats/{id}/messages`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)`. + public enum SendGroupMessage { + public static let id: Swift.String = "sendGroupMessage" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/header`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.SendGroupMessage.Input.Path + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListMcpServers.Input.Headers + public var headers: Operations.SendGroupMessage.Input.Headers + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/AttachmentsPayload`. + public struct AttachmentsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/AttachmentsPayload/data`. + public var data: Swift.String + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/AttachmentsPayload/mimeType`. + public var mimeType: Swift.String + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/AttachmentsPayload/name`. + public var name: Swift.String + /// Creates a new `AttachmentsPayloadPayload`. + /// + /// - Parameters: + /// - data: + /// - mimeType: + /// - name: + public init( + data: Swift.String, + mimeType: Swift.String, + name: Swift.String + ) { + self.data = data + self.mimeType = mimeType + self.name = name + } + public enum CodingKeys: String, CodingKey { + case data + case mimeType + case name + } + } + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/attachments`. + public typealias AttachmentsPayload = [Operations.SendGroupMessage.Input.Body.JsonPayload.AttachmentsPayloadPayload] + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/attachments`. + public var attachments: Operations.SendGroupMessage.Input.Body.JsonPayload.AttachmentsPayload? + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/content`. + public var content: Swift.String + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/replyTo`. + public var replyTo: Swift.String? + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/json/requestId`. + public var requestId: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - attachments: + /// - content: + /// - replyTo: + /// - requestId: + public init( + attachments: Operations.SendGroupMessage.Input.Body.JsonPayload.AttachmentsPayload? = nil, + content: Swift.String, + replyTo: Swift.String? = nil, + requestId: Swift.String + ) { + self.attachments = attachments + self.content = content + self.replyTo = replyTo + self.requestId = requestId + } + public enum CodingKeys: String, CodingKey { + case attachments + case content + case replyTo + case requestId + } + } + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/requestBody/content/application\/json`. + case json(Operations.SendGroupMessage.Input.Body.JsonPayload) + } + public var body: Operations.SendGroupMessage.Input.Body /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - public init(headers: Operations.ListMcpServers.Input.Headers = .init()) { + /// - body: + public init( + path: Operations.SendGroupMessage.Input.Path, + headers: Operations.SendGroupMessage.Input.Headers = .init(), + body: Operations.SendGroupMessage.Input.Body + ) { + self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/200/content`. + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/200/content/application\/json`. - case json([Components.Schemas.McpServerStatus]) + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/201/content/application\/json`. + case json(Components.Schemas.GroupMessageReceipt) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.McpServerStatus] { + public var json: Components.Schemas.GroupMessageReceipt { get throws { switch self { case let .json(body): @@ -56170,42 +56398,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListMcpServers.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.SendGroupMessage.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListMcpServers.Output.Ok.Body) { + public init(body: Operations.SendGroupMessage.Output.Created.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/200`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/201`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.ListMcpServers.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `201 created`. + case created(Operations.SendGroupMessage.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.ListMcpServers.Output.Ok { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.SendGroupMessage.Output.Created { get throws { switch self { - case let .ok(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "created", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -56221,26 +56449,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListMcpServers.Output.BadRequest.Body + public var body: Operations.SendGroupMessage.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListMcpServers.Output.BadRequest.Body) { + public init(body: Operations.SendGroupMessage.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/400`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListMcpServers.Output.BadRequest) + case badRequest(Operations.SendGroupMessage.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListMcpServers.Output.BadRequest { + public var badRequest: Operations.SendGroupMessage.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -56254,9 +56482,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -56272,26 +56500,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListMcpServers.Output.Unauthorized.Body + public var body: Operations.SendGroupMessage.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListMcpServers.Output.Unauthorized.Body) { + public init(body: Operations.SendGroupMessage.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/401`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListMcpServers.Output.Unauthorized) + case unauthorized(Operations.SendGroupMessage.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListMcpServers.Output.Unauthorized { + public var unauthorized: Operations.SendGroupMessage.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -56305,9 +56533,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -56323,26 +56551,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListMcpServers.Output.NotFound.Body + public var body: Operations.SendGroupMessage.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListMcpServers.Output.NotFound.Body) { + public init(body: Operations.SendGroupMessage.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/404`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListMcpServers.Output.NotFound) + case notFound(Operations.SendGroupMessage.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListMcpServers.Output.NotFound { + public var notFound: Operations.SendGroupMessage.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -56356,9 +56584,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -56374,26 +56602,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListMcpServers.Output.MethodNotAllowed.Body + public var body: Operations.SendGroupMessage.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListMcpServers.Output.MethodNotAllowed.Body) { + public init(body: Operations.SendGroupMessage.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/405`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListMcpServers.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SendGroupMessage.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListMcpServers.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SendGroupMessage.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -56407,9 +56635,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -56425,26 +56653,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListMcpServers.Output.Conflict.Body + public var body: Operations.SendGroupMessage.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListMcpServers.Output.Conflict.Body) { + public init(body: Operations.SendGroupMessage.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/409`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListMcpServers.Output.Conflict) + case conflict(Operations.SendGroupMessage.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListMcpServers.Output.Conflict { + public var conflict: Operations.SendGroupMessage.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -56458,9 +56686,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -56476,26 +56704,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListMcpServers.Output.ContentTooLarge.Body + public var body: Operations.SendGroupMessage.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListMcpServers.Output.ContentTooLarge.Body) { + public init(body: Operations.SendGroupMessage.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/413`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListMcpServers.Output.ContentTooLarge) + case contentTooLarge(Operations.SendGroupMessage.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListMcpServers.Output.ContentTooLarge { + public var contentTooLarge: Operations.SendGroupMessage.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -56509,9 +56737,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -56527,26 +56755,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListMcpServers.Output.InternalServerError.Body + public var body: Operations.SendGroupMessage.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListMcpServers.Output.InternalServerError.Body) { + public init(body: Operations.SendGroupMessage.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/500`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListMcpServers.Output.InternalServerError) + case internalServerError(Operations.SendGroupMessage.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListMcpServers.Output.InternalServerError { + public var internalServerError: Operations.SendGroupMessage.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -56560,9 +56788,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/messages/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -56578,26 +56806,2169 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListMcpServers.Output.ServiceUnavailable.Body + public var body: Operations.SendGroupMessage.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListMcpServers.Output.ServiceUnavailable.Body) { + public init(body: Operations.SendGroupMessage.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/503`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/messages/post(sendGroupMessage)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListMcpServers.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SendGroupMessage.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListMcpServers.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SendGroupMessage.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// Ends every running bot turn in the group and drops the queued ones. The group is not paused; the next message starts turns again. + /// + /// - Remark: HTTP `POST /v1/group-chats/{id}/stop`. + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)`. + public enum StopGroupChat { + public static let id: Swift.String = "stopGroupChat" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.StopGroupChat.Input.Path + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.StopGroupChat.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.StopGroupChat.Input.Path, + headers: Operations.StopGroupChat.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Success, no response body + /// + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.StopGroupChat.Output.NoContent) + /// Success, no response body + /// + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.StopGroupChat.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StopGroupChat.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StopGroupChat.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.StopGroupChat.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.StopGroupChat.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StopGroupChat.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StopGroupChat.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.StopGroupChat.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.StopGroupChat.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StopGroupChat.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StopGroupChat.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.StopGroupChat.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.StopGroupChat.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StopGroupChat.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StopGroupChat.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.StopGroupChat.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.StopGroupChat.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StopGroupChat.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StopGroupChat.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.StopGroupChat.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.StopGroupChat.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StopGroupChat.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StopGroupChat.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.StopGroupChat.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.StopGroupChat.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StopGroupChat.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StopGroupChat.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.StopGroupChat.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.StopGroupChat.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/group-chats/{id}/stop/POST/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StopGroupChat.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StopGroupChat.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/group-chats/{id}/stop/post(stopGroupChat)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.StopGroupChat.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.StopGroupChat.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// The account's judge model for desktop jobs' intent checks, and the models the account's provider keys reach. + /// + /// - Remark: HTTP `GET /v1/judge-model`. + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)`. + public enum GetJudgeModel { + public static let id: Swift.String = "getJudgeModel" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.GetJudgeModel.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + public init(headers: Operations.GetJudgeModel.Input.Headers = .init()) { + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/200/content/application\/json`. + case json(Components.Schemas.JudgeModel) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.JudgeModel { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetJudgeModel.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetJudgeModel.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.GetJudgeModel.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetJudgeModel.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetJudgeModel.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetJudgeModel.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.GetJudgeModel.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.GetJudgeModel.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetJudgeModel.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetJudgeModel.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.GetJudgeModel.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.GetJudgeModel.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetJudgeModel.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetJudgeModel.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.GetJudgeModel.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.GetJudgeModel.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetJudgeModel.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetJudgeModel.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.GetJudgeModel.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.GetJudgeModel.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetJudgeModel.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetJudgeModel.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.GetJudgeModel.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.GetJudgeModel.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetJudgeModel.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetJudgeModel.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.GetJudgeModel.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.GetJudgeModel.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetJudgeModel.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetJudgeModel.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.GetJudgeModel.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.GetJudgeModel.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/GET/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetJudgeModel.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetJudgeModel.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/judge-model/get(getJudgeModel)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.GetJudgeModel.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.GetJudgeModel.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `PUT /v1/judge-model`. + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)`. + public enum UpdateJudgeModel { + public static let id: Swift.String = "updateJudgeModel" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.UpdateJudgeModel.Input.Headers + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/json/judgeModel`. + public struct JudgeModelPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/json/judgeModel/model`. + public var model: Swift.String + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/json/judgeModel/provider`. + public var provider: Swift.String + /// Creates a new `JudgeModelPayload`. + /// + /// - Parameters: + /// - model: + /// - provider: + public init( + model: Swift.String, + provider: Swift.String + ) { + self.model = model + self.provider = provider + } + public enum CodingKeys: String, CodingKey { + case model + case provider + } + } + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/json/judgeModel`. + public var judgeModel: Operations.UpdateJudgeModel.Input.Body.JsonPayload.JudgeModelPayload? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - judgeModel: + public init(judgeModel: Operations.UpdateJudgeModel.Input.Body.JsonPayload.JudgeModelPayload? = nil) { + self.judgeModel = judgeModel + } + public enum CodingKeys: String, CodingKey { + case judgeModel + } + } + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/requestBody/content/application\/json`. + case json(Operations.UpdateJudgeModel.Input.Body.JsonPayload) + } + public var body: Operations.UpdateJudgeModel.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + /// - body: + public init( + headers: Operations.UpdateJudgeModel.Input.Headers = .init(), + body: Operations.UpdateJudgeModel.Input.Body + ) { + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.JudgeModel) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.JudgeModel { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateJudgeModel.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateJudgeModel.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.UpdateJudgeModel.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.UpdateJudgeModel.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateJudgeModel.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateJudgeModel.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.UpdateJudgeModel.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.UpdateJudgeModel.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateJudgeModel.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateJudgeModel.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.UpdateJudgeModel.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.UpdateJudgeModel.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateJudgeModel.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateJudgeModel.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.UpdateJudgeModel.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.UpdateJudgeModel.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateJudgeModel.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateJudgeModel.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.UpdateJudgeModel.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.UpdateJudgeModel.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateJudgeModel.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateJudgeModel.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.UpdateJudgeModel.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.UpdateJudgeModel.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateJudgeModel.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateJudgeModel.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.UpdateJudgeModel.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.UpdateJudgeModel.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateJudgeModel.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateJudgeModel.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.UpdateJudgeModel.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.UpdateJudgeModel.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/judge-model/PUT/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateJudgeModel.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateJudgeModel.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/judge-model/put(updateJudgeModel)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.UpdateJudgeModel.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.UpdateJudgeModel.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `GET /v1/mcp-servers`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)`. + public enum ListMcpServers { + public static let id: Swift.String = "listMcpServers" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.ListMcpServers.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + public init(headers: Operations.ListMcpServers.Input.Headers = .init()) { + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/200/content/application\/json`. + case json([Components.Schemas.McpServerStatus]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.McpServerStatus] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListMcpServers.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListMcpServers.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.ListMcpServers.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ListMcpServers.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListMcpServers.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListMcpServers.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.ListMcpServers.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.ListMcpServers.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListMcpServers.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListMcpServers.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.ListMcpServers.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.ListMcpServers.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListMcpServers.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListMcpServers.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.ListMcpServers.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.ListMcpServers.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListMcpServers.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListMcpServers.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.ListMcpServers.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.ListMcpServers.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListMcpServers.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListMcpServers.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.ListMcpServers.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.ListMcpServers.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListMcpServers.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListMcpServers.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.ListMcpServers.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.ListMcpServers.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListMcpServers.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListMcpServers.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.ListMcpServers.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.ListMcpServers.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/GET/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListMcpServers.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListMcpServers.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/get(listMcpServers)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.ListMcpServers.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.ListMcpServers.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -56652,233 +59023,7047 @@ public enum Operations { public enum CreateMcpServer { public static let id: Swift.String = "createMcpServer" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/header`. + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.CreateMcpServer.Input.Headers + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/agentId`. + public var agentId: Swift.String? + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/enabled`. + public var enabled: Swift.Bool? + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/name`. + public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientId`. + public var oauthClientId: Swift.String? + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret`. + public struct OauthClientSecretPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/reference/passwordManager`. + public var passwordManager: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/reference`. + public var reference: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/value`. + public var value: Swift.String? + /// Creates a new `OauthClientSecretPayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret`. + public var oauthClientSecret: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload? + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token`. + public struct TokenPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/reference/passwordManager`. + public var passwordManager: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/reference`. + public var reference: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/value`. + public var value: Swift.String? + /// Creates a new `TokenPayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token`. + public var token: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload? + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/url`. + public var url: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - agentId: + /// - enabled: + /// - name: + /// - oauthClientId: + /// - oauthClientSecret: + /// - token: + /// - url: + public init( + agentId: Swift.String? = nil, + enabled: Swift.Bool? = nil, + name: Swift.String, + oauthClientId: Swift.String? = nil, + oauthClientSecret: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload? = nil, + token: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload? = nil, + url: Swift.String + ) { + self.agentId = agentId + self.enabled = enabled + self.name = name + self.oauthClientId = oauthClientId + self.oauthClientSecret = oauthClientSecret + self.token = token + self.url = url + } + public enum CodingKeys: String, CodingKey { + case agentId + case enabled + case name + case oauthClientId + case oauthClientSecret + case token + case url + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/content/application\/json`. + case json(Operations.CreateMcpServer.Input.Body.JsonPayload) + } + public var body: Operations.CreateMcpServer.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + /// - body: + public init( + headers: Operations.CreateMcpServer.Input.Headers = .init(), + body: Operations.CreateMcpServer.Input.Body + ) { + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/201/content/application\/json`. + case json(Components.Schemas.McpServer) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.McpServer { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateMcpServer.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateMcpServer.Output.Created.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.CreateMcpServer.Output.Created) + /// The associated value of the enum case if `self` is `.created`. + /// + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.CreateMcpServer.Output.Created { + get throws { + switch self { + case let .created(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "created", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateMcpServer.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateMcpServer.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.CreateMcpServer.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.CreateMcpServer.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateMcpServer.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateMcpServer.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.CreateMcpServer.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.CreateMcpServer.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateMcpServer.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateMcpServer.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.CreateMcpServer.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.CreateMcpServer.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateMcpServer.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateMcpServer.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.CreateMcpServer.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.CreateMcpServer.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateMcpServer.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateMcpServer.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.CreateMcpServer.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.CreateMcpServer.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateMcpServer.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateMcpServer.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.CreateMcpServer.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.CreateMcpServer.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateMcpServer.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateMcpServer.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.CreateMcpServer.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.CreateMcpServer.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateMcpServer.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateMcpServer.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.CreateMcpServer.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.CreateMcpServer.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `PATCH /v1/mcp-servers/{id}`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)`. + public enum UpdateMcpServer { + public static let id: Swift.String = "updateMcpServer" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.UpdateMcpServer.Input.Path + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.UpdateMcpServer.Input.Headers + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/enabled`. + public var enabled: Swift.Bool? + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientId`. + public var oauthClientId: Swift.String? + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret`. + public struct OauthClientSecretPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/reference/passwordManager`. + public var passwordManager: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/reference`. + public var reference: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/value`. + public var value: Swift.String? + /// Creates a new `OauthClientSecretPayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret`. + public var oauthClientSecret: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload? + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token`. + public struct TokenPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/reference/passwordManager`. + public var passwordManager: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/reference`. + public var reference: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/value`. + public var value: Swift.String? + /// Creates a new `TokenPayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token`. + public var token: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload? + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/url`. + public var url: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - enabled: + /// - name: + /// - oauthClientId: + /// - oauthClientSecret: + /// - token: + /// - url: + public init( + enabled: Swift.Bool? = nil, + name: Swift.String? = nil, + oauthClientId: Swift.String? = nil, + oauthClientSecret: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload? = nil, + token: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload? = nil, + url: Swift.String? = nil + ) { + self.enabled = enabled + self.name = name + self.oauthClientId = oauthClientId + self.oauthClientSecret = oauthClientSecret + self.token = token + self.url = url + } + public enum CodingKeys: String, CodingKey { + case enabled + case name + case oauthClientId + case oauthClientSecret + case token + case url + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/content/application\/json`. + case json(Operations.UpdateMcpServer.Input.Body.JsonPayload) + } + public var body: Operations.UpdateMcpServer.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.UpdateMcpServer.Input.Path, + headers: Operations.UpdateMcpServer.Input.Headers = .init(), + body: Operations.UpdateMcpServer.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/agentId`. + public var agentId: Swift.String? + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/id`. + public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/name`. + public var name: Swift.String + /// The client ID of an OAuth app the owner registered with the server's authorization server, used instead of registering Crumble. + /// + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/oauthClientId`. + public var oauthClientId: Swift.String? + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/oauthClientSecret`. + public var oauthClientSecret: Components.Schemas.SecretStatus + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/token`. + public var token: Components.Schemas.SecretStatus + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/url`. + public var url: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - agentId: + /// - enabled: + /// - id: + /// - name: + /// - oauthClientId: The client ID of an OAuth app the owner registered with the server's authorization server, used instead of registering Crumble. + /// - oauthClientSecret: + /// - token: + /// - url: + public init( + agentId: Swift.String? = nil, + enabled: Swift.Bool, + id: Swift.String, + name: Swift.String, + oauthClientId: Swift.String? = nil, + oauthClientSecret: Components.Schemas.SecretStatus, + token: Components.Schemas.SecretStatus, + url: Swift.String + ) { + self.agentId = agentId + self.enabled = enabled + self.id = id + self.name = name + self.oauthClientId = oauthClientId + self.oauthClientSecret = oauthClientSecret + self.token = token + self.url = url + } + public enum CodingKeys: String, CodingKey { + case agentId + case enabled + case id + case name + case oauthClientId + case oauthClientSecret + case token + case url + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/application\/json`. + case json(Operations.UpdateMcpServer.Output.Ok.Body.JsonPayload?) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.UpdateMcpServer.Output.Ok.Body.JsonPayload? { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateMcpServer.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateMcpServer.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.UpdateMcpServer.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.UpdateMcpServer.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateMcpServer.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateMcpServer.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.UpdateMcpServer.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.UpdateMcpServer.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateMcpServer.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateMcpServer.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.UpdateMcpServer.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.UpdateMcpServer.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateMcpServer.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateMcpServer.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.UpdateMcpServer.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.UpdateMcpServer.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateMcpServer.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateMcpServer.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.UpdateMcpServer.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.UpdateMcpServer.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateMcpServer.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateMcpServer.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.UpdateMcpServer.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.UpdateMcpServer.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateMcpServer.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateMcpServer.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.UpdateMcpServer.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.UpdateMcpServer.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateMcpServer.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateMcpServer.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.UpdateMcpServer.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.UpdateMcpServer.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateMcpServer.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateMcpServer.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.UpdateMcpServer.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.UpdateMcpServer.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `DELETE /v1/mcp-servers/{id}`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)`. + public enum DeleteMcpServer { + public static let id: Swift.String = "deleteMcpServer" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.DeleteMcpServer.Input.Path + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.DeleteMcpServer.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.DeleteMcpServer.Input.Path, + headers: Operations.DeleteMcpServer.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Success, no response body + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteMcpServer.Output.NoContent) + /// Success, no response body + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteMcpServer.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteMcpServer.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteMcpServer.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.DeleteMcpServer.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.DeleteMcpServer.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteMcpServer.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteMcpServer.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.DeleteMcpServer.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.DeleteMcpServer.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteMcpServer.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteMcpServer.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.DeleteMcpServer.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.DeleteMcpServer.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteMcpServer.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteMcpServer.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.DeleteMcpServer.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.DeleteMcpServer.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteMcpServer.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteMcpServer.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.DeleteMcpServer.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.DeleteMcpServer.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteMcpServer.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteMcpServer.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.DeleteMcpServer.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.DeleteMcpServer.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteMcpServer.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteMcpServer.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.DeleteMcpServer.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.DeleteMcpServer.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteMcpServer.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteMcpServer.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.DeleteMcpServer.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.DeleteMcpServer.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `POST /v1/mcp-servers/{id}/oauth`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)`. + public enum StartMcpOAuth { + public static let id: Swift.String = "startMcpOAuth" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.StartMcpOAuth.Input.Path + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.StartMcpOAuth.Input.Headers + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/requestBody/json/redirectUri`. + public var redirectUri: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - redirectUri: + public init(redirectUri: Swift.String) { + self.redirectUri = redirectUri + } + public enum CodingKeys: String, CodingKey { + case redirectUri + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/requestBody/content/application\/json`. + case json(Operations.StartMcpOAuth.Input.Body.JsonPayload) + } + public var body: Operations.StartMcpOAuth.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.StartMcpOAuth.Input.Path, + headers: Operations.StartMcpOAuth.Input.Headers = .init(), + body: Operations.StartMcpOAuth.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/200/content/application\/json`. + case json(Components.Schemas.McpOAuthStart) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.McpOAuthStart { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StartMcpOAuth.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StartMcpOAuth.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.StartMcpOAuth.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.StartMcpOAuth.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StartMcpOAuth.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StartMcpOAuth.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.StartMcpOAuth.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.StartMcpOAuth.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StartMcpOAuth.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StartMcpOAuth.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.StartMcpOAuth.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.StartMcpOAuth.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StartMcpOAuth.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StartMcpOAuth.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.StartMcpOAuth.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.StartMcpOAuth.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StartMcpOAuth.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StartMcpOAuth.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.StartMcpOAuth.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.StartMcpOAuth.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StartMcpOAuth.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StartMcpOAuth.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.StartMcpOAuth.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.StartMcpOAuth.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StartMcpOAuth.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StartMcpOAuth.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.StartMcpOAuth.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.StartMcpOAuth.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StartMcpOAuth.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StartMcpOAuth.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.StartMcpOAuth.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.StartMcpOAuth.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StartMcpOAuth.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StartMcpOAuth.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.StartMcpOAuth.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.StartMcpOAuth.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `DELETE /v1/mcp-servers/{id}/oauth`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)`. + public enum SignOutMcpOAuth { + public static let id: Swift.String = "signOutMcpOAuth" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.SignOutMcpOAuth.Input.Path + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.SignOutMcpOAuth.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.SignOutMcpOAuth.Input.Path, + headers: Operations.SignOutMcpOAuth.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/200/content/application\/json`. + case json(Components.Schemas.McpServerStatus) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.McpServerStatus { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.SignOutMcpOAuth.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.SignOutMcpOAuth.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.SignOutMcpOAuth.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.SignOutMcpOAuth.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.SignOutMcpOAuth.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.SignOutMcpOAuth.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.SignOutMcpOAuth.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.SignOutMcpOAuth.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.SignOutMcpOAuth.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.SignOutMcpOAuth.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.SignOutMcpOAuth.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.SignOutMcpOAuth.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.SignOutMcpOAuth.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.SignOutMcpOAuth.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.SignOutMcpOAuth.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.SignOutMcpOAuth.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.SignOutMcpOAuth.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.SignOutMcpOAuth.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.SignOutMcpOAuth.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.SignOutMcpOAuth.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.SignOutMcpOAuth.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.SignOutMcpOAuth.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.SignOutMcpOAuth.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.SignOutMcpOAuth.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.SignOutMcpOAuth.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.SignOutMcpOAuth.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.SignOutMcpOAuth.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.SignOutMcpOAuth.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.SignOutMcpOAuth.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.SignOutMcpOAuth.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.SignOutMcpOAuth.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.SignOutMcpOAuth.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.SignOutMcpOAuth.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.SignOutMcpOAuth.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.SignOutMcpOAuth.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.SignOutMcpOAuth.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `POST /v1/mcp-servers/{id}/oauth/callback`. + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)`. + public enum FinishMcpOAuth { + public static let id: Swift.String = "finishMcpOAuth" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.FinishMcpOAuth.Input.Path + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.FinishMcpOAuth.Input.Headers + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody/json/code`. + public var code: Swift.String + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody/json/iss`. + public var iss: Swift.String? + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody/json/state`. + public var state: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - code: + /// - iss: + /// - state: + public init( + code: Swift.String, + iss: Swift.String? = nil, + state: Swift.String + ) { + self.code = code + self.iss = iss + self.state = state + } + public enum CodingKeys: String, CodingKey { + case code + case iss + case state + } + } + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody/content/application\/json`. + case json(Operations.FinishMcpOAuth.Input.Body.JsonPayload) + } + public var body: Operations.FinishMcpOAuth.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.FinishMcpOAuth.Input.Path, + headers: Operations.FinishMcpOAuth.Input.Headers = .init(), + body: Operations.FinishMcpOAuth.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/200/content/application\/json`. + case json(Components.Schemas.McpServerStatus) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.McpServerStatus { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.FinishMcpOAuth.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.FinishMcpOAuth.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.FinishMcpOAuth.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.FinishMcpOAuth.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.FinishMcpOAuth.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.FinishMcpOAuth.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.FinishMcpOAuth.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.FinishMcpOAuth.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.FinishMcpOAuth.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.FinishMcpOAuth.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.FinishMcpOAuth.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.FinishMcpOAuth.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.FinishMcpOAuth.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.FinishMcpOAuth.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.FinishMcpOAuth.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.FinishMcpOAuth.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.FinishMcpOAuth.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.FinishMcpOAuth.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.FinishMcpOAuth.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.FinishMcpOAuth.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.FinishMcpOAuth.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.FinishMcpOAuth.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.FinishMcpOAuth.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.FinishMcpOAuth.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.FinishMcpOAuth.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.FinishMcpOAuth.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.FinishMcpOAuth.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.FinishMcpOAuth.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.FinishMcpOAuth.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.FinishMcpOAuth.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.FinishMcpOAuth.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.FinishMcpOAuth.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.FinishMcpOAuth.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.FinishMcpOAuth.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.FinishMcpOAuth.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.FinishMcpOAuth.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `GET /v1/memories`. + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)`. + public enum ListSharedMemories { + public static let id: Swift.String = "listSharedMemories" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.ListSharedMemories.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + public init(headers: Operations.ListSharedMemories.Input.Headers = .init()) { + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/200/content/application\/json`. + case json([Components.Schemas.Memory]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.Memory] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListSharedMemories.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListSharedMemories.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.ListSharedMemories.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ListSharedMemories.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListSharedMemories.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListSharedMemories.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.ListSharedMemories.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.ListSharedMemories.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListSharedMemories.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListSharedMemories.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.ListSharedMemories.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.ListSharedMemories.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListSharedMemories.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListSharedMemories.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.ListSharedMemories.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.ListSharedMemories.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListSharedMemories.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListSharedMemories.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.ListSharedMemories.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.ListSharedMemories.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListSharedMemories.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListSharedMemories.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.ListSharedMemories.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.ListSharedMemories.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListSharedMemories.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListSharedMemories.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.ListSharedMemories.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.ListSharedMemories.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListSharedMemories.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListSharedMemories.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.ListSharedMemories.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.ListSharedMemories.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/GET/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListSharedMemories.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListSharedMemories.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.ListSharedMemories.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.ListSharedMemories.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `POST /v1/memories`. + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)`. + public enum CreateSharedMemory { + public static let id: Swift.String = "createSharedMemory" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.CreateSharedMemory.Input.Headers + /// - Remark: Generated from `#/paths/v1/memories/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/memories/POST/requestBody/json/content`. + public var content: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - content: + public init(content: Swift.String) { + self.content = content + } + public enum CodingKeys: String, CodingKey { + case content + } + } + /// - Remark: Generated from `#/paths/v1/memories/POST/requestBody/content/application\/json`. + case json(Operations.CreateSharedMemory.Input.Body.JsonPayload) + } + public var body: Operations.CreateSharedMemory.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + /// - body: + public init( + headers: Operations.CreateSharedMemory.Input.Headers = .init(), + body: Operations.CreateSharedMemory.Input.Body + ) { + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/201/content/application\/json`. + case json(Components.Schemas.Memory) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.Memory { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateSharedMemory.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateSharedMemory.Output.Created.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.CreateSharedMemory.Output.Created) + /// The associated value of the enum case if `self` is `.created`. + /// + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.CreateSharedMemory.Output.Created { + get throws { + switch self { + case let .created(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "created", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateSharedMemory.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateSharedMemory.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.CreateSharedMemory.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.CreateSharedMemory.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateSharedMemory.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateSharedMemory.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.CreateSharedMemory.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.CreateSharedMemory.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateSharedMemory.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateSharedMemory.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.CreateSharedMemory.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.CreateSharedMemory.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateSharedMemory.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateSharedMemory.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.CreateSharedMemory.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.CreateSharedMemory.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateSharedMemory.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateSharedMemory.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.CreateSharedMemory.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.CreateSharedMemory.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateSharedMemory.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateSharedMemory.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.CreateSharedMemory.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.CreateSharedMemory.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateSharedMemory.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateSharedMemory.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.CreateSharedMemory.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.CreateSharedMemory.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/POST/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CreateSharedMemory.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CreateSharedMemory.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.CreateSharedMemory.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.CreateSharedMemory.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `PATCH /v1/memories/{id}`. + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)`. + public enum UpdateSharedMemory { + public static let id: Swift.String = "updateSharedMemory" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.UpdateSharedMemory.Input.Path + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.UpdateSharedMemory.Input.Headers + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/requestBody/json/content`. + public var content: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - content: + public init(content: Swift.String) { + self.content = content + } + public enum CodingKeys: String, CodingKey { + case content + } + } + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/requestBody/content/application\/json`. + case json(Operations.UpdateSharedMemory.Input.Body.JsonPayload) + } + public var body: Operations.UpdateSharedMemory.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.UpdateSharedMemory.Input.Path, + headers: Operations.UpdateSharedMemory.Input.Headers = .init(), + body: Operations.UpdateSharedMemory.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/agentId`. + public var agentId: Swift.String? + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/content`. + public var content: Swift.String + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/createdAt`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/id`. + public var id: Swift.String + /// Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. + /// + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source`. + public struct SourcePayload: Codable, Hashable, Sendable { + /// For `bot`. + /// + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/agentId`. + public var agentId: Swift.String? + /// For `group`. + /// + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/groupId`. + public var groupId: Swift.String? + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/kind`. + @frozen public enum KindPayload: String, Codable, Hashable, Sendable, CaseIterable { + case chat = "chat" + case owner = "owner" + case task = "task" + case bot = "bot" + case group = "group" + } + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/kind`. + public var kind: Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload.SourcePayload.KindPayload + /// The task, bot, or group chat, as named when the memory was saved. + /// + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/name`. + public var name: Swift.String? + /// For `task`. + /// + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/scheduleId`. + public var scheduleId: Swift.String? + /// Creates a new `SourcePayload`. + /// + /// - Parameters: + /// - agentId: For `bot`. + /// - groupId: For `group`. + /// - kind: + /// - name: The task, bot, or group chat, as named when the memory was saved. + /// - scheduleId: For `task`. + public init( + agentId: Swift.String? = nil, + groupId: Swift.String? = nil, + kind: Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload.SourcePayload.KindPayload, + name: Swift.String? = nil, + scheduleId: Swift.String? = nil + ) { + self.agentId = agentId + self.groupId = groupId + self.kind = kind + self.name = name + self.scheduleId = scheduleId + } + public enum CodingKeys: String, CodingKey { + case agentId + case groupId + case kind + case name + case scheduleId + } + } + /// Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. + /// + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source`. + public var source: Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload.SourcePayload? + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/updatedAt`. + public var updatedAt: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - agentId: + /// - content: + /// - createdAt: + /// - id: + /// - source: Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. + /// - updatedAt: + public init( + agentId: Swift.String? = nil, + content: Swift.String, + createdAt: Swift.String, + id: Swift.String, + source: Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload.SourcePayload? = nil, + updatedAt: Swift.String + ) { + self.agentId = agentId + self.content = content + self.createdAt = createdAt + self.id = id + self.source = source + self.updatedAt = updatedAt + } + public enum CodingKeys: String, CodingKey { + case agentId + case content + case createdAt + case id + case source + case updatedAt + } + } + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/application\/json`. + case json(Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload?) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload? { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateSharedMemory.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateSharedMemory.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.UpdateSharedMemory.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.UpdateSharedMemory.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateSharedMemory.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateSharedMemory.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.UpdateSharedMemory.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.UpdateSharedMemory.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateSharedMemory.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateSharedMemory.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.UpdateSharedMemory.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.UpdateSharedMemory.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateSharedMemory.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateSharedMemory.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.UpdateSharedMemory.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.UpdateSharedMemory.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateSharedMemory.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateSharedMemory.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.UpdateSharedMemory.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.UpdateSharedMemory.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateSharedMemory.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateSharedMemory.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.UpdateSharedMemory.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.UpdateSharedMemory.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateSharedMemory.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateSharedMemory.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.UpdateSharedMemory.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.UpdateSharedMemory.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateSharedMemory.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateSharedMemory.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.UpdateSharedMemory.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.UpdateSharedMemory.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.UpdateSharedMemory.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.UpdateSharedMemory.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.UpdateSharedMemory.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.UpdateSharedMemory.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `DELETE /v1/memories/{id}`. + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)`. + public enum DeleteSharedMemory { + public static let id: Swift.String = "deleteSharedMemory" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.DeleteSharedMemory.Input.Path + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.DeleteSharedMemory.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.DeleteSharedMemory.Input.Path, + headers: Operations.DeleteSharedMemory.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Success, no response body + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteSharedMemory.Output.NoContent) + /// Success, no response body + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteSharedMemory.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteSharedMemory.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteSharedMemory.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.DeleteSharedMemory.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.DeleteSharedMemory.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteSharedMemory.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteSharedMemory.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.DeleteSharedMemory.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.DeleteSharedMemory.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteSharedMemory.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteSharedMemory.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.DeleteSharedMemory.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.DeleteSharedMemory.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteSharedMemory.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteSharedMemory.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.DeleteSharedMemory.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.DeleteSharedMemory.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteSharedMemory.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteSharedMemory.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.DeleteSharedMemory.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.DeleteSharedMemory.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteSharedMemory.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteSharedMemory.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.DeleteSharedMemory.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.DeleteSharedMemory.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteSharedMemory.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteSharedMemory.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.DeleteSharedMemory.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.DeleteSharedMemory.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.DeleteSharedMemory.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.DeleteSharedMemory.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.DeleteSharedMemory.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.DeleteSharedMemory.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `GET /v1/message-gateways`. + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)`. + public enum MessageGateways { + public static let id: Swift.String = "messageGateways" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.MessageGateways.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + public init(headers: Operations.MessageGateways.Input.Headers = .init()) { + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload`. + public struct GatewaysPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config`. + public struct ConfigPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/AliasesPayload`. + public struct AliasesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/AliasesPayload/botId`. + public var botId: Swift.String + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/AliasesPayload/handle`. + public var handle: Swift.String + /// Creates a new `AliasesPayloadPayload`. + /// + /// - Parameters: + /// - botId: + /// - handle: + public init( + botId: Swift.String, + handle: Swift.String + ) { + self.botId = botId + self.handle = handle + } + public enum CodingKeys: String, CodingKey { + case botId + case handle + } + } + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/aliases`. + public typealias AliasesPayload = [Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload.AliasesPayloadPayload] + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/aliases`. + public var aliases: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload.AliasesPayload + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/allowDirectMessages`. + public var allowDirectMessages: Swift.Bool + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/allowedChannelIds`. + public var allowedChannelIds: [Swift.String] + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/defaultBotId`. + public var defaultBotId: Swift.String? + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/ownerId`. + public var ownerId: Swift.String? + /// Creates a new `ConfigPayload`. + /// + /// - Parameters: + /// - aliases: + /// - allowDirectMessages: + /// - allowedChannelIds: + /// - defaultBotId: + /// - enabled: + /// - ownerId: + public init( + aliases: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload.AliasesPayload, + allowDirectMessages: Swift.Bool, + allowedChannelIds: [Swift.String], + defaultBotId: Swift.String? = nil, + enabled: Swift.Bool, + ownerId: Swift.String? = nil + ) { + self.aliases = aliases + self.allowDirectMessages = allowDirectMessages + self.allowedChannelIds = allowedChannelIds + self.defaultBotId = defaultBotId + self.enabled = enabled + self.ownerId = ownerId + } + public enum CodingKeys: String, CodingKey { + case aliases + case allowDirectMessages + case allowedChannelIds + case defaultBotId + case enabled + case ownerId + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.aliases = try container.decode( + Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload.AliasesPayload.self, + forKey: .aliases + ) + self.allowDirectMessages = try container.decode( + Swift.Bool.self, + forKey: .allowDirectMessages + ) + self.allowedChannelIds = try container.decode( + [Swift.String].self, + forKey: .allowedChannelIds + ) + self.defaultBotId = try container.decodeIfPresent( + Swift.String.self, + forKey: .defaultBotId + ) + self.enabled = try container.decode( + Swift.Bool.self, + forKey: .enabled + ) + self.ownerId = try container.decodeIfPresent( + Swift.String.self, + forKey: .ownerId + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "aliases", + "allowDirectMessages", + "allowedChannelIds", + "defaultBotId", + "enabled", + "ownerId" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config`. + public var config: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/error`. + public var error: Swift.String? + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/failedCount`. + public var failedCount: Swift.Int + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/id`. + public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/label`. + public var label: Swift.String + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/pendingCount`. + public var pendingCount: Swift.Int + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/secretKey`. + public var secretKey: Swift.String + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/status`. + @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { + case disconnected = "disconnected" + case connecting = "connecting" + case connected = "connected" + case error = "error" + } + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/status`. + public var status: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.StatusPayload + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/tokenConfigured`. + public var tokenConfigured: Swift.Bool + /// Creates a new `GatewaysPayloadPayload`. + /// + /// - Parameters: + /// - config: + /// - error: + /// - failedCount: + /// - id: + /// - label: + /// - pendingCount: + /// - secretKey: + /// - status: + /// - tokenConfigured: + public init( + config: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload, + error: Swift.String? = nil, + failedCount: Swift.Int, + id: Swift.String, + label: Swift.String, + pendingCount: Swift.Int, + secretKey: Swift.String, + status: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.StatusPayload, + tokenConfigured: Swift.Bool + ) { + self.config = config + self.error = error + self.failedCount = failedCount + self.id = id + self.label = label + self.pendingCount = pendingCount + self.secretKey = secretKey + self.status = status + self.tokenConfigured = tokenConfigured + } + public enum CodingKeys: String, CodingKey { + case config + case error + case failedCount + case id + case label + case pendingCount + case secretKey + case status + case tokenConfigured + } + } + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/gateways`. + public typealias GatewaysPayload = [Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload] + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/gateways`. + public var gateways: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayload + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - gateways: + public init(gateways: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayload) { + self.gateways = gateways + } + public enum CodingKeys: String, CodingKey { + case gateways + } + } + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/application\/json`. + case json(Operations.MessageGateways.Output.Ok.Body.JsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.MessageGateways.Output.Ok.Body.JsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.MessageGateways.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.MessageGateways.Output.Ok.Body) { + self.body = body + } + } + /// Success + /// + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.MessageGateways.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.MessageGateways.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/400/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.MessageGateways.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.MessageGateways.Output.BadRequest.Body) { + self.body = body + } + } + /// Invalid request or operation + /// + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.MessageGateways.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.MessageGateways.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/401/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.MessageGateways.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.MessageGateways.Output.Unauthorized.Body) { + self.body = body + } + } + /// Missing, expired, or invalid account session + /// + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.MessageGateways.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.MessageGateways.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/404/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.MessageGateways.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.MessageGateways.Output.NotFound.Body) { + self.body = body + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.MessageGateways.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.MessageGateways.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.MessageGateways.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.MessageGateways.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.MessageGateways.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.MessageGateways.Output.MethodNotAllowed { + get throws { + switch self { + case let .methodNotAllowed(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "methodNotAllowed", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/409/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.MessageGateways.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.MessageGateways.Output.Conflict.Body) { + self.body = body + } + } + /// Conflicting request + /// + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.MessageGateways.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.MessageGateways.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct ContentTooLarge: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/413/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/413/content/text\/plain`. + case plainText(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.plainText`. + /// + /// - Throws: An error if `self` is not `.plainText`. + /// - SeeAlso: `.plainText`. + public var plainText: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .plainText(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.MessageGateways.Output.ContentTooLarge.Body + /// Creates a new `ContentTooLarge`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.MessageGateways.Output.ContentTooLarge.Body) { + self.body = body + } + } + /// Request body exceeds the size limit + /// + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + case contentTooLarge(Operations.MessageGateways.Output.ContentTooLarge) + /// The associated value of the enum case if `self` is `.contentTooLarge`. + /// + /// - Throws: An error if `self` is not `.contentTooLarge`. + /// - SeeAlso: `.contentTooLarge`. + public var contentTooLarge: Operations.MessageGateways.Output.ContentTooLarge { + get throws { + switch self { + case let .contentTooLarge(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "contentTooLarge", + response: self + ) + } + } + } + public struct InternalServerError: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/500/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/500/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.MessageGateways.Output.InternalServerError.Body + /// Creates a new `InternalServerError`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.MessageGateways.Output.InternalServerError.Body) { + self.body = body + } + } + /// Internal server error + /// + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Operations.MessageGateways.Output.InternalServerError) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Operations.MessageGateways.Output.InternalServerError { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + public struct ServiceUnavailable: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.MessageGateways.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.MessageGateways.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.MessageGateways.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.MessageGateways.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `PUT /v1/message-gateways/{id}`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)`. + public enum UpdateMessageGateway { + public static let id: Swift.String = "updateMessageGateway" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.UpdateMessageGateway.Input.Path + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CreateMcpServer.Input.Headers - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody`. + public var headers: Operations.UpdateMessageGateway.Input.Headers + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/agentId`. - public var agentId: Swift.String? - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/enabled`. - public var enabled: Swift.Bool? - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/name`. - public var name: Swift.String - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientId`. - public var oauthClientId: Swift.String? - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret`. - public struct OauthClientSecretPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/reference/passwordManager`. - public var passwordManager: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/reference`. - public var reference: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret/value`. - public var value: Swift.String? - /// Creates a new `OauthClientSecretPayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/oauthClientSecret`. - public var oauthClientSecret: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload? - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token`. - public struct TokenPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/reference/passwordManager`. - public var passwordManager: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/reference`. - public var reference: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token/value`. - public var value: Swift.String? - /// Creates a new `TokenPayload`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/AliasesPayload`. + public struct AliasesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/AliasesPayload/botId`. + public var botId: Swift.String + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/AliasesPayload/handle`. + public var handle: Swift.String + /// Creates a new `AliasesPayloadPayload`. /// /// - Parameters: - /// - reference: - /// - value: + /// - botId: + /// - handle: public init( - reference: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload? = nil, - value: Swift.String? = nil + botId: Swift.String, + handle: Swift.String ) { - self.reference = reference - self.value = value + self.botId = botId + self.handle = handle } public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) + case botId + case handle } } - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/token`. - public var token: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload? - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/json/url`. - public var url: Swift.String + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/aliases`. + public typealias AliasesPayload = [Operations.UpdateMessageGateway.Input.Body.JsonPayload.AliasesPayloadPayload] + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/aliases`. + public var aliases: Operations.UpdateMessageGateway.Input.Body.JsonPayload.AliasesPayload + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/allowDirectMessages`. + public var allowDirectMessages: Swift.Bool + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/allowedChannelIds`. + public var allowedChannelIds: [Swift.String] + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/defaultBotId`. + public var defaultBotId: Swift.String? + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/ownerId`. + public var ownerId: Swift.String? /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - agentId: + /// - aliases: + /// - allowDirectMessages: + /// - allowedChannelIds: + /// - defaultBotId: /// - enabled: - /// - name: - /// - oauthClientId: - /// - oauthClientSecret: - /// - token: - /// - url: + /// - ownerId: public init( - agentId: Swift.String? = nil, - enabled: Swift.Bool? = nil, - name: Swift.String, - oauthClientId: Swift.String? = nil, - oauthClientSecret: Operations.CreateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload? = nil, - token: Operations.CreateMcpServer.Input.Body.JsonPayload.TokenPayload? = nil, - url: Swift.String + aliases: Operations.UpdateMessageGateway.Input.Body.JsonPayload.AliasesPayload, + allowDirectMessages: Swift.Bool, + allowedChannelIds: [Swift.String], + defaultBotId: Swift.String? = nil, + enabled: Swift.Bool, + ownerId: Swift.String? = nil ) { - self.agentId = agentId + self.aliases = aliases + self.allowDirectMessages = allowDirectMessages + self.allowedChannelIds = allowedChannelIds + self.defaultBotId = defaultBotId self.enabled = enabled - self.name = name - self.oauthClientId = oauthClientId - self.oauthClientSecret = oauthClientSecret - self.token = token - self.url = url + self.ownerId = ownerId } public enum CodingKeys: String, CodingKey { - case agentId + case aliases + case allowDirectMessages + case allowedChannelIds + case defaultBotId case enabled - case name - case oauthClientId - case oauthClientSecret - case token - case url + case ownerId + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.aliases = try container.decode( + Operations.UpdateMessageGateway.Input.Body.JsonPayload.AliasesPayload.self, + forKey: .aliases + ) + self.allowDirectMessages = try container.decode( + Swift.Bool.self, + forKey: .allowDirectMessages + ) + self.allowedChannelIds = try container.decode( + [Swift.String].self, + forKey: .allowedChannelIds + ) + self.defaultBotId = try container.decodeIfPresent( + Swift.String.self, + forKey: .defaultBotId + ) + self.enabled = try container.decode( + Swift.Bool.self, + forKey: .enabled + ) + self.ownerId = try container.decodeIfPresent( + Swift.String.self, + forKey: .ownerId + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "aliases", + "allowDirectMessages", + "allowedChannelIds", + "defaultBotId", + "enabled", + "ownerId" + ]) } } - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/requestBody/content/application\/json`. - case json(Operations.CreateMcpServer.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/content/application\/json`. + case json(Operations.UpdateMessageGateway.Input.Body.JsonPayload) } - public var body: Operations.CreateMcpServer.Input.Body + public var body: Operations.UpdateMessageGateway.Input.Body /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: /// - body: public init( - headers: Operations.CreateMcpServer.Input.Headers = .init(), - body: Operations.CreateMcpServer.Input.Body + path: Operations.UpdateMessageGateway.Input.Path, + headers: Operations.UpdateMessageGateway.Input.Headers = .init(), + body: Operations.UpdateMessageGateway.Input.Body ) { + self.path = path self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/201/content/application\/json`. - case json(Components.Schemas.McpServer) + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config`. + public struct ConfigPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/AliasesPayload`. + public struct AliasesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/AliasesPayload/botId`. + public var botId: Swift.String + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/AliasesPayload/handle`. + public var handle: Swift.String + /// Creates a new `AliasesPayloadPayload`. + /// + /// - Parameters: + /// - botId: + /// - handle: + public init( + botId: Swift.String, + handle: Swift.String + ) { + self.botId = botId + self.handle = handle + } + public enum CodingKeys: String, CodingKey { + case botId + case handle + } + } + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/aliases`. + public typealias AliasesPayload = [Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload.AliasesPayloadPayload] + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/aliases`. + public var aliases: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload.AliasesPayload + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/allowDirectMessages`. + public var allowDirectMessages: Swift.Bool + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/allowedChannelIds`. + public var allowedChannelIds: [Swift.String] + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/defaultBotId`. + public var defaultBotId: Swift.String? + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/ownerId`. + public var ownerId: Swift.String? + /// Creates a new `ConfigPayload`. + /// + /// - Parameters: + /// - aliases: + /// - allowDirectMessages: + /// - allowedChannelIds: + /// - defaultBotId: + /// - enabled: + /// - ownerId: + public init( + aliases: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload.AliasesPayload, + allowDirectMessages: Swift.Bool, + allowedChannelIds: [Swift.String], + defaultBotId: Swift.String? = nil, + enabled: Swift.Bool, + ownerId: Swift.String? = nil + ) { + self.aliases = aliases + self.allowDirectMessages = allowDirectMessages + self.allowedChannelIds = allowedChannelIds + self.defaultBotId = defaultBotId + self.enabled = enabled + self.ownerId = ownerId + } + public enum CodingKeys: String, CodingKey { + case aliases + case allowDirectMessages + case allowedChannelIds + case defaultBotId + case enabled + case ownerId + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.aliases = try container.decode( + Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload.AliasesPayload.self, + forKey: .aliases + ) + self.allowDirectMessages = try container.decode( + Swift.Bool.self, + forKey: .allowDirectMessages + ) + self.allowedChannelIds = try container.decode( + [Swift.String].self, + forKey: .allowedChannelIds + ) + self.defaultBotId = try container.decodeIfPresent( + Swift.String.self, + forKey: .defaultBotId + ) + self.enabled = try container.decode( + Swift.Bool.self, + forKey: .enabled + ) + self.ownerId = try container.decodeIfPresent( + Swift.String.self, + forKey: .ownerId + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "aliases", + "allowDirectMessages", + "allowedChannelIds", + "defaultBotId", + "enabled", + "ownerId" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config`. + public var config: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/error`. + public var error: Swift.String? + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/failedCount`. + public var failedCount: Swift.Int + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/id`. + public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/label`. + public var label: Swift.String + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/pendingCount`. + public var pendingCount: Swift.Int + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/secretKey`. + public var secretKey: Swift.String + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/status`. + @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { + case disconnected = "disconnected" + case connecting = "connecting" + case connected = "connected" + case error = "error" + } + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/status`. + public var status: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.StatusPayload + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/tokenConfigured`. + public var tokenConfigured: Swift.Bool + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - config: + /// - error: + /// - failedCount: + /// - id: + /// - label: + /// - pendingCount: + /// - secretKey: + /// - status: + /// - tokenConfigured: + public init( + config: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload, + error: Swift.String? = nil, + failedCount: Swift.Int, + id: Swift.String, + label: Swift.String, + pendingCount: Swift.Int, + secretKey: Swift.String, + status: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.StatusPayload, + tokenConfigured: Swift.Bool + ) { + self.config = config + self.error = error + self.failedCount = failedCount + self.id = id + self.label = label + self.pendingCount = pendingCount + self.secretKey = secretKey + self.status = status + self.tokenConfigured = tokenConfigured + } + public enum CodingKeys: String, CodingKey { + case config + case error + case failedCount + case id + case label + case pendingCount + case secretKey + case status + case tokenConfigured + } + } + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/application\/json`. + case json(Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.McpServer { + public var json: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload { get throws { switch self { case let .json(body): @@ -56888,42 +66073,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateMcpServer.Output.Created.Body - /// Creates a new `Created`. + public var body: Operations.UpdateMessageGateway.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateMcpServer.Output.Created.Body) { + public init(body: Operations.UpdateMessageGateway.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/201`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/200`. /// - /// HTTP response code: `201 created`. - case created(Operations.CreateMcpServer.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `200 ok`. + case ok(Operations.UpdateMessageGateway.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.CreateMcpServer.Output.Created { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.UpdateMessageGateway.Output.Ok { get throws { switch self { - case let .created(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -56939,26 +66124,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateMcpServer.Output.BadRequest.Body + public var body: Operations.UpdateMessageGateway.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateMcpServer.Output.BadRequest.Body) { + public init(body: Operations.UpdateMessageGateway.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/400`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CreateMcpServer.Output.BadRequest) + case badRequest(Operations.UpdateMessageGateway.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CreateMcpServer.Output.BadRequest { + public var badRequest: Operations.UpdateMessageGateway.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -56972,9 +66157,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -56990,26 +66175,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateMcpServer.Output.Unauthorized.Body + public var body: Operations.UpdateMessageGateway.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateMcpServer.Output.Unauthorized.Body) { + public init(body: Operations.UpdateMessageGateway.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/401`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CreateMcpServer.Output.Unauthorized) + case unauthorized(Operations.UpdateMessageGateway.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CreateMcpServer.Output.Unauthorized { + public var unauthorized: Operations.UpdateMessageGateway.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -57023,9 +66208,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -57041,26 +66226,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateMcpServer.Output.NotFound.Body + public var body: Operations.UpdateMessageGateway.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateMcpServer.Output.NotFound.Body) { + public init(body: Operations.UpdateMessageGateway.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/404`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CreateMcpServer.Output.NotFound) + case notFound(Operations.UpdateMessageGateway.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CreateMcpServer.Output.NotFound { + public var notFound: Operations.UpdateMessageGateway.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -57074,9 +66259,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -57092,26 +66277,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateMcpServer.Output.MethodNotAllowed.Body + public var body: Operations.UpdateMessageGateway.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateMcpServer.Output.MethodNotAllowed.Body) { + public init(body: Operations.UpdateMessageGateway.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/405`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CreateMcpServer.Output.MethodNotAllowed) + case methodNotAllowed(Operations.UpdateMessageGateway.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CreateMcpServer.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.UpdateMessageGateway.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -57125,9 +66310,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -57143,26 +66328,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateMcpServer.Output.Conflict.Body + public var body: Operations.UpdateMessageGateway.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateMcpServer.Output.Conflict.Body) { + public init(body: Operations.UpdateMessageGateway.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/409`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CreateMcpServer.Output.Conflict) + case conflict(Operations.UpdateMessageGateway.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CreateMcpServer.Output.Conflict { + public var conflict: Operations.UpdateMessageGateway.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -57176,9 +66361,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -57194,26 +66379,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateMcpServer.Output.ContentTooLarge.Body + public var body: Operations.UpdateMessageGateway.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateMcpServer.Output.ContentTooLarge.Body) { + public init(body: Operations.UpdateMessageGateway.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/413`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CreateMcpServer.Output.ContentTooLarge) + case contentTooLarge(Operations.UpdateMessageGateway.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CreateMcpServer.Output.ContentTooLarge { + public var contentTooLarge: Operations.UpdateMessageGateway.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -57227,9 +66412,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -57245,26 +66430,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateMcpServer.Output.InternalServerError.Body + public var body: Operations.UpdateMessageGateway.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateMcpServer.Output.InternalServerError.Body) { + public init(body: Operations.UpdateMessageGateway.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/500`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CreateMcpServer.Output.InternalServerError) + case internalServerError(Operations.UpdateMessageGateway.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CreateMcpServer.Output.InternalServerError { + public var internalServerError: Operations.UpdateMessageGateway.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -57278,9 +66463,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -57296,26 +66481,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateMcpServer.Output.ServiceUnavailable.Body + public var body: Operations.UpdateMessageGateway.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateMcpServer.Output.ServiceUnavailable.Body) { + public init(body: Operations.UpdateMessageGateway.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/post(createMcpServer)/responses/503`. + /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CreateMcpServer.Output.ServiceUnavailable) + case serviceUnavailable(Operations.UpdateMessageGateway.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CreateMcpServer.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.UpdateMessageGateway.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -57365,309 +66550,60 @@ public enum Operations { } } } - /// - Remark: HTTP `PATCH /v1/mcp-servers/{id}`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)`. - public enum UpdateMcpServer { - public static let id: Swift.String = "updateMcpServer" + /// - Remark: HTTP `GET /v1/models`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)`. + public enum ListModels { + public static let id: Swift.String = "listModels" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/path/id`. - public var id: Swift.String - /// Creates a new `Path`. + /// - Remark: Generated from `#/paths/v1/models/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/models/GET/query/provider`. + public var provider: Swift.String? + /// Creates a new `Query`. /// /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id + /// - provider: + public init(provider: Swift.String? = nil) { + self.provider = provider } } - public var path: Operations.UpdateMcpServer.Input.Path - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/header`. + public var query: Operations.ListModels.Input.Query + /// - Remark: Generated from `#/paths/v1/models/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateMcpServer.Input.Headers - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/enabled`. - public var enabled: Swift.Bool? - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientId`. - public var oauthClientId: Swift.String? - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret`. - public struct OauthClientSecretPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/reference/passwordManager`. - public var passwordManager: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/reference`. - public var reference: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret/value`. - public var value: Swift.String? - /// Creates a new `OauthClientSecretPayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/oauthClientSecret`. - public var oauthClientSecret: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload? - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token`. - public struct TokenPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/reference/passwordManager`. - public var passwordManager: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/reference`. - public var reference: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token/value`. - public var value: Swift.String? - /// Creates a new `TokenPayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/token`. - public var token: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload? - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/json/url`. - public var url: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - enabled: - /// - name: - /// - oauthClientId: - /// - oauthClientSecret: - /// - token: - /// - url: - public init( - enabled: Swift.Bool? = nil, - name: Swift.String? = nil, - oauthClientId: Swift.String? = nil, - oauthClientSecret: Operations.UpdateMcpServer.Input.Body.JsonPayload.OauthClientSecretPayload? = nil, - token: Operations.UpdateMcpServer.Input.Body.JsonPayload.TokenPayload? = nil, - url: Swift.String? = nil - ) { - self.enabled = enabled - self.name = name - self.oauthClientId = oauthClientId - self.oauthClientSecret = oauthClientSecret - self.token = token - self.url = url - } - public enum CodingKeys: String, CodingKey { - case enabled - case name - case oauthClientId - case oauthClientSecret - case token - case url - } - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/requestBody/content/application\/json`. - case json(Operations.UpdateMcpServer.Input.Body.JsonPayload) - } - public var body: Operations.UpdateMcpServer.Input.Body + public var headers: Operations.ListModels.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: + /// - query: /// - headers: - /// - body: public init( - path: Operations.UpdateMcpServer.Input.Path, - headers: Operations.UpdateMcpServer.Input.Headers = .init(), - body: Operations.UpdateMcpServer.Input.Body + query: Operations.ListModels.Input.Query = .init(), + headers: Operations.ListModels.Input.Headers = .init() ) { - self.path = path + self.query = query self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/agentId`. - public var agentId: Swift.String? - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/enabled`. - public var enabled: Swift.Bool - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/id`. - public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/name`. - public var name: Swift.String - /// The client ID of an OAuth app the owner registered with the server's authorization server, used instead of registering Crumble. - /// - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/oauthClientId`. - public var oauthClientId: Swift.String? - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/oauthClientSecret`. - public var oauthClientSecret: Components.Schemas.SecretStatus - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/token`. - public var token: Components.Schemas.SecretStatus - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/json/url`. - public var url: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - agentId: - /// - enabled: - /// - id: - /// - name: - /// - oauthClientId: The client ID of an OAuth app the owner registered with the server's authorization server, used instead of registering Crumble. - /// - oauthClientSecret: - /// - token: - /// - url: - public init( - agentId: Swift.String? = nil, - enabled: Swift.Bool, - id: Swift.String, - name: Swift.String, - oauthClientId: Swift.String? = nil, - oauthClientSecret: Components.Schemas.SecretStatus, - token: Components.Schemas.SecretStatus, - url: Swift.String - ) { - self.agentId = agentId - self.enabled = enabled - self.id = id - self.name = name - self.oauthClientId = oauthClientId - self.oauthClientSecret = oauthClientSecret - self.token = token - self.url = url - } - public enum CodingKeys: String, CodingKey { - case agentId - case enabled - case id - case name - case oauthClientId - case oauthClientSecret - case token - case url - } - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/200/content/application\/json`. - case json(Operations.UpdateMcpServer.Output.Ok.Body.JsonPayload?) + /// - Remark: Generated from `#/paths/v1/models/GET/responses/200/content/application\/json`. + case json([Components.Schemas.Model]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.UpdateMcpServer.Output.Ok.Body.JsonPayload? { + public var json: [Components.Schemas.Model] { get throws { switch self { case let .json(body): @@ -57677,26 +66613,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMcpServer.Output.Ok.Body + public var body: Operations.ListModels.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMcpServer.Output.Ok.Body) { + public init(body: Operations.ListModels.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/200`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.UpdateMcpServer.Output.Ok) + case ok(Operations.ListModels.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateMcpServer.Output.Ok { + public var ok: Operations.ListModels.Output.Ok { get throws { switch self { case let .ok(response): @@ -57710,9 +66646,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -57728,26 +66664,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMcpServer.Output.BadRequest.Body + public var body: Operations.ListModels.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMcpServer.Output.BadRequest.Body) { + public init(body: Operations.ListModels.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/400`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateMcpServer.Output.BadRequest) + case badRequest(Operations.ListModels.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateMcpServer.Output.BadRequest { + public var badRequest: Operations.ListModels.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -57761,9 +66697,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -57779,26 +66715,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMcpServer.Output.Unauthorized.Body + public var body: Operations.ListModels.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMcpServer.Output.Unauthorized.Body) { + public init(body: Operations.ListModels.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/401`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateMcpServer.Output.Unauthorized) + case unauthorized(Operations.ListModels.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateMcpServer.Output.Unauthorized { + public var unauthorized: Operations.ListModels.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -57812,9 +66748,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -57830,26 +66766,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMcpServer.Output.NotFound.Body + public var body: Operations.ListModels.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMcpServer.Output.NotFound.Body) { + public init(body: Operations.ListModels.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/404`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateMcpServer.Output.NotFound) + case notFound(Operations.ListModels.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateMcpServer.Output.NotFound { + public var notFound: Operations.ListModels.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -57863,9 +66799,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -57881,26 +66817,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMcpServer.Output.MethodNotAllowed.Body + public var body: Operations.ListModels.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMcpServer.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListModels.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/405`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateMcpServer.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListModels.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateMcpServer.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListModels.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -57914,9 +66850,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -57932,26 +66868,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMcpServer.Output.Conflict.Body + public var body: Operations.ListModels.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMcpServer.Output.Conflict.Body) { + public init(body: Operations.ListModels.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/409`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateMcpServer.Output.Conflict) + case conflict(Operations.ListModels.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateMcpServer.Output.Conflict { + public var conflict: Operations.ListModels.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -57965,9 +66901,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -57983,26 +66919,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMcpServer.Output.ContentTooLarge.Body + public var body: Operations.ListModels.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMcpServer.Output.ContentTooLarge.Body) { + public init(body: Operations.ListModels.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/413`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateMcpServer.Output.ContentTooLarge) + case contentTooLarge(Operations.ListModels.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateMcpServer.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListModels.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -58016,9 +66952,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58034,26 +66970,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMcpServer.Output.InternalServerError.Body + public var body: Operations.ListModels.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMcpServer.Output.InternalServerError.Body) { + public init(body: Operations.ListModels.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/500`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateMcpServer.Output.InternalServerError) + case internalServerError(Operations.ListModels.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateMcpServer.Output.InternalServerError { + public var internalServerError: Operations.ListModels.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -58067,9 +67003,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/PATCH/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/models/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58085,26 +67021,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMcpServer.Output.ServiceUnavailable.Body + public var body: Operations.ListModels.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMcpServer.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListModels.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/patch(updateMcpServer)/responses/503`. + /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateMcpServer.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListModels.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateMcpServer.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListModels.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -58154,89 +67090,89 @@ public enum Operations { } } } - /// - Remark: HTTP `DELETE /v1/mcp-servers/{id}`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)`. - public enum DeleteMcpServer { - public static let id: Swift.String = "deleteMcpServer" + /// Every password manager this server supports, whether it is connected, and which secrets read from it. + /// + /// - Remark: HTTP `GET /v1/password-managers`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)`. + public enum ListPasswordManagers { + public static let id: Swift.String = "listPasswordManagers" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.DeleteMcpServer.Input.Path - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/header`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteMcpServer.Input.Headers + public var headers: Operations.ListPasswordManagers.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - public init( - path: Operations.DeleteMcpServer.Input.Path, - headers: Operations.DeleteMcpServer.Input.Headers = .init() - ) { - self.path = path + public init(headers: Operations.ListPasswordManagers.Input.Headers = .init()) { self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/200/content/application\/json`. + case json(Components.Schemas.PasswordManagers) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.PasswordManagers { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListPasswordManagers.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListPasswordManagers.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteMcpServer.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/204`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.ListPasswordManagers.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteMcpServer.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ListPasswordManagers.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58252,26 +67188,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteMcpServer.Output.BadRequest.Body + public var body: Operations.ListPasswordManagers.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteMcpServer.Output.BadRequest.Body) { + public init(body: Operations.ListPasswordManagers.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/400`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteMcpServer.Output.BadRequest) + case badRequest(Operations.ListPasswordManagers.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteMcpServer.Output.BadRequest { + public var badRequest: Operations.ListPasswordManagers.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -58285,9 +67221,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -58303,26 +67239,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteMcpServer.Output.Unauthorized.Body + public var body: Operations.ListPasswordManagers.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteMcpServer.Output.Unauthorized.Body) { + public init(body: Operations.ListPasswordManagers.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/401`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteMcpServer.Output.Unauthorized) + case unauthorized(Operations.ListPasswordManagers.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteMcpServer.Output.Unauthorized { + public var unauthorized: Operations.ListPasswordManagers.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -58336,9 +67272,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58354,26 +67290,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteMcpServer.Output.NotFound.Body + public var body: Operations.ListPasswordManagers.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteMcpServer.Output.NotFound.Body) { + public init(body: Operations.ListPasswordManagers.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/404`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteMcpServer.Output.NotFound) + case notFound(Operations.ListPasswordManagers.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteMcpServer.Output.NotFound { + public var notFound: Operations.ListPasswordManagers.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -58387,9 +67323,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58405,26 +67341,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteMcpServer.Output.MethodNotAllowed.Body + public var body: Operations.ListPasswordManagers.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteMcpServer.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListPasswordManagers.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/405`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteMcpServer.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListPasswordManagers.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteMcpServer.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListPasswordManagers.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -58438,9 +67374,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58456,26 +67392,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteMcpServer.Output.Conflict.Body + public var body: Operations.ListPasswordManagers.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteMcpServer.Output.Conflict.Body) { + public init(body: Operations.ListPasswordManagers.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/409`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteMcpServer.Output.Conflict) + case conflict(Operations.ListPasswordManagers.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteMcpServer.Output.Conflict { + public var conflict: Operations.ListPasswordManagers.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -58489,9 +67425,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -58507,26 +67443,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteMcpServer.Output.ContentTooLarge.Body + public var body: Operations.ListPasswordManagers.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteMcpServer.Output.ContentTooLarge.Body) { + public init(body: Operations.ListPasswordManagers.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/413`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteMcpServer.Output.ContentTooLarge) + case contentTooLarge(Operations.ListPasswordManagers.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteMcpServer.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListPasswordManagers.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -58540,9 +67476,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58558,26 +67494,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteMcpServer.Output.InternalServerError.Body + public var body: Operations.ListPasswordManagers.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteMcpServer.Output.InternalServerError.Body) { + public init(body: Operations.ListPasswordManagers.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/500`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteMcpServer.Output.InternalServerError) + case internalServerError(Operations.ListPasswordManagers.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteMcpServer.Output.InternalServerError { + public var internalServerError: Operations.ListPasswordManagers.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -58591,9 +67527,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58609,26 +67545,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteMcpServer.Output.ServiceUnavailable.Body + public var body: Operations.ListPasswordManagers.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteMcpServer.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListPasswordManagers.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/delete(deleteMcpServer)/responses/503`. + /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteMcpServer.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListPasswordManagers.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteMcpServer.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListPasswordManagers.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -58678,57 +67614,64 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/mcp-servers/{id}/oauth`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)`. - public enum StartMcpOAuth { - public static let id: Swift.String = "startMcpOAuth" + /// Signs in with the token to check it, then connects the password manager or replaces its token. A new token drops the values read with the old one. 400 when the password manager rejects the token; 503 when it can't be reached. + /// + /// - Remark: HTTP `PUT /v1/password-managers/{id}`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)`. + public enum ConnectPasswordManager { + public static let id: Swift.String = "connectPasswordManager" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/path`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/path/id`. - public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/path/id`. + @frozen public enum IdPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/path/id`. + public var id: Operations.ConnectPasswordManager.Input.Path.IdPayload /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + public init(id: Operations.ConnectPasswordManager.Input.Path.IdPayload) { self.id = id } } - public var path: Operations.StartMcpOAuth.Input.Path - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/header`. + public var path: Operations.ConnectPasswordManager.Input.Path + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.StartMcpOAuth.Input.Headers - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/requestBody`. + public var headers: Operations.ConnectPasswordManager.Input.Headers + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/requestBody/json/redirectUri`. - public var redirectUri: Swift.String + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/requestBody/json/token`. + public var token: Swift.String /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - redirectUri: - public init(redirectUri: Swift.String) { - self.redirectUri = redirectUri + /// - token: + public init(token: Swift.String) { + self.token = token } public enum CodingKeys: String, CodingKey { - case redirectUri + case token } } - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/requestBody/content/application\/json`. - case json(Operations.StartMcpOAuth.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/requestBody/content/application\/json`. + case json(Operations.ConnectPasswordManager.Input.Body.JsonPayload) } - public var body: Operations.StartMcpOAuth.Input.Body + public var body: Operations.ConnectPasswordManager.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -58736,9 +67679,9 @@ public enum Operations { /// - headers: /// - body: public init( - path: Operations.StartMcpOAuth.Input.Path, - headers: Operations.StartMcpOAuth.Input.Headers = .init(), - body: Operations.StartMcpOAuth.Input.Body + path: Operations.ConnectPasswordManager.Input.Path, + headers: Operations.ConnectPasswordManager.Input.Headers = .init(), + body: Operations.ConnectPasswordManager.Input.Body ) { self.path = path self.headers = headers @@ -58747,15 +67690,15 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/200/content/application\/json`. - case json(Components.Schemas.McpOAuthStart) + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.PasswordManager) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.McpOAuthStart { + public var json: Components.Schemas.PasswordManager { get throws { switch self { case let .json(body): @@ -58765,26 +67708,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartMcpOAuth.Output.Ok.Body + public var body: Operations.ConnectPasswordManager.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartMcpOAuth.Output.Ok.Body) { + public init(body: Operations.ConnectPasswordManager.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/200`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.StartMcpOAuth.Output.Ok) + case ok(Operations.ConnectPasswordManager.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.StartMcpOAuth.Output.Ok { + public var ok: Operations.ConnectPasswordManager.Output.Ok { get throws { switch self { case let .ok(response): @@ -58798,9 +67741,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58816,26 +67759,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartMcpOAuth.Output.BadRequest.Body + public var body: Operations.ConnectPasswordManager.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartMcpOAuth.Output.BadRequest.Body) { + public init(body: Operations.ConnectPasswordManager.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/400`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.StartMcpOAuth.Output.BadRequest) + case badRequest(Operations.ConnectPasswordManager.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.StartMcpOAuth.Output.BadRequest { + public var badRequest: Operations.ConnectPasswordManager.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -58849,9 +67792,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -58867,26 +67810,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartMcpOAuth.Output.Unauthorized.Body + public var body: Operations.ConnectPasswordManager.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartMcpOAuth.Output.Unauthorized.Body) { + public init(body: Operations.ConnectPasswordManager.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/401`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.StartMcpOAuth.Output.Unauthorized) + case unauthorized(Operations.ConnectPasswordManager.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.StartMcpOAuth.Output.Unauthorized { + public var unauthorized: Operations.ConnectPasswordManager.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -58900,9 +67843,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58918,26 +67861,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartMcpOAuth.Output.NotFound.Body + public var body: Operations.ConnectPasswordManager.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartMcpOAuth.Output.NotFound.Body) { + public init(body: Operations.ConnectPasswordManager.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/404`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.StartMcpOAuth.Output.NotFound) + case notFound(Operations.ConnectPasswordManager.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.StartMcpOAuth.Output.NotFound { + public var notFound: Operations.ConnectPasswordManager.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -58951,9 +67894,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -58969,26 +67912,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartMcpOAuth.Output.MethodNotAllowed.Body + public var body: Operations.ConnectPasswordManager.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartMcpOAuth.Output.MethodNotAllowed.Body) { + public init(body: Operations.ConnectPasswordManager.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/405`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.StartMcpOAuth.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ConnectPasswordManager.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.StartMcpOAuth.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ConnectPasswordManager.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -59002,9 +67945,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -59020,26 +67963,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartMcpOAuth.Output.Conflict.Body + public var body: Operations.ConnectPasswordManager.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartMcpOAuth.Output.Conflict.Body) { + public init(body: Operations.ConnectPasswordManager.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/409`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.StartMcpOAuth.Output.Conflict) + case conflict(Operations.ConnectPasswordManager.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.StartMcpOAuth.Output.Conflict { + public var conflict: Operations.ConnectPasswordManager.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -59053,9 +67996,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -59071,26 +68014,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartMcpOAuth.Output.ContentTooLarge.Body + public var body: Operations.ConnectPasswordManager.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartMcpOAuth.Output.ContentTooLarge.Body) { + public init(body: Operations.ConnectPasswordManager.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/413`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.StartMcpOAuth.Output.ContentTooLarge) + case contentTooLarge(Operations.ConnectPasswordManager.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.StartMcpOAuth.Output.ContentTooLarge { + public var contentTooLarge: Operations.ConnectPasswordManager.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -59104,9 +68047,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -59122,26 +68065,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartMcpOAuth.Output.InternalServerError.Body + public var body: Operations.ConnectPasswordManager.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartMcpOAuth.Output.InternalServerError.Body) { + public init(body: Operations.ConnectPasswordManager.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/500`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.StartMcpOAuth.Output.InternalServerError) + case internalServerError(Operations.ConnectPasswordManager.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.StartMcpOAuth.Output.InternalServerError { + public var internalServerError: Operations.ConnectPasswordManager.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -59155,9 +68098,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -59173,26 +68116,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartMcpOAuth.Output.ServiceUnavailable.Body + public var body: Operations.ConnectPasswordManager.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartMcpOAuth.Output.ServiceUnavailable.Body) { + public init(body: Operations.ConnectPasswordManager.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/post(startMcpOAuth)/responses/503`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.StartMcpOAuth.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ConnectPasswordManager.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.StartMcpOAuth.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ConnectPasswordManager.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -59242,105 +68185,96 @@ public enum Operations { } } } - /// - Remark: HTTP `DELETE /v1/mcp-servers/{id}/oauth`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)`. - public enum SignOutMcpOAuth { - public static let id: Swift.String = "signOutMcpOAuth" + /// Disconnects the password manager and drops its token. 409 while any secret still reads from it; `usedBy` in the list names them. + /// + /// - Remark: HTTP `DELETE /v1/password-managers/{id}`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)`. + public enum DisconnectPasswordManager { + public static let id: Swift.String = "disconnectPasswordManager" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/path`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/path/id`. - public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/path/id`. + @frozen public enum IdPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/path/id`. + public var id: Operations.DisconnectPasswordManager.Input.Path.IdPayload /// Creates a new `Path`. /// /// - Parameters: /// - id: - public init(id: Swift.String) { + public init(id: Operations.DisconnectPasswordManager.Input.Path.IdPayload) { self.id = id } } - public var path: Operations.SignOutMcpOAuth.Input.Path - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/header`. + public var path: Operations.DisconnectPasswordManager.Input.Path + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SignOutMcpOAuth.Input.Headers + public var headers: Operations.DisconnectPasswordManager.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.SignOutMcpOAuth.Input.Path, - headers: Operations.SignOutMcpOAuth.Input.Headers = .init() + path: Operations.DisconnectPasswordManager.Input.Path, + headers: Operations.DisconnectPasswordManager.Input.Headers = .init() ) { self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/200/content/application\/json`. - case json(Components.Schemas.McpServerStatus) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.McpServerStatus { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.SignOutMcpOAuth.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.SignOutMcpOAuth.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/200`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.SignOutMcpOAuth.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DisconnectPasswordManager.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.SignOutMcpOAuth.Output.Ok { + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DisconnectPasswordManager.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -59356,26 +68290,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutMcpOAuth.Output.BadRequest.Body + public var body: Operations.DisconnectPasswordManager.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutMcpOAuth.Output.BadRequest.Body) { + public init(body: Operations.DisconnectPasswordManager.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/400`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SignOutMcpOAuth.Output.BadRequest) + case badRequest(Operations.DisconnectPasswordManager.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SignOutMcpOAuth.Output.BadRequest { + public var badRequest: Operations.DisconnectPasswordManager.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -59389,9 +68323,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -59407,26 +68341,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutMcpOAuth.Output.Unauthorized.Body + public var body: Operations.DisconnectPasswordManager.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutMcpOAuth.Output.Unauthorized.Body) { + public init(body: Operations.DisconnectPasswordManager.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/401`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SignOutMcpOAuth.Output.Unauthorized) + case unauthorized(Operations.DisconnectPasswordManager.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SignOutMcpOAuth.Output.Unauthorized { + public var unauthorized: Operations.DisconnectPasswordManager.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -59440,9 +68374,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -59458,26 +68392,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutMcpOAuth.Output.NotFound.Body + public var body: Operations.DisconnectPasswordManager.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutMcpOAuth.Output.NotFound.Body) { + public init(body: Operations.DisconnectPasswordManager.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/404`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SignOutMcpOAuth.Output.NotFound) + case notFound(Operations.DisconnectPasswordManager.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SignOutMcpOAuth.Output.NotFound { + public var notFound: Operations.DisconnectPasswordManager.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -59491,9 +68425,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -59509,26 +68443,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutMcpOAuth.Output.MethodNotAllowed.Body + public var body: Operations.DisconnectPasswordManager.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutMcpOAuth.Output.MethodNotAllowed.Body) { + public init(body: Operations.DisconnectPasswordManager.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/405`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SignOutMcpOAuth.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DisconnectPasswordManager.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SignOutMcpOAuth.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DisconnectPasswordManager.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -59542,9 +68476,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -59560,26 +68494,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutMcpOAuth.Output.Conflict.Body + public var body: Operations.DisconnectPasswordManager.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutMcpOAuth.Output.Conflict.Body) { + public init(body: Operations.DisconnectPasswordManager.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/409`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SignOutMcpOAuth.Output.Conflict) + case conflict(Operations.DisconnectPasswordManager.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SignOutMcpOAuth.Output.Conflict { + public var conflict: Operations.DisconnectPasswordManager.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -59593,9 +68527,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -59611,26 +68545,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutMcpOAuth.Output.ContentTooLarge.Body + public var body: Operations.DisconnectPasswordManager.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutMcpOAuth.Output.ContentTooLarge.Body) { + public init(body: Operations.DisconnectPasswordManager.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/413`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SignOutMcpOAuth.Output.ContentTooLarge) + case contentTooLarge(Operations.DisconnectPasswordManager.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SignOutMcpOAuth.Output.ContentTooLarge { + public var contentTooLarge: Operations.DisconnectPasswordManager.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -59644,9 +68578,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -59662,26 +68596,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutMcpOAuth.Output.InternalServerError.Body + public var body: Operations.DisconnectPasswordManager.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutMcpOAuth.Output.InternalServerError.Body) { + public init(body: Operations.DisconnectPasswordManager.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/500`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SignOutMcpOAuth.Output.InternalServerError) + case internalServerError(Operations.DisconnectPasswordManager.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SignOutMcpOAuth.Output.InternalServerError { + public var internalServerError: Operations.DisconnectPasswordManager.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -59695,9 +68629,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -59713,26 +68647,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SignOutMcpOAuth.Output.ServiceUnavailable.Body + public var body: Operations.DisconnectPasswordManager.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SignOutMcpOAuth.Output.ServiceUnavailable.Body) { + public init(body: Operations.DisconnectPasswordManager.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/delete(signOutMcpOAuth)/responses/503`. + /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SignOutMcpOAuth.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DisconnectPasswordManager.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SignOutMcpOAuth.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DisconnectPasswordManager.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -59782,98 +68716,44 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/mcp-servers/{id}/oauth/callback`. - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)`. - public enum FinishMcpOAuth { - public static let id: Swift.String = "finishMcpOAuth" + /// Each plugin that has settings, and whether each setting has a value. Values are never returned. + /// + /// - Remark: HTTP `GET /v1/plugin-settings`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)`. + public enum ListPluginSettings { + public static let id: Swift.String = "listPluginSettings" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.FinishMcpOAuth.Input.Path - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/header`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.FinishMcpOAuth.Input.Headers - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody/json/code`. - public var code: Swift.String - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody/json/iss`. - public var iss: Swift.String? - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody/json/state`. - public var state: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - code: - /// - iss: - /// - state: - public init( - code: Swift.String, - iss: Swift.String? = nil, - state: Swift.String - ) { - self.code = code - self.iss = iss - self.state = state - } - public enum CodingKeys: String, CodingKey { - case code - case iss - case state - } - } - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/requestBody/content/application\/json`. - case json(Operations.FinishMcpOAuth.Input.Body.JsonPayload) - } - public var body: Operations.FinishMcpOAuth.Input.Body + public var headers: Operations.ListPluginSettings.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - /// - body: - public init( - path: Operations.FinishMcpOAuth.Input.Path, - headers: Operations.FinishMcpOAuth.Input.Headers = .init(), - body: Operations.FinishMcpOAuth.Input.Body - ) { - self.path = path + public init(headers: Operations.ListPluginSettings.Input.Headers = .init()) { self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/200/content/application\/json`. - case json(Components.Schemas.McpServerStatus) + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/200/content/application\/json`. + case json(Components.Schemas.PluginSettings) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.McpServerStatus { + public var json: Components.Schemas.PluginSettings { get throws { switch self { case let .json(body): @@ -59883,26 +68763,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.FinishMcpOAuth.Output.Ok.Body + public var body: Operations.ListPluginSettings.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.FinishMcpOAuth.Output.Ok.Body) { + public init(body: Operations.ListPluginSettings.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/200`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.FinishMcpOAuth.Output.Ok) + case ok(Operations.ListPluginSettings.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.FinishMcpOAuth.Output.Ok { + public var ok: Operations.ListPluginSettings.Output.Ok { get throws { switch self { case let .ok(response): @@ -59916,9 +68796,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -59934,26 +68814,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.FinishMcpOAuth.Output.BadRequest.Body + public var body: Operations.ListPluginSettings.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.FinishMcpOAuth.Output.BadRequest.Body) { + public init(body: Operations.ListPluginSettings.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/400`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.FinishMcpOAuth.Output.BadRequest) + case badRequest(Operations.ListPluginSettings.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.FinishMcpOAuth.Output.BadRequest { + public var badRequest: Operations.ListPluginSettings.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -59967,9 +68847,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -59985,26 +68865,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.FinishMcpOAuth.Output.Unauthorized.Body + public var body: Operations.ListPluginSettings.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.FinishMcpOAuth.Output.Unauthorized.Body) { + public init(body: Operations.ListPluginSettings.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/401`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.FinishMcpOAuth.Output.Unauthorized) + case unauthorized(Operations.ListPluginSettings.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.FinishMcpOAuth.Output.Unauthorized { + public var unauthorized: Operations.ListPluginSettings.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -60018,9 +68898,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60036,26 +68916,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.FinishMcpOAuth.Output.NotFound.Body + public var body: Operations.ListPluginSettings.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.FinishMcpOAuth.Output.NotFound.Body) { + public init(body: Operations.ListPluginSettings.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/404`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.FinishMcpOAuth.Output.NotFound) + case notFound(Operations.ListPluginSettings.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.FinishMcpOAuth.Output.NotFound { + public var notFound: Operations.ListPluginSettings.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -60069,9 +68949,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60087,26 +68967,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.FinishMcpOAuth.Output.MethodNotAllowed.Body + public var body: Operations.ListPluginSettings.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.FinishMcpOAuth.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListPluginSettings.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/405`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.FinishMcpOAuth.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListPluginSettings.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.FinishMcpOAuth.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListPluginSettings.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -60120,9 +69000,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60138,26 +69018,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.FinishMcpOAuth.Output.Conflict.Body + public var body: Operations.ListPluginSettings.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.FinishMcpOAuth.Output.Conflict.Body) { + public init(body: Operations.ListPluginSettings.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/409`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.FinishMcpOAuth.Output.Conflict) + case conflict(Operations.ListPluginSettings.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.FinishMcpOAuth.Output.Conflict { + public var conflict: Operations.ListPluginSettings.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -60171,9 +69051,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -60189,26 +69069,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.FinishMcpOAuth.Output.ContentTooLarge.Body + public var body: Operations.ListPluginSettings.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.FinishMcpOAuth.Output.ContentTooLarge.Body) { + public init(body: Operations.ListPluginSettings.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/413`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.FinishMcpOAuth.Output.ContentTooLarge) + case contentTooLarge(Operations.ListPluginSettings.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.FinishMcpOAuth.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListPluginSettings.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -60222,9 +69102,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60240,26 +69120,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.FinishMcpOAuth.Output.InternalServerError.Body + public var body: Operations.ListPluginSettings.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.FinishMcpOAuth.Output.InternalServerError.Body) { + public init(body: Operations.ListPluginSettings.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/500`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.FinishMcpOAuth.Output.InternalServerError) + case internalServerError(Operations.ListPluginSettings.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.FinishMcpOAuth.Output.InternalServerError { + public var internalServerError: Operations.ListPluginSettings.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -60273,9 +69153,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/mcp-servers/{id}/oauth/callback/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60291,26 +69171,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.FinishMcpOAuth.Output.ServiceUnavailable.Body + public var body: Operations.ListPluginSettings.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.FinishMcpOAuth.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListPluginSettings.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/mcp-servers/{id}/oauth/callback/post(finishMcpOAuth)/responses/503`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.FinishMcpOAuth.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListPluginSettings.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.FinishMcpOAuth.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListPluginSettings.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -60360,42 +69240,144 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/memories`. - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)`. - public enum ListSharedMemories { - public static let id: Swift.String = "listSharedMemories" + /// Sets a plugin setting to a `value` stored in Crumble, or to a `reference` read from a connected password manager, replacing the one before; send exactly one. A reference is checked by reading it once; 400 when it can't be read. 404 for a plugin or key the server doesn't have. + /// + /// - Remark: HTTP `PUT /v1/plugin-settings/{pluginId}/{key}`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)`. + public enum SetPluginSetting { + public static let id: Swift.String = "setPluginSetting" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/header`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/path/pluginId`. + public var pluginId: Swift.String + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/path/key`. + public var key: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - pluginId: + /// - key: + public init( + pluginId: Swift.String, + key: Swift.String + ) { + self.pluginId = pluginId + self.key = key + } + } + public var path: Operations.SetPluginSetting.Input.Path + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListSharedMemories.Input.Headers + public var headers: Operations.SetPluginSetting.Input.Headers + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/reference/passwordManager`. + public var passwordManager: Operations.SetPluginSetting.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.SetPluginSetting.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/reference`. + public var reference: Operations.SetPluginSetting.Input.Body.JsonPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/value`. + public var value: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.SetPluginSetting.Input.Body.JsonPayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.SetPluginSetting.Input.Body.JsonPayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/content/application\/json`. + case json(Operations.SetPluginSetting.Input.Body.JsonPayload) + } + public var body: Operations.SetPluginSetting.Input.Body /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - public init(headers: Operations.ListSharedMemories.Input.Headers = .init()) { + /// - body: + public init( + path: Operations.SetPluginSetting.Input.Path, + headers: Operations.SetPluginSetting.Input.Headers = .init(), + body: Operations.SetPluginSetting.Input.Body + ) { + self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/200/content/application\/json`. - case json([Components.Schemas.Memory]) + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.PluginSetting) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.Memory] { + public var json: Components.Schemas.PluginSetting { get throws { switch self { case let .json(body): @@ -60405,26 +69387,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSharedMemories.Output.Ok.Body + public var body: Operations.SetPluginSetting.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSharedMemories.Output.Ok.Body) { + public init(body: Operations.SetPluginSetting.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/200`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListSharedMemories.Output.Ok) + case ok(Operations.SetPluginSetting.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListSharedMemories.Output.Ok { + public var ok: Operations.SetPluginSetting.Output.Ok { get throws { switch self { case let .ok(response): @@ -60438,9 +69420,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60456,26 +69438,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSharedMemories.Output.BadRequest.Body + public var body: Operations.SetPluginSetting.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSharedMemories.Output.BadRequest.Body) { + public init(body: Operations.SetPluginSetting.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/400`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListSharedMemories.Output.BadRequest) + case badRequest(Operations.SetPluginSetting.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListSharedMemories.Output.BadRequest { + public var badRequest: Operations.SetPluginSetting.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -60489,9 +69471,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -60507,26 +69489,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSharedMemories.Output.Unauthorized.Body + public var body: Operations.SetPluginSetting.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSharedMemories.Output.Unauthorized.Body) { + public init(body: Operations.SetPluginSetting.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/401`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListSharedMemories.Output.Unauthorized) + case unauthorized(Operations.SetPluginSetting.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListSharedMemories.Output.Unauthorized { + public var unauthorized: Operations.SetPluginSetting.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -60540,9 +69522,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60558,26 +69540,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSharedMemories.Output.NotFound.Body + public var body: Operations.SetPluginSetting.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSharedMemories.Output.NotFound.Body) { + public init(body: Operations.SetPluginSetting.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/404`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListSharedMemories.Output.NotFound) + case notFound(Operations.SetPluginSetting.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListSharedMemories.Output.NotFound { + public var notFound: Operations.SetPluginSetting.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -60591,9 +69573,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60609,26 +69591,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSharedMemories.Output.MethodNotAllowed.Body + public var body: Operations.SetPluginSetting.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSharedMemories.Output.MethodNotAllowed.Body) { + public init(body: Operations.SetPluginSetting.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/405`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListSharedMemories.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SetPluginSetting.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListSharedMemories.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SetPluginSetting.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -60642,9 +69624,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60660,26 +69642,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSharedMemories.Output.Conflict.Body + public var body: Operations.SetPluginSetting.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSharedMemories.Output.Conflict.Body) { + public init(body: Operations.SetPluginSetting.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/409`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListSharedMemories.Output.Conflict) + case conflict(Operations.SetPluginSetting.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListSharedMemories.Output.Conflict { + public var conflict: Operations.SetPluginSetting.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -60693,9 +69675,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -60711,26 +69693,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSharedMemories.Output.ContentTooLarge.Body + public var body: Operations.SetPluginSetting.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSharedMemories.Output.ContentTooLarge.Body) { + public init(body: Operations.SetPluginSetting.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/413`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListSharedMemories.Output.ContentTooLarge) + case contentTooLarge(Operations.SetPluginSetting.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListSharedMemories.Output.ContentTooLarge { + public var contentTooLarge: Operations.SetPluginSetting.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -60744,9 +69726,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60762,26 +69744,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSharedMemories.Output.InternalServerError.Body + public var body: Operations.SetPluginSetting.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSharedMemories.Output.InternalServerError.Body) { + public init(body: Operations.SetPluginSetting.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/500`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListSharedMemories.Output.InternalServerError) + case internalServerError(Operations.SetPluginSetting.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListSharedMemories.Output.InternalServerError { + public var internalServerError: Operations.SetPluginSetting.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -60795,9 +69777,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -60813,26 +69795,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSharedMemories.Output.ServiceUnavailable.Body + public var body: Operations.SetPluginSetting.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSharedMemories.Output.ServiceUnavailable.Body) { + public init(body: Operations.SetPluginSetting.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/memories/get(listSharedMemories)/responses/503`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListSharedMemories.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SetPluginSetting.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListSharedMemories.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SetPluginSetting.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -60882,68 +69864,69 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/memories`. - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)`. - public enum CreateSharedMemory { - public static let id: Swift.String = "createSharedMemory" + /// Removes a plugin setting's value. 404 for a plugin or key the server doesn't have. + /// + /// - Remark: HTTP `DELETE /v1/plugin-settings/{pluginId}/{key}`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)`. + public enum DeletePluginSetting { + public static let id: Swift.String = "deletePluginSetting" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/header`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/path/pluginId`. + public var pluginId: Swift.String + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/path/key`. + public var key: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - pluginId: + /// - key: + public init( + pluginId: Swift.String, + key: Swift.String + ) { + self.pluginId = pluginId + self.key = key + } + } + public var path: Operations.DeletePluginSetting.Input.Path + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CreateSharedMemory.Input.Headers - /// - Remark: Generated from `#/paths/v1/memories/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/memories/POST/requestBody/json/content`. - public var content: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - content: - public init(content: Swift.String) { - self.content = content - } - public enum CodingKeys: String, CodingKey { - case content - } - } - /// - Remark: Generated from `#/paths/v1/memories/POST/requestBody/content/application\/json`. - case json(Operations.CreateSharedMemory.Input.Body.JsonPayload) - } - public var body: Operations.CreateSharedMemory.Input.Body + public var headers: Operations.DeletePluginSetting.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - /// - body: public init( - headers: Operations.CreateSharedMemory.Input.Headers = .init(), - body: Operations.CreateSharedMemory.Input.Body + path: Operations.DeletePluginSetting.Input.Path, + headers: Operations.DeletePluginSetting.Input.Headers = .init() ) { + self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/201/content/application\/json`. - case json(Components.Schemas.Memory) + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/200/content/application\/json`. + case json(Components.Schemas.PluginSetting) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.Memory { + public var json: Components.Schemas.PluginSetting { get throws { switch self { case let .json(body): @@ -60953,42 +69936,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSharedMemory.Output.Created.Body - /// Creates a new `Created`. + public var body: Operations.DeletePluginSetting.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSharedMemory.Output.Created.Body) { + public init(body: Operations.DeletePluginSetting.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/201`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/200`. /// - /// HTTP response code: `201 created`. - case created(Operations.CreateSharedMemory.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `200 ok`. + case ok(Operations.DeletePluginSetting.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.CreateSharedMemory.Output.Created { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.DeletePluginSetting.Output.Ok { get throws { switch self { - case let .created(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61004,26 +69987,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSharedMemory.Output.BadRequest.Body + public var body: Operations.DeletePluginSetting.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSharedMemory.Output.BadRequest.Body) { + public init(body: Operations.DeletePluginSetting.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/400`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CreateSharedMemory.Output.BadRequest) + case badRequest(Operations.DeletePluginSetting.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CreateSharedMemory.Output.BadRequest { + public var badRequest: Operations.DeletePluginSetting.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -61037,9 +70020,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -61055,26 +70038,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSharedMemory.Output.Unauthorized.Body + public var body: Operations.DeletePluginSetting.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSharedMemory.Output.Unauthorized.Body) { + public init(body: Operations.DeletePluginSetting.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/401`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CreateSharedMemory.Output.Unauthorized) + case unauthorized(Operations.DeletePluginSetting.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CreateSharedMemory.Output.Unauthorized { + public var unauthorized: Operations.DeletePluginSetting.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -61088,9 +70071,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61106,26 +70089,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSharedMemory.Output.NotFound.Body + public var body: Operations.DeletePluginSetting.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSharedMemory.Output.NotFound.Body) { + public init(body: Operations.DeletePluginSetting.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/404`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CreateSharedMemory.Output.NotFound) + case notFound(Operations.DeletePluginSetting.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CreateSharedMemory.Output.NotFound { + public var notFound: Operations.DeletePluginSetting.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -61139,9 +70122,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61157,26 +70140,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSharedMemory.Output.MethodNotAllowed.Body + public var body: Operations.DeletePluginSetting.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSharedMemory.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeletePluginSetting.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/405`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CreateSharedMemory.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeletePluginSetting.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CreateSharedMemory.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeletePluginSetting.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -61190,9 +70173,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61208,26 +70191,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSharedMemory.Output.Conflict.Body + public var body: Operations.DeletePluginSetting.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSharedMemory.Output.Conflict.Body) { + public init(body: Operations.DeletePluginSetting.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/409`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CreateSharedMemory.Output.Conflict) + case conflict(Operations.DeletePluginSetting.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CreateSharedMemory.Output.Conflict { + public var conflict: Operations.DeletePluginSetting.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -61241,9 +70224,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -61259,26 +70242,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSharedMemory.Output.ContentTooLarge.Body + public var body: Operations.DeletePluginSetting.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSharedMemory.Output.ContentTooLarge.Body) { + public init(body: Operations.DeletePluginSetting.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/413`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CreateSharedMemory.Output.ContentTooLarge) + case contentTooLarge(Operations.DeletePluginSetting.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CreateSharedMemory.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeletePluginSetting.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -61292,9 +70275,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61310,26 +70293,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSharedMemory.Output.InternalServerError.Body + public var body: Operations.DeletePluginSetting.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSharedMemory.Output.InternalServerError.Body) { + public init(body: Operations.DeletePluginSetting.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/500`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CreateSharedMemory.Output.InternalServerError) + case internalServerError(Operations.DeletePluginSetting.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CreateSharedMemory.Output.InternalServerError { + public var internalServerError: Operations.DeletePluginSetting.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -61343,9 +70326,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61361,26 +70344,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSharedMemory.Output.ServiceUnavailable.Body + public var body: Operations.DeletePluginSetting.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSharedMemory.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeletePluginSetting.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/memories/post(createSharedMemory)/responses/503`. + /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CreateSharedMemory.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeletePluginSetting.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CreateSharedMemory.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeletePluginSetting.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -61430,14 +70413,14 @@ public enum Operations { } } } - /// - Remark: HTTP `PATCH /v1/memories/{id}`. - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)`. - public enum UpdateSharedMemory { - public static let id: Swift.String = "updateSharedMemory" + /// - Remark: HTTP `GET /v1/provider-logins/{id}`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)`. + public enum GetProviderLogin { + public static let id: Swift.String = "getProviderLogin" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/path`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/path/id`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -61447,175 +70430,43 @@ public enum Operations { self.id = id } } - public var path: Operations.UpdateSharedMemory.Input.Path - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/header`. + public var path: Operations.GetProviderLogin.Input.Path + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateSharedMemory.Input.Headers - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/requestBody/json/content`. - public var content: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - content: - public init(content: Swift.String) { - self.content = content - } - public enum CodingKeys: String, CodingKey { - case content - } - } - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/requestBody/content/application\/json`. - case json(Operations.UpdateSharedMemory.Input.Body.JsonPayload) - } - public var body: Operations.UpdateSharedMemory.Input.Body + public var headers: Operations.GetProviderLogin.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.UpdateSharedMemory.Input.Path, - headers: Operations.UpdateSharedMemory.Input.Headers = .init(), - body: Operations.UpdateSharedMemory.Input.Body + path: Operations.GetProviderLogin.Input.Path, + headers: Operations.GetProviderLogin.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/agentId`. - public var agentId: Swift.String? - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/content`. - public var content: Swift.String - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/createdAt`. - public var createdAt: Swift.String - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/id`. - public var id: Swift.String - /// Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. - /// - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source`. - public struct SourcePayload: Codable, Hashable, Sendable { - /// For `bot`. - /// - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/agentId`. - public var agentId: Swift.String? - /// For `group`. - /// - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/groupId`. - public var groupId: Swift.String? - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/kind`. - @frozen public enum KindPayload: String, Codable, Hashable, Sendable, CaseIterable { - case chat = "chat" - case owner = "owner" - case task = "task" - case bot = "bot" - case group = "group" - } - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/kind`. - public var kind: Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload.SourcePayload.KindPayload - /// The task, bot, or group chat, as named when the memory was saved. - /// - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/name`. - public var name: Swift.String? - /// For `task`. - /// - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source/scheduleId`. - public var scheduleId: Swift.String? - /// Creates a new `SourcePayload`. - /// - /// - Parameters: - /// - agentId: For `bot`. - /// - groupId: For `group`. - /// - kind: - /// - name: The task, bot, or group chat, as named when the memory was saved. - /// - scheduleId: For `task`. - public init( - agentId: Swift.String? = nil, - groupId: Swift.String? = nil, - kind: Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload.SourcePayload.KindPayload, - name: Swift.String? = nil, - scheduleId: Swift.String? = nil - ) { - self.agentId = agentId - self.groupId = groupId - self.kind = kind - self.name = name - self.scheduleId = scheduleId - } - public enum CodingKeys: String, CodingKey { - case agentId - case groupId - case kind - case name - case scheduleId - } - } - /// Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. - /// - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/source`. - public var source: Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload.SourcePayload? - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/json/updatedAt`. - public var updatedAt: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - agentId: - /// - content: - /// - createdAt: - /// - id: - /// - source: Where the memory was saved: the owner's bot chat, the owner directly, a scheduled task, another bot's request, or a group chat. - /// - updatedAt: - public init( - agentId: Swift.String? = nil, - content: Swift.String, - createdAt: Swift.String, - id: Swift.String, - source: Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload.SourcePayload? = nil, - updatedAt: Swift.String - ) { - self.agentId = agentId - self.content = content - self.createdAt = createdAt - self.id = id - self.source = source - self.updatedAt = updatedAt - } - public enum CodingKeys: String, CodingKey { - case agentId - case content - case createdAt - case id - case source - case updatedAt - } - } - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/200/content/application\/json`. - case json(Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload?) + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.ProviderLoginSession) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.UpdateSharedMemory.Output.Ok.Body.JsonPayload? { + public var json: Components.Schemas.ProviderLoginSession { get throws { switch self { case let .json(body): @@ -61625,26 +70476,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSharedMemory.Output.Ok.Body + public var body: Operations.GetProviderLogin.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSharedMemory.Output.Ok.Body) { + public init(body: Operations.GetProviderLogin.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/200`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.UpdateSharedMemory.Output.Ok) + case ok(Operations.GetProviderLogin.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateSharedMemory.Output.Ok { + public var ok: Operations.GetProviderLogin.Output.Ok { get throws { switch self { case let .ok(response): @@ -61658,9 +70509,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61676,26 +70527,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSharedMemory.Output.BadRequest.Body + public var body: Operations.GetProviderLogin.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSharedMemory.Output.BadRequest.Body) { + public init(body: Operations.GetProviderLogin.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/400`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateSharedMemory.Output.BadRequest) + case badRequest(Operations.GetProviderLogin.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateSharedMemory.Output.BadRequest { + public var badRequest: Operations.GetProviderLogin.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -61709,9 +70560,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -61727,26 +70578,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSharedMemory.Output.Unauthorized.Body + public var body: Operations.GetProviderLogin.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSharedMemory.Output.Unauthorized.Body) { + public init(body: Operations.GetProviderLogin.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/401`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateSharedMemory.Output.Unauthorized) + case unauthorized(Operations.GetProviderLogin.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateSharedMemory.Output.Unauthorized { + public var unauthorized: Operations.GetProviderLogin.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -61760,9 +70611,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61778,26 +70629,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSharedMemory.Output.NotFound.Body + public var body: Operations.GetProviderLogin.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSharedMemory.Output.NotFound.Body) { + public init(body: Operations.GetProviderLogin.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/404`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateSharedMemory.Output.NotFound) + case notFound(Operations.GetProviderLogin.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateSharedMemory.Output.NotFound { + public var notFound: Operations.GetProviderLogin.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -61811,9 +70662,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61829,26 +70680,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSharedMemory.Output.MethodNotAllowed.Body + public var body: Operations.GetProviderLogin.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSharedMemory.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetProviderLogin.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/405`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateSharedMemory.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetProviderLogin.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateSharedMemory.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetProviderLogin.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -61862,9 +70713,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61880,26 +70731,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSharedMemory.Output.Conflict.Body + public var body: Operations.GetProviderLogin.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSharedMemory.Output.Conflict.Body) { + public init(body: Operations.GetProviderLogin.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/409`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateSharedMemory.Output.Conflict) + case conflict(Operations.GetProviderLogin.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateSharedMemory.Output.Conflict { + public var conflict: Operations.GetProviderLogin.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -61912,10 +70763,61 @@ public enum Operations { } } } + public struct Gone: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/410/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/410/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetProviderLogin.Output.Gone.Body + /// Creates a new `Gone`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetProviderLogin.Output.Gone.Body) { + self.body = body + } + } + /// Login session ended or was lost on restart + /// + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/410`. + /// + /// HTTP response code: `410 gone`. + case gone(Operations.GetProviderLogin.Output.Gone) + /// The associated value of the enum case if `self` is `.gone`. + /// + /// - Throws: An error if `self` is not `.gone`. + /// - SeeAlso: `.gone`. + public var gone: Operations.GetProviderLogin.Output.Gone { + get throws { + switch self { + case let .gone(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "gone", + response: self + ) + } + } + } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -61931,26 +70833,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSharedMemory.Output.ContentTooLarge.Body + public var body: Operations.GetProviderLogin.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSharedMemory.Output.ContentTooLarge.Body) { + public init(body: Operations.GetProviderLogin.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/413`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateSharedMemory.Output.ContentTooLarge) + case contentTooLarge(Operations.GetProviderLogin.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateSharedMemory.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetProviderLogin.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -61964,9 +70866,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -61982,26 +70884,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSharedMemory.Output.InternalServerError.Body + public var body: Operations.GetProviderLogin.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSharedMemory.Output.InternalServerError.Body) { + public init(body: Operations.GetProviderLogin.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/500`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateSharedMemory.Output.InternalServerError) + case internalServerError(Operations.GetProviderLogin.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateSharedMemory.Output.InternalServerError { + public var internalServerError: Operations.GetProviderLogin.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -62015,9 +70917,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/PATCH/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -62033,26 +70935,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSharedMemory.Output.ServiceUnavailable.Body + public var body: Operations.GetProviderLogin.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSharedMemory.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetProviderLogin.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/patch(updateSharedMemory)/responses/503`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateSharedMemory.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetProviderLogin.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateSharedMemory.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetProviderLogin.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -62102,14 +71004,14 @@ public enum Operations { } } } - /// - Remark: HTTP `DELETE /v1/memories/{id}`. - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)`. - public enum DeleteSharedMemory { - public static let id: Swift.String = "deleteSharedMemory" + /// - Remark: HTTP `DELETE /v1/provider-logins/{id}`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)`. + public enum CancelProviderLogin { + public static let id: Swift.String = "cancelProviderLogin" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/path`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/path/id`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -62119,72 +71021,88 @@ public enum Operations { self.id = id } } - public var path: Operations.DeleteSharedMemory.Input.Path - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/header`. + public var path: Operations.CancelProviderLogin.Input.Path + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteSharedMemory.Input.Headers + public var headers: Operations.CancelProviderLogin.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.DeleteSharedMemory.Input.Path, - headers: Operations.DeleteSharedMemory.Input.Headers = .init() + path: Operations.CancelProviderLogin.Input.Path, + headers: Operations.CancelProviderLogin.Input.Headers = .init() ) { self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/200/content/application\/json`. + case json(Components.Schemas.ProviderLoginSession) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ProviderLoginSession { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CancelProviderLogin.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CancelProviderLogin.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteSharedMemory.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/204`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.CancelProviderLogin.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteSharedMemory.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.CancelProviderLogin.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -62200,26 +71118,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSharedMemory.Output.BadRequest.Body + public var body: Operations.CancelProviderLogin.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSharedMemory.Output.BadRequest.Body) { + public init(body: Operations.CancelProviderLogin.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/400`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteSharedMemory.Output.BadRequest) + case badRequest(Operations.CancelProviderLogin.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteSharedMemory.Output.BadRequest { + public var badRequest: Operations.CancelProviderLogin.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -62233,9 +71151,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -62251,26 +71169,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSharedMemory.Output.Unauthorized.Body + public var body: Operations.CancelProviderLogin.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSharedMemory.Output.Unauthorized.Body) { + public init(body: Operations.CancelProviderLogin.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/401`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteSharedMemory.Output.Unauthorized) + case unauthorized(Operations.CancelProviderLogin.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteSharedMemory.Output.Unauthorized { + public var unauthorized: Operations.CancelProviderLogin.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -62284,9 +71202,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -62302,42 +71220,93 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSharedMemory.Output.NotFound.Body + public var body: Operations.CancelProviderLogin.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSharedMemory.Output.NotFound.Body) { + public init(body: Operations.CancelProviderLogin.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/404`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteSharedMemory.Output.NotFound) + case notFound(Operations.CancelProviderLogin.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteSharedMemory.Output.NotFound { + public var notFound: Operations.CancelProviderLogin.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/405/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/405/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CancelProviderLogin.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CancelProviderLogin.Output.MethodNotAllowed.Body) { + self.body = body + } + } + /// Resource is read-only + /// + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/405`. + /// + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.CancelProviderLogin.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.CancelProviderLogin.Output.MethodNotAllowed { get throws { switch self { - case let .notFound(response): + case let .methodNotAllowed(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "methodNotAllowed", response: self ) } } } - public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/405/content`. + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -62353,42 +71322,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSharedMemory.Output.MethodNotAllowed.Body - /// Creates a new `MethodNotAllowed`. + public var body: Operations.CancelProviderLogin.Output.Conflict.Body + /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSharedMemory.Output.MethodNotAllowed.Body) { + public init(body: Operations.CancelProviderLogin.Output.Conflict.Body) { self.body = body } } - /// Resource is read-only + /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/405`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/409`. /// - /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteSharedMemory.Output.MethodNotAllowed) - /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// HTTP response code: `409 conflict`. + case conflict(Operations.CancelProviderLogin.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. /// - /// - Throws: An error if `self` is not `.methodNotAllowed`. - /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteSharedMemory.Output.MethodNotAllowed { + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.CancelProviderLogin.Output.Conflict { get throws { switch self { - case let .methodNotAllowed(response): + case let .conflict(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "methodNotAllowed", + expectedStatus: "conflict", response: self ) } } } - public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/409/content`. + public struct Gone: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/410/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/410/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -62404,42 +71373,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSharedMemory.Output.Conflict.Body - /// Creates a new `Conflict`. + public var body: Operations.CancelProviderLogin.Output.Gone.Body + /// Creates a new `Gone`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSharedMemory.Output.Conflict.Body) { + public init(body: Operations.CancelProviderLogin.Output.Gone.Body) { self.body = body } } - /// Conflicting request + /// Login session ended or was lost on restart /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/409`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/410`. /// - /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteSharedMemory.Output.Conflict) - /// The associated value of the enum case if `self` is `.conflict`. + /// HTTP response code: `410 gone`. + case gone(Operations.CancelProviderLogin.Output.Gone) + /// The associated value of the enum case if `self` is `.gone`. /// - /// - Throws: An error if `self` is not `.conflict`. - /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteSharedMemory.Output.Conflict { + /// - Throws: An error if `self` is not `.gone`. + /// - SeeAlso: `.gone`. + public var gone: Operations.CancelProviderLogin.Output.Gone { get throws { switch self { - case let .conflict(response): + case let .gone(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "conflict", + expectedStatus: "gone", response: self ) } } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -62455,26 +71424,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSharedMemory.Output.ContentTooLarge.Body + public var body: Operations.CancelProviderLogin.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSharedMemory.Output.ContentTooLarge.Body) { + public init(body: Operations.CancelProviderLogin.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/413`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteSharedMemory.Output.ContentTooLarge) + case contentTooLarge(Operations.CancelProviderLogin.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteSharedMemory.Output.ContentTooLarge { + public var contentTooLarge: Operations.CancelProviderLogin.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -62488,9 +71457,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -62506,26 +71475,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSharedMemory.Output.InternalServerError.Body + public var body: Operations.CancelProviderLogin.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSharedMemory.Output.InternalServerError.Body) { + public init(body: Operations.CancelProviderLogin.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/500`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteSharedMemory.Output.InternalServerError) + case internalServerError(Operations.CancelProviderLogin.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteSharedMemory.Output.InternalServerError { + public var internalServerError: Operations.CancelProviderLogin.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -62539,9 +71508,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/memories/{id}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -62557,26 +71526,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSharedMemory.Output.ServiceUnavailable.Body + public var body: Operations.CancelProviderLogin.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSharedMemory.Output.ServiceUnavailable.Body) { + public init(body: Operations.CancelProviderLogin.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/memories/{id}/delete(deleteSharedMemory)/responses/503`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteSharedMemory.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CancelProviderLogin.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteSharedMemory.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CancelProviderLogin.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -62626,238 +71595,92 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/message-gateways`. - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)`. - public enum MessageGateways { - public static let id: Swift.String = "messageGateways" + /// - Remark: HTTP `POST /v1/provider-logins/{id}/responses`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)`. + public enum AnswerProviderLogin { + public static let id: Swift.String = "answerProviderLogin" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/header`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.AnswerProviderLogin.Input.Path + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.MessageGateways.Input.Headers + public var headers: Operations.AnswerProviderLogin.Input.Headers + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/requestBody/json/promptId`. + public var promptId: Swift.String + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/requestBody/json/value`. + public var value: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - promptId: + /// - value: + public init( + promptId: Swift.String, + value: Swift.String + ) { + self.promptId = promptId + self.value = value + } + public enum CodingKeys: String, CodingKey { + case promptId + case value + } + } + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/requestBody/content/application\/json`. + case json(Operations.AnswerProviderLogin.Input.Body.JsonPayload) + } + public var body: Operations.AnswerProviderLogin.Input.Body /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - public init(headers: Operations.MessageGateways.Input.Headers = .init()) { + /// - body: + public init( + path: Operations.AnswerProviderLogin.Input.Path, + headers: Operations.AnswerProviderLogin.Input.Headers = .init(), + body: Operations.AnswerProviderLogin.Input.Body + ) { + self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload`. - public struct GatewaysPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config`. - public struct ConfigPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/AliasesPayload`. - public struct AliasesPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/AliasesPayload/botId`. - public var botId: Swift.String - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/AliasesPayload/handle`. - public var handle: Swift.String - /// Creates a new `AliasesPayloadPayload`. - /// - /// - Parameters: - /// - botId: - /// - handle: - public init( - botId: Swift.String, - handle: Swift.String - ) { - self.botId = botId - self.handle = handle - } - public enum CodingKeys: String, CodingKey { - case botId - case handle - } - } - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/aliases`. - public typealias AliasesPayload = [Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload.AliasesPayloadPayload] - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/aliases`. - public var aliases: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload.AliasesPayload - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/allowDirectMessages`. - public var allowDirectMessages: Swift.Bool - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/allowedChannelIds`. - public var allowedChannelIds: [Swift.String] - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/defaultBotId`. - public var defaultBotId: Swift.String? - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/enabled`. - public var enabled: Swift.Bool - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config/ownerId`. - public var ownerId: Swift.String? - /// Creates a new `ConfigPayload`. - /// - /// - Parameters: - /// - aliases: - /// - allowDirectMessages: - /// - allowedChannelIds: - /// - defaultBotId: - /// - enabled: - /// - ownerId: - public init( - aliases: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload.AliasesPayload, - allowDirectMessages: Swift.Bool, - allowedChannelIds: [Swift.String], - defaultBotId: Swift.String? = nil, - enabled: Swift.Bool, - ownerId: Swift.String? = nil - ) { - self.aliases = aliases - self.allowDirectMessages = allowDirectMessages - self.allowedChannelIds = allowedChannelIds - self.defaultBotId = defaultBotId - self.enabled = enabled - self.ownerId = ownerId - } - public enum CodingKeys: String, CodingKey { - case aliases - case allowDirectMessages - case allowedChannelIds - case defaultBotId - case enabled - case ownerId - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.aliases = try container.decode( - Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload.AliasesPayload.self, - forKey: .aliases - ) - self.allowDirectMessages = try container.decode( - Swift.Bool.self, - forKey: .allowDirectMessages - ) - self.allowedChannelIds = try container.decode( - [Swift.String].self, - forKey: .allowedChannelIds - ) - self.defaultBotId = try container.decodeIfPresent( - Swift.String.self, - forKey: .defaultBotId - ) - self.enabled = try container.decode( - Swift.Bool.self, - forKey: .enabled - ) - self.ownerId = try container.decodeIfPresent( - Swift.String.self, - forKey: .ownerId - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "aliases", - "allowDirectMessages", - "allowedChannelIds", - "defaultBotId", - "enabled", - "ownerId" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/config`. - public var config: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/error`. - public var error: Swift.String? - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/failedCount`. - public var failedCount: Swift.Int - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/id`. - public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/label`. - public var label: Swift.String - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/pendingCount`. - public var pendingCount: Swift.Int - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/secretKey`. - public var secretKey: Swift.String - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/status`. - @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { - case disconnected = "disconnected" - case connecting = "connecting" - case connected = "connected" - case error = "error" - } - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/status`. - public var status: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.StatusPayload - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/GatewaysPayload/tokenConfigured`. - public var tokenConfigured: Swift.Bool - /// Creates a new `GatewaysPayloadPayload`. - /// - /// - Parameters: - /// - config: - /// - error: - /// - failedCount: - /// - id: - /// - label: - /// - pendingCount: - /// - secretKey: - /// - status: - /// - tokenConfigured: - public init( - config: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.ConfigPayload, - error: Swift.String? = nil, - failedCount: Swift.Int, - id: Swift.String, - label: Swift.String, - pendingCount: Swift.Int, - secretKey: Swift.String, - status: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload.StatusPayload, - tokenConfigured: Swift.Bool - ) { - self.config = config - self.error = error - self.failedCount = failedCount - self.id = id - self.label = label - self.pendingCount = pendingCount - self.secretKey = secretKey - self.status = status - self.tokenConfigured = tokenConfigured - } - public enum CodingKeys: String, CodingKey { - case config - case error - case failedCount - case id - case label - case pendingCount - case secretKey - case status - case tokenConfigured - } - } - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/gateways`. - public typealias GatewaysPayload = [Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayloadPayload] - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/json/gateways`. - public var gateways: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayload - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - gateways: - public init(gateways: Operations.MessageGateways.Output.Ok.Body.JsonPayload.GatewaysPayload) { - self.gateways = gateways - } - public enum CodingKeys: String, CodingKey { - case gateways - } - } - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/200/content/application\/json`. - case json(Operations.MessageGateways.Output.Ok.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/200/content/application\/json`. + case json(Components.Schemas.ProviderLoginSession) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.MessageGateways.Output.Ok.Body.JsonPayload { + public var json: Components.Schemas.ProviderLoginSession { get throws { switch self { case let .json(body): @@ -62867,26 +71690,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.MessageGateways.Output.Ok.Body + public var body: Operations.AnswerProviderLogin.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.MessageGateways.Output.Ok.Body) { + public init(body: Operations.AnswerProviderLogin.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/200`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.MessageGateways.Output.Ok) + case ok(Operations.AnswerProviderLogin.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.MessageGateways.Output.Ok { + public var ok: Operations.AnswerProviderLogin.Output.Ok { get throws { switch self { case let .ok(response): @@ -62900,9 +71723,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -62918,26 +71741,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.MessageGateways.Output.BadRequest.Body + public var body: Operations.AnswerProviderLogin.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.MessageGateways.Output.BadRequest.Body) { + public init(body: Operations.AnswerProviderLogin.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/400`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.MessageGateways.Output.BadRequest) + case badRequest(Operations.AnswerProviderLogin.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.MessageGateways.Output.BadRequest { + public var badRequest: Operations.AnswerProviderLogin.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -62951,9 +71774,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -62969,26 +71792,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.MessageGateways.Output.Unauthorized.Body + public var body: Operations.AnswerProviderLogin.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.MessageGateways.Output.Unauthorized.Body) { + public init(body: Operations.AnswerProviderLogin.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/401`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.MessageGateways.Output.Unauthorized) + case unauthorized(Operations.AnswerProviderLogin.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.MessageGateways.Output.Unauthorized { + public var unauthorized: Operations.AnswerProviderLogin.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -63002,9 +71825,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -63020,26 +71843,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.MessageGateways.Output.NotFound.Body + public var body: Operations.AnswerProviderLogin.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.MessageGateways.Output.NotFound.Body) { + public init(body: Operations.AnswerProviderLogin.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/404`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.MessageGateways.Output.NotFound) + case notFound(Operations.AnswerProviderLogin.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.MessageGateways.Output.NotFound { + public var notFound: Operations.AnswerProviderLogin.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -63053,9 +71876,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -63071,26 +71894,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.MessageGateways.Output.MethodNotAllowed.Body + public var body: Operations.AnswerProviderLogin.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.MessageGateways.Output.MethodNotAllowed.Body) { + public init(body: Operations.AnswerProviderLogin.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/405`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.MessageGateways.Output.MethodNotAllowed) + case methodNotAllowed(Operations.AnswerProviderLogin.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.MessageGateways.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.AnswerProviderLogin.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -63104,9 +71927,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -63122,42 +71945,93 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.MessageGateways.Output.Conflict.Body + public var body: Operations.AnswerProviderLogin.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.MessageGateways.Output.Conflict.Body) { + public init(body: Operations.AnswerProviderLogin.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/409`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.MessageGateways.Output.Conflict) + case conflict(Operations.AnswerProviderLogin.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.MessageGateways.Output.Conflict { + public var conflict: Operations.AnswerProviderLogin.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct Gone: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/410/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/410/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.AnswerProviderLogin.Output.Gone.Body + /// Creates a new `Gone`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.AnswerProviderLogin.Output.Gone.Body) { + self.body = body + } + } + /// Login session ended or was lost on restart + /// + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/410`. + /// + /// HTTP response code: `410 gone`. + case gone(Operations.AnswerProviderLogin.Output.Gone) + /// The associated value of the enum case if `self` is `.gone`. + /// + /// - Throws: An error if `self` is not `.gone`. + /// - SeeAlso: `.gone`. + public var gone: Operations.AnswerProviderLogin.Output.Gone { get throws { switch self { - case let .conflict(response): + case let .gone(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "conflict", + expectedStatus: "gone", response: self ) } } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -63173,26 +72047,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.MessageGateways.Output.ContentTooLarge.Body + public var body: Operations.AnswerProviderLogin.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.MessageGateways.Output.ContentTooLarge.Body) { + public init(body: Operations.AnswerProviderLogin.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/413`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.MessageGateways.Output.ContentTooLarge) + case contentTooLarge(Operations.AnswerProviderLogin.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.MessageGateways.Output.ContentTooLarge { + public var contentTooLarge: Operations.AnswerProviderLogin.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -63206,9 +72080,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -63224,26 +72098,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.MessageGateways.Output.InternalServerError.Body + public var body: Operations.AnswerProviderLogin.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.MessageGateways.Output.InternalServerError.Body) { + public init(body: Operations.AnswerProviderLogin.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/500`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.MessageGateways.Output.InternalServerError) + case internalServerError(Operations.AnswerProviderLogin.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.MessageGateways.Output.InternalServerError { + public var internalServerError: Operations.AnswerProviderLogin.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -63257,9 +72131,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -63275,26 +72149,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.MessageGateways.Output.ServiceUnavailable.Body + public var body: Operations.AnswerProviderLogin.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.MessageGateways.Output.ServiceUnavailable.Body) { + public init(body: Operations.AnswerProviderLogin.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/message-gateways/get(messageGateways)/responses/503`. + /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.MessageGateways.Output.ServiceUnavailable) + case serviceUnavailable(Operations.AnswerProviderLogin.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.MessageGateways.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.AnswerProviderLogin.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -63344,355 +72218,42 @@ public enum Operations { } } } - /// - Remark: HTTP `PUT /v1/message-gateways/{id}`. - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)`. - public enum UpdateMessageGateway { - public static let id: Swift.String = "updateMessageGateway" + /// - Remark: HTTP `GET /v1/providers`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)`. + public enum ListProviders { + public static let id: Swift.String = "listProviders" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.UpdateMessageGateway.Input.Path - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/header`. + /// - Remark: Generated from `#/paths/v1/providers/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateMessageGateway.Input.Headers - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/AliasesPayload`. - public struct AliasesPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/AliasesPayload/botId`. - public var botId: Swift.String - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/AliasesPayload/handle`. - public var handle: Swift.String - /// Creates a new `AliasesPayloadPayload`. - /// - /// - Parameters: - /// - botId: - /// - handle: - public init( - botId: Swift.String, - handle: Swift.String - ) { - self.botId = botId - self.handle = handle - } - public enum CodingKeys: String, CodingKey { - case botId - case handle - } - } - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/aliases`. - public typealias AliasesPayload = [Operations.UpdateMessageGateway.Input.Body.JsonPayload.AliasesPayloadPayload] - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/aliases`. - public var aliases: Operations.UpdateMessageGateway.Input.Body.JsonPayload.AliasesPayload - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/allowDirectMessages`. - public var allowDirectMessages: Swift.Bool - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/allowedChannelIds`. - public var allowedChannelIds: [Swift.String] - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/defaultBotId`. - public var defaultBotId: Swift.String? - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/enabled`. - public var enabled: Swift.Bool - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/json/ownerId`. - public var ownerId: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - aliases: - /// - allowDirectMessages: - /// - allowedChannelIds: - /// - defaultBotId: - /// - enabled: - /// - ownerId: - public init( - aliases: Operations.UpdateMessageGateway.Input.Body.JsonPayload.AliasesPayload, - allowDirectMessages: Swift.Bool, - allowedChannelIds: [Swift.String], - defaultBotId: Swift.String? = nil, - enabled: Swift.Bool, - ownerId: Swift.String? = nil - ) { - self.aliases = aliases - self.allowDirectMessages = allowDirectMessages - self.allowedChannelIds = allowedChannelIds - self.defaultBotId = defaultBotId - self.enabled = enabled - self.ownerId = ownerId - } - public enum CodingKeys: String, CodingKey { - case aliases - case allowDirectMessages - case allowedChannelIds - case defaultBotId - case enabled - case ownerId - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.aliases = try container.decode( - Operations.UpdateMessageGateway.Input.Body.JsonPayload.AliasesPayload.self, - forKey: .aliases - ) - self.allowDirectMessages = try container.decode( - Swift.Bool.self, - forKey: .allowDirectMessages - ) - self.allowedChannelIds = try container.decode( - [Swift.String].self, - forKey: .allowedChannelIds - ) - self.defaultBotId = try container.decodeIfPresent( - Swift.String.self, - forKey: .defaultBotId - ) - self.enabled = try container.decode( - Swift.Bool.self, - forKey: .enabled - ) - self.ownerId = try container.decodeIfPresent( - Swift.String.self, - forKey: .ownerId - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "aliases", - "allowDirectMessages", - "allowedChannelIds", - "defaultBotId", - "enabled", - "ownerId" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/requestBody/content/application\/json`. - case json(Operations.UpdateMessageGateway.Input.Body.JsonPayload) - } - public var body: Operations.UpdateMessageGateway.Input.Body + public var headers: Operations.ListProviders.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - /// - body: - public init( - path: Operations.UpdateMessageGateway.Input.Path, - headers: Operations.UpdateMessageGateway.Input.Headers = .init(), - body: Operations.UpdateMessageGateway.Input.Body - ) { - self.path = path + public init(headers: Operations.ListProviders.Input.Headers = .init()) { self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config`. - public struct ConfigPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/AliasesPayload`. - public struct AliasesPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/AliasesPayload/botId`. - public var botId: Swift.String - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/AliasesPayload/handle`. - public var handle: Swift.String - /// Creates a new `AliasesPayloadPayload`. - /// - /// - Parameters: - /// - botId: - /// - handle: - public init( - botId: Swift.String, - handle: Swift.String - ) { - self.botId = botId - self.handle = handle - } - public enum CodingKeys: String, CodingKey { - case botId - case handle - } - } - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/aliases`. - public typealias AliasesPayload = [Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload.AliasesPayloadPayload] - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/aliases`. - public var aliases: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload.AliasesPayload - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/allowDirectMessages`. - public var allowDirectMessages: Swift.Bool - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/allowedChannelIds`. - public var allowedChannelIds: [Swift.String] - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/defaultBotId`. - public var defaultBotId: Swift.String? - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/enabled`. - public var enabled: Swift.Bool - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config/ownerId`. - public var ownerId: Swift.String? - /// Creates a new `ConfigPayload`. - /// - /// - Parameters: - /// - aliases: - /// - allowDirectMessages: - /// - allowedChannelIds: - /// - defaultBotId: - /// - enabled: - /// - ownerId: - public init( - aliases: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload.AliasesPayload, - allowDirectMessages: Swift.Bool, - allowedChannelIds: [Swift.String], - defaultBotId: Swift.String? = nil, - enabled: Swift.Bool, - ownerId: Swift.String? = nil - ) { - self.aliases = aliases - self.allowDirectMessages = allowDirectMessages - self.allowedChannelIds = allowedChannelIds - self.defaultBotId = defaultBotId - self.enabled = enabled - self.ownerId = ownerId - } - public enum CodingKeys: String, CodingKey { - case aliases - case allowDirectMessages - case allowedChannelIds - case defaultBotId - case enabled - case ownerId - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.aliases = try container.decode( - Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload.AliasesPayload.self, - forKey: .aliases - ) - self.allowDirectMessages = try container.decode( - Swift.Bool.self, - forKey: .allowDirectMessages - ) - self.allowedChannelIds = try container.decode( - [Swift.String].self, - forKey: .allowedChannelIds - ) - self.defaultBotId = try container.decodeIfPresent( - Swift.String.self, - forKey: .defaultBotId - ) - self.enabled = try container.decode( - Swift.Bool.self, - forKey: .enabled - ) - self.ownerId = try container.decodeIfPresent( - Swift.String.self, - forKey: .ownerId - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "aliases", - "allowDirectMessages", - "allowedChannelIds", - "defaultBotId", - "enabled", - "ownerId" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/config`. - public var config: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/error`. - public var error: Swift.String? - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/failedCount`. - public var failedCount: Swift.Int - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/id`. - public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/label`. - public var label: Swift.String - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/pendingCount`. - public var pendingCount: Swift.Int - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/secretKey`. - public var secretKey: Swift.String - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/status`. - @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { - case disconnected = "disconnected" - case connecting = "connecting" - case connected = "connected" - case error = "error" - } - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/status`. - public var status: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.StatusPayload - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/json/tokenConfigured`. - public var tokenConfigured: Swift.Bool - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - config: - /// - error: - /// - failedCount: - /// - id: - /// - label: - /// - pendingCount: - /// - secretKey: - /// - status: - /// - tokenConfigured: - public init( - config: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.ConfigPayload, - error: Swift.String? = nil, - failedCount: Swift.Int, - id: Swift.String, - label: Swift.String, - pendingCount: Swift.Int, - secretKey: Swift.String, - status: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload.StatusPayload, - tokenConfigured: Swift.Bool - ) { - self.config = config - self.error = error - self.failedCount = failedCount - self.id = id - self.label = label - self.pendingCount = pendingCount - self.secretKey = secretKey - self.status = status - self.tokenConfigured = tokenConfigured - } - public enum CodingKeys: String, CodingKey { - case config - case error - case failedCount - case id - case label - case pendingCount - case secretKey - case status - case tokenConfigured - } - } - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/200/content/application\/json`. - case json(Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/200/content/application\/json`. + case json([Components.Schemas.Provider]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.UpdateMessageGateway.Output.Ok.Body.JsonPayload { + public var json: [Components.Schemas.Provider] { get throws { switch self { case let .json(body): @@ -63702,26 +72263,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMessageGateway.Output.Ok.Body + public var body: Operations.ListProviders.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMessageGateway.Output.Ok.Body) { + public init(body: Operations.ListProviders.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/200`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.UpdateMessageGateway.Output.Ok) + case ok(Operations.ListProviders.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateMessageGateway.Output.Ok { + public var ok: Operations.ListProviders.Output.Ok { get throws { switch self { case let .ok(response): @@ -63735,9 +72296,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -63753,26 +72314,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMessageGateway.Output.BadRequest.Body + public var body: Operations.ListProviders.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMessageGateway.Output.BadRequest.Body) { + public init(body: Operations.ListProviders.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/400`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateMessageGateway.Output.BadRequest) + case badRequest(Operations.ListProviders.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateMessageGateway.Output.BadRequest { + public var badRequest: Operations.ListProviders.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -63786,9 +72347,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -63804,26 +72365,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMessageGateway.Output.Unauthorized.Body + public var body: Operations.ListProviders.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMessageGateway.Output.Unauthorized.Body) { + public init(body: Operations.ListProviders.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/401`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateMessageGateway.Output.Unauthorized) + case unauthorized(Operations.ListProviders.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateMessageGateway.Output.Unauthorized { + public var unauthorized: Operations.ListProviders.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -63837,9 +72398,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -63855,26 +72416,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMessageGateway.Output.NotFound.Body + public var body: Operations.ListProviders.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMessageGateway.Output.NotFound.Body) { + public init(body: Operations.ListProviders.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/404`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateMessageGateway.Output.NotFound) + case notFound(Operations.ListProviders.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateMessageGateway.Output.NotFound { + public var notFound: Operations.ListProviders.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -63888,9 +72449,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -63906,26 +72467,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMessageGateway.Output.MethodNotAllowed.Body + public var body: Operations.ListProviders.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMessageGateway.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListProviders.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/405`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateMessageGateway.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListProviders.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateMessageGateway.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListProviders.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -63939,9 +72500,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -63957,26 +72518,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMessageGateway.Output.Conflict.Body + public var body: Operations.ListProviders.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMessageGateway.Output.Conflict.Body) { + public init(body: Operations.ListProviders.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/409`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateMessageGateway.Output.Conflict) + case conflict(Operations.ListProviders.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateMessageGateway.Output.Conflict { + public var conflict: Operations.ListProviders.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -63990,9 +72551,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -64008,26 +72569,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMessageGateway.Output.ContentTooLarge.Body + public var body: Operations.ListProviders.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMessageGateway.Output.ContentTooLarge.Body) { + public init(body: Operations.ListProviders.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/413`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateMessageGateway.Output.ContentTooLarge) + case contentTooLarge(Operations.ListProviders.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateMessageGateway.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListProviders.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -64041,9 +72602,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64059,26 +72620,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMessageGateway.Output.InternalServerError.Body + public var body: Operations.ListProviders.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMessageGateway.Output.InternalServerError.Body) { + public init(body: Operations.ListProviders.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/500`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateMessageGateway.Output.InternalServerError) + case internalServerError(Operations.ListProviders.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateMessageGateway.Output.InternalServerError { + public var internalServerError: Operations.ListProviders.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -64092,9 +72653,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/message-gateways/{id}/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64110,26 +72671,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateMessageGateway.Output.ServiceUnavailable.Body + public var body: Operations.ListProviders.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateMessageGateway.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListProviders.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/message-gateways/{id}/put(updateMessageGateway)/responses/503`. + /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateMessageGateway.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListProviders.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateMessageGateway.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListProviders.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -64179,60 +72740,137 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/models`. - /// - Remark: Generated from `#/paths//v1/models/get(listModels)`. - public enum ListModels { - public static let id: Swift.String = "listModels" + /// Saves the provider's API key, or a password manager reference to read it from. A reference is read once to check it; 400 when it can't be read, keeping the previous credential. + /// + /// - Remark: HTTP `PUT /v1/providers/{provider}`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)`. + public enum PutProviderKey { + public static let id: Swift.String = "putProviderKey" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/query/provider`. - public var provider: Swift.String? - /// Creates a new `Query`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/path/provider`. + public var provider: Swift.String + /// Creates a new `Path`. /// /// - Parameters: /// - provider: - public init(provider: Swift.String? = nil) { + public init(provider: Swift.String) { self.provider = provider } } - public var query: Operations.ListModels.Input.Query - /// - Remark: Generated from `#/paths/v1/models/GET/header`. + public var path: Operations.PutProviderKey.Input.Path + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListModels.Input.Headers + public var headers: Operations.PutProviderKey.Input.Headers + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/reference`. + public struct ReferencePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/reference/passwordManager`. + @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { + case _1password = "1password" + case bitwarden = "bitwarden" + } + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/reference/passwordManager`. + public var passwordManager: Operations.PutProviderKey.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/reference/reference`. + public var reference: Swift.String + /// Creates a new `ReferencePayload`. + /// + /// - Parameters: + /// - passwordManager: + /// - reference: + public init( + passwordManager: Operations.PutProviderKey.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload, + reference: Swift.String + ) { + self.passwordManager = passwordManager + self.reference = reference + } + public enum CodingKeys: String, CodingKey { + case passwordManager + case reference + } + } + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/reference`. + public var reference: Operations.PutProviderKey.Input.Body.JsonPayload.ReferencePayload? + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/value`. + public var value: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - reference: + /// - value: + public init( + reference: Operations.PutProviderKey.Input.Body.JsonPayload.ReferencePayload? = nil, + value: Swift.String? = nil + ) { + self.reference = reference + self.value = value + } + public enum CodingKeys: String, CodingKey { + case reference + case value + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.reference = try container.decodeIfPresent( + Operations.PutProviderKey.Input.Body.JsonPayload.ReferencePayload.self, + forKey: .reference + ) + self.value = try container.decodeIfPresent( + Swift.String.self, + forKey: .value + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "reference", + "value" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/content/application\/json`. + case json(Operations.PutProviderKey.Input.Body.JsonPayload) + } + public var body: Operations.PutProviderKey.Input.Body /// Creates a new `Input`. /// /// - Parameters: - /// - query: + /// - path: /// - headers: + /// - body: public init( - query: Operations.ListModels.Input.Query = .init(), - headers: Operations.ListModels.Input.Headers = .init() + path: Operations.PutProviderKey.Input.Path, + headers: Operations.PutProviderKey.Input.Headers = .init(), + body: Operations.PutProviderKey.Input.Body ) { - self.query = query + self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/200/content/application\/json`. - case json([Components.Schemas.Model]) + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.ProviderConfigured) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.Model] { + public var json: Components.Schemas.ProviderConfigured { get throws { switch self { case let .json(body): @@ -64242,26 +72880,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListModels.Output.Ok.Body + public var body: Operations.PutProviderKey.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListModels.Output.Ok.Body) { + public init(body: Operations.PutProviderKey.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/200`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListModels.Output.Ok) + case ok(Operations.PutProviderKey.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListModels.Output.Ok { + public var ok: Operations.PutProviderKey.Output.Ok { get throws { switch self { case let .ok(response): @@ -64275,9 +72913,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64293,26 +72931,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListModels.Output.BadRequest.Body + public var body: Operations.PutProviderKey.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListModels.Output.BadRequest.Body) { + public init(body: Operations.PutProviderKey.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/400`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListModels.Output.BadRequest) + case badRequest(Operations.PutProviderKey.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListModels.Output.BadRequest { + public var badRequest: Operations.PutProviderKey.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -64326,9 +72964,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -64344,26 +72982,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListModels.Output.Unauthorized.Body + public var body: Operations.PutProviderKey.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListModels.Output.Unauthorized.Body) { + public init(body: Operations.PutProviderKey.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/401`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListModels.Output.Unauthorized) + case unauthorized(Operations.PutProviderKey.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListModels.Output.Unauthorized { + public var unauthorized: Operations.PutProviderKey.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -64377,9 +73015,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64395,26 +73033,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListModels.Output.NotFound.Body + public var body: Operations.PutProviderKey.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListModels.Output.NotFound.Body) { + public init(body: Operations.PutProviderKey.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/404`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListModels.Output.NotFound) + case notFound(Operations.PutProviderKey.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListModels.Output.NotFound { + public var notFound: Operations.PutProviderKey.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -64428,9 +73066,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64446,26 +73084,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListModels.Output.MethodNotAllowed.Body + public var body: Operations.PutProviderKey.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListModels.Output.MethodNotAllowed.Body) { + public init(body: Operations.PutProviderKey.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/405`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListModels.Output.MethodNotAllowed) + case methodNotAllowed(Operations.PutProviderKey.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListModels.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.PutProviderKey.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -64479,9 +73117,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64497,26 +73135,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListModels.Output.Conflict.Body + public var body: Operations.PutProviderKey.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListModels.Output.Conflict.Body) { + public init(body: Operations.PutProviderKey.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/409`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListModels.Output.Conflict) + case conflict(Operations.PutProviderKey.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListModels.Output.Conflict { + public var conflict: Operations.PutProviderKey.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -64530,9 +73168,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -64548,26 +73186,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListModels.Output.ContentTooLarge.Body + public var body: Operations.PutProviderKey.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListModels.Output.ContentTooLarge.Body) { + public init(body: Operations.PutProviderKey.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/413`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListModels.Output.ContentTooLarge) + case contentTooLarge(Operations.PutProviderKey.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListModels.Output.ContentTooLarge { + public var contentTooLarge: Operations.PutProviderKey.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -64581,9 +73219,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64599,26 +73237,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListModels.Output.InternalServerError.Body + public var body: Operations.PutProviderKey.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListModels.Output.InternalServerError.Body) { + public init(body: Operations.PutProviderKey.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/500`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListModels.Output.InternalServerError) + case internalServerError(Operations.PutProviderKey.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListModels.Output.InternalServerError { + public var internalServerError: Operations.PutProviderKey.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -64632,9 +73270,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/models/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64650,26 +73288,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListModels.Output.ServiceUnavailable.Body + public var body: Operations.PutProviderKey.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListModels.Output.ServiceUnavailable.Body) { + public init(body: Operations.PutProviderKey.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/models/get(listModels)/responses/503`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListModels.Output.ServiceUnavailable) + case serviceUnavailable(Operations.PutProviderKey.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListModels.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.PutProviderKey.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -64719,89 +73357,91 @@ public enum Operations { } } } - /// Every password manager this server supports, whether it is connected, and which secrets read from it. + /// Remove the provider's saved credential. 409 for a provider that signs in outside Crumble; the message names its sign-out command. /// - /// - Remark: HTTP `GET /v1/password-managers`. - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)`. - public enum ListPasswordManagers { - public static let id: Swift.String = "listPasswordManagers" + /// - Remark: HTTP `DELETE /v1/providers/{provider}`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)`. + public enum DeleteProviderKey { + public static let id: Swift.String = "deleteProviderKey" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/header`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/path/provider`. + public var provider: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - provider: + public init(provider: Swift.String) { + self.provider = provider + } + } + public var path: Operations.DeleteProviderKey.Input.Path + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListPasswordManagers.Input.Headers + public var headers: Operations.DeleteProviderKey.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - public init(headers: Operations.ListPasswordManagers.Input.Headers = .init()) { + public init( + path: Operations.DeleteProviderKey.Input.Path, + headers: Operations.DeleteProviderKey.Input.Headers = .init() + ) { + self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/200/content/application\/json`. - case json(Components.Schemas.PasswordManagers) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.PasswordManagers { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ListPasswordManagers.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ListPasswordManagers.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/200`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.ListPasswordManagers.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteProviderKey.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.ListPasswordManagers.Output.Ok { + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteProviderKey.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64817,26 +73457,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPasswordManagers.Output.BadRequest.Body + public var body: Operations.DeleteProviderKey.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPasswordManagers.Output.BadRequest.Body) { + public init(body: Operations.DeleteProviderKey.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/400`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListPasswordManagers.Output.BadRequest) + case badRequest(Operations.DeleteProviderKey.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListPasswordManagers.Output.BadRequest { + public var badRequest: Operations.DeleteProviderKey.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -64850,9 +73490,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -64868,26 +73508,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPasswordManagers.Output.Unauthorized.Body + public var body: Operations.DeleteProviderKey.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPasswordManagers.Output.Unauthorized.Body) { + public init(body: Operations.DeleteProviderKey.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/401`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListPasswordManagers.Output.Unauthorized) + case unauthorized(Operations.DeleteProviderKey.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListPasswordManagers.Output.Unauthorized { + public var unauthorized: Operations.DeleteProviderKey.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -64901,9 +73541,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64919,26 +73559,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPasswordManagers.Output.NotFound.Body + public var body: Operations.DeleteProviderKey.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPasswordManagers.Output.NotFound.Body) { + public init(body: Operations.DeleteProviderKey.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/404`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListPasswordManagers.Output.NotFound) + case notFound(Operations.DeleteProviderKey.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListPasswordManagers.Output.NotFound { + public var notFound: Operations.DeleteProviderKey.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -64952,9 +73592,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -64970,26 +73610,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPasswordManagers.Output.MethodNotAllowed.Body + public var body: Operations.DeleteProviderKey.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPasswordManagers.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteProviderKey.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/405`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListPasswordManagers.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteProviderKey.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListPasswordManagers.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteProviderKey.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -65003,9 +73643,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -65021,26 +73661,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPasswordManagers.Output.Conflict.Body + public var body: Operations.DeleteProviderKey.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPasswordManagers.Output.Conflict.Body) { + public init(body: Operations.DeleteProviderKey.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/409`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListPasswordManagers.Output.Conflict) + case conflict(Operations.DeleteProviderKey.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListPasswordManagers.Output.Conflict { + public var conflict: Operations.DeleteProviderKey.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -65054,9 +73694,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -65072,26 +73712,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPasswordManagers.Output.ContentTooLarge.Body + public var body: Operations.DeleteProviderKey.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPasswordManagers.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteProviderKey.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/413`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListPasswordManagers.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteProviderKey.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListPasswordManagers.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteProviderKey.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -65105,9 +73745,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -65123,26 +73763,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPasswordManagers.Output.InternalServerError.Body + public var body: Operations.DeleteProviderKey.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPasswordManagers.Output.InternalServerError.Body) { + public init(body: Operations.DeleteProviderKey.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/500`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListPasswordManagers.Output.InternalServerError) + case internalServerError(Operations.DeleteProviderKey.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListPasswordManagers.Output.InternalServerError { + public var internalServerError: Operations.DeleteProviderKey.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -65156,9 +73796,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -65174,26 +73814,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPasswordManagers.Output.ServiceUnavailable.Body + public var body: Operations.DeleteProviderKey.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPasswordManagers.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteProviderKey.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/password-managers/get(listPasswordManagers)/responses/503`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListPasswordManagers.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteProviderKey.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListPasswordManagers.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteProviderKey.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -65243,64 +73883,62 @@ public enum Operations { } } } - /// Signs in with the token to check it, then connects the password manager or replaces its token. A new token drops the values read with the old one. 400 when the password manager rejects the token; 503 when it can't be reached. - /// - /// - Remark: HTTP `PUT /v1/password-managers/{id}`. - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)`. - public enum ConnectPasswordManager { - public static let id: Swift.String = "connectPasswordManager" + /// - Remark: HTTP `POST /v1/providers/{provider}/login`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)`. + public enum StartProviderLogin { + public static let id: Swift.String = "startProviderLogin" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/path`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/path/id`. - @frozen public enum IdPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/path/id`. - public var id: Operations.ConnectPasswordManager.Input.Path.IdPayload + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/path/provider`. + public var provider: Swift.String /// Creates a new `Path`. /// /// - Parameters: - /// - id: - public init(id: Operations.ConnectPasswordManager.Input.Path.IdPayload) { - self.id = id + /// - provider: + public init(provider: Swift.String) { + self.provider = provider } } - public var path: Operations.ConnectPasswordManager.Input.Path - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/header`. + public var path: Operations.StartProviderLogin.Input.Path + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ConnectPasswordManager.Input.Headers - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/requestBody`. + public var headers: Operations.StartProviderLogin.Input.Headers + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/requestBody/json/token`. - public var token: Swift.String + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/requestBody/json/method`. + @frozen public enum MethodPayload: String, Codable, Hashable, Sendable, CaseIterable { + case apiKey = "api_key" + case oauth = "oauth" + } + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/requestBody/json/method`. + public var method: Operations.StartProviderLogin.Input.Body.JsonPayload.MethodPayload /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - token: - public init(token: Swift.String) { - self.token = token + /// - method: + public init(method: Operations.StartProviderLogin.Input.Body.JsonPayload.MethodPayload) { + self.method = method } public enum CodingKeys: String, CodingKey { - case token + case method } } - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/requestBody/content/application\/json`. - case json(Operations.ConnectPasswordManager.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/requestBody/content/application\/json`. + case json(Operations.StartProviderLogin.Input.Body.JsonPayload) } - public var body: Operations.ConnectPasswordManager.Input.Body + public var body: Operations.StartProviderLogin.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -65308,9 +73946,9 @@ public enum Operations { /// - headers: /// - body: public init( - path: Operations.ConnectPasswordManager.Input.Path, - headers: Operations.ConnectPasswordManager.Input.Headers = .init(), - body: Operations.ConnectPasswordManager.Input.Body + path: Operations.StartProviderLogin.Input.Path, + headers: Operations.StartProviderLogin.Input.Headers = .init(), + body: Operations.StartProviderLogin.Input.Body ) { self.path = path self.headers = headers @@ -65318,16 +73956,16 @@ public enum Operations { } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/200/content`. + public struct Accepted: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/202/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.PasswordManager) + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/202/content/application\/json`. + case json(Components.Schemas.ProviderLoginSession) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.PasswordManager { + public var json: Components.Schemas.ProviderLoginSession { get throws { switch self { case let .json(body): @@ -65337,42 +73975,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectPasswordManager.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.StartProviderLogin.Output.Accepted.Body + /// Creates a new `Accepted`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectPasswordManager.Output.Ok.Body) { + public init(body: Operations.StartProviderLogin.Output.Accepted.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/200`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/202`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.ConnectPasswordManager.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `202 accepted`. + case accepted(Operations.StartProviderLogin.Output.Accepted) + /// The associated value of the enum case if `self` is `.accepted`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.ConnectPasswordManager.Output.Ok { + /// - Throws: An error if `self` is not `.accepted`. + /// - SeeAlso: `.accepted`. + public var accepted: Operations.StartProviderLogin.Output.Accepted { get throws { switch self { - case let .ok(response): + case let .accepted(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "accepted", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -65388,26 +74026,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectPasswordManager.Output.BadRequest.Body + public var body: Operations.StartProviderLogin.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectPasswordManager.Output.BadRequest.Body) { + public init(body: Operations.StartProviderLogin.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/400`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ConnectPasswordManager.Output.BadRequest) + case badRequest(Operations.StartProviderLogin.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ConnectPasswordManager.Output.BadRequest { + public var badRequest: Operations.StartProviderLogin.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -65421,9 +74059,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -65439,26 +74077,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectPasswordManager.Output.Unauthorized.Body + public var body: Operations.StartProviderLogin.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectPasswordManager.Output.Unauthorized.Body) { + public init(body: Operations.StartProviderLogin.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/401`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ConnectPasswordManager.Output.Unauthorized) + case unauthorized(Operations.StartProviderLogin.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ConnectPasswordManager.Output.Unauthorized { + public var unauthorized: Operations.StartProviderLogin.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -65472,9 +74110,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -65490,26 +74128,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectPasswordManager.Output.NotFound.Body + public var body: Operations.StartProviderLogin.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectPasswordManager.Output.NotFound.Body) { + public init(body: Operations.StartProviderLogin.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/404`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ConnectPasswordManager.Output.NotFound) + case notFound(Operations.StartProviderLogin.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ConnectPasswordManager.Output.NotFound { + public var notFound: Operations.StartProviderLogin.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -65523,9 +74161,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -65541,26 +74179,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectPasswordManager.Output.MethodNotAllowed.Body + public var body: Operations.StartProviderLogin.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectPasswordManager.Output.MethodNotAllowed.Body) { + public init(body: Operations.StartProviderLogin.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/405`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ConnectPasswordManager.Output.MethodNotAllowed) + case methodNotAllowed(Operations.StartProviderLogin.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ConnectPasswordManager.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.StartProviderLogin.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -65574,9 +74212,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -65592,26 +74230,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectPasswordManager.Output.Conflict.Body + public var body: Operations.StartProviderLogin.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectPasswordManager.Output.Conflict.Body) { + public init(body: Operations.StartProviderLogin.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/409`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ConnectPasswordManager.Output.Conflict) + case conflict(Operations.StartProviderLogin.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ConnectPasswordManager.Output.Conflict { + public var conflict: Operations.StartProviderLogin.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -65625,9 +74263,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -65643,26 +74281,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectPasswordManager.Output.ContentTooLarge.Body + public var body: Operations.StartProviderLogin.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectPasswordManager.Output.ContentTooLarge.Body) { + public init(body: Operations.StartProviderLogin.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/413`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ConnectPasswordManager.Output.ContentTooLarge) + case contentTooLarge(Operations.StartProviderLogin.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ConnectPasswordManager.Output.ContentTooLarge { + public var contentTooLarge: Operations.StartProviderLogin.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -65676,9 +74314,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -65694,26 +74332,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectPasswordManager.Output.InternalServerError.Body + public var body: Operations.StartProviderLogin.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectPasswordManager.Output.InternalServerError.Body) { + public init(body: Operations.StartProviderLogin.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/500`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ConnectPasswordManager.Output.InternalServerError) + case internalServerError(Operations.StartProviderLogin.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ConnectPasswordManager.Output.InternalServerError { + public var internalServerError: Operations.StartProviderLogin.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -65727,9 +74365,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -65745,26 +74383,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ConnectPasswordManager.Output.ServiceUnavailable.Body + public var body: Operations.StartProviderLogin.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ConnectPasswordManager.Output.ServiceUnavailable.Body) { + public init(body: Operations.StartProviderLogin.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/put(connectPasswordManager)/responses/503`. + /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ConnectPasswordManager.Output.ServiceUnavailable) + case serviceUnavailable(Operations.StartProviderLogin.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ConnectPasswordManager.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.StartProviderLogin.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -65814,96 +74452,87 @@ public enum Operations { } } } - /// Disconnects the password manager and drops its token. 409 while any secret still reads from it; `usedBy` in the list names them. - /// - /// - Remark: HTTP `DELETE /v1/password-managers/{id}`. - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)`. - public enum DisconnectPasswordManager { - public static let id: Swift.String = "disconnectPasswordManager" + /// - Remark: HTTP `GET /v1/push`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)`. + public enum GetPushStatus { + public static let id: Swift.String = "getPushStatus" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/path/id`. - @frozen public enum IdPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/path/id`. - public var id: Operations.DisconnectPasswordManager.Input.Path.IdPayload - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Operations.DisconnectPasswordManager.Input.Path.IdPayload) { - self.id = id - } - } - public var path: Operations.DisconnectPasswordManager.Input.Path - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/header`. + /// - Remark: Generated from `#/paths/v1/push/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DisconnectPasswordManager.Input.Headers + public var headers: Operations.GetPushStatus.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - public init( - path: Operations.DisconnectPasswordManager.Input.Path, - headers: Operations.DisconnectPasswordManager.Input.Headers = .init() - ) { - self.path = path + public init(headers: Operations.GetPushStatus.Input.Headers = .init()) { self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/push/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/push/GET/responses/200/content/application\/json`. + case json(Components.Schemas.PushStatus) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.PushStatus { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.GetPushStatus.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.GetPushStatus.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DisconnectPasswordManager.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/204`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.GetPushStatus.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DisconnectPasswordManager.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetPushStatus.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -65919,26 +74548,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DisconnectPasswordManager.Output.BadRequest.Body + public var body: Operations.GetPushStatus.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DisconnectPasswordManager.Output.BadRequest.Body) { + public init(body: Operations.GetPushStatus.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/400`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DisconnectPasswordManager.Output.BadRequest) + case badRequest(Operations.GetPushStatus.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DisconnectPasswordManager.Output.BadRequest { + public var badRequest: Operations.GetPushStatus.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -65952,9 +74581,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -65970,26 +74599,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DisconnectPasswordManager.Output.Unauthorized.Body + public var body: Operations.GetPushStatus.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DisconnectPasswordManager.Output.Unauthorized.Body) { + public init(body: Operations.GetPushStatus.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/401`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DisconnectPasswordManager.Output.Unauthorized) + case unauthorized(Operations.GetPushStatus.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DisconnectPasswordManager.Output.Unauthorized { + public var unauthorized: Operations.GetPushStatus.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -66003,9 +74632,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66021,26 +74650,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DisconnectPasswordManager.Output.NotFound.Body + public var body: Operations.GetPushStatus.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DisconnectPasswordManager.Output.NotFound.Body) { + public init(body: Operations.GetPushStatus.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/404`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DisconnectPasswordManager.Output.NotFound) + case notFound(Operations.GetPushStatus.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DisconnectPasswordManager.Output.NotFound { + public var notFound: Operations.GetPushStatus.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -66054,9 +74683,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66072,26 +74701,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DisconnectPasswordManager.Output.MethodNotAllowed.Body + public var body: Operations.GetPushStatus.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DisconnectPasswordManager.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetPushStatus.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/405`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DisconnectPasswordManager.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetPushStatus.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DisconnectPasswordManager.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetPushStatus.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -66105,9 +74734,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66123,26 +74752,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DisconnectPasswordManager.Output.Conflict.Body + public var body: Operations.GetPushStatus.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DisconnectPasswordManager.Output.Conflict.Body) { + public init(body: Operations.GetPushStatus.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/409`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DisconnectPasswordManager.Output.Conflict) + case conflict(Operations.GetPushStatus.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DisconnectPasswordManager.Output.Conflict { + public var conflict: Operations.GetPushStatus.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -66156,9 +74785,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -66174,26 +74803,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DisconnectPasswordManager.Output.ContentTooLarge.Body + public var body: Operations.GetPushStatus.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DisconnectPasswordManager.Output.ContentTooLarge.Body) { + public init(body: Operations.GetPushStatus.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/413`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DisconnectPasswordManager.Output.ContentTooLarge) + case contentTooLarge(Operations.GetPushStatus.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DisconnectPasswordManager.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetPushStatus.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -66207,9 +74836,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66225,26 +74854,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DisconnectPasswordManager.Output.InternalServerError.Body + public var body: Operations.GetPushStatus.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DisconnectPasswordManager.Output.InternalServerError.Body) { + public init(body: Operations.GetPushStatus.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/500`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DisconnectPasswordManager.Output.InternalServerError) + case internalServerError(Operations.GetPushStatus.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DisconnectPasswordManager.Output.InternalServerError { + public var internalServerError: Operations.GetPushStatus.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -66258,9 +74887,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/password-managers/{id}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66276,26 +74905,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DisconnectPasswordManager.Output.ServiceUnavailable.Body + public var body: Operations.GetPushStatus.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DisconnectPasswordManager.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetPushStatus.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/password-managers/{id}/delete(disconnectPasswordManager)/responses/503`. + /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DisconnectPasswordManager.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetPushStatus.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DisconnectPasswordManager.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetPushStatus.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -66345,44 +74974,132 @@ public enum Operations { } } } - /// Each plugin that has settings, and whether each setting has a value. Values are never returned. - /// - /// - Remark: HTTP `GET /v1/plugin-settings`. - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)`. - public enum ListPluginSettings { - public static let id: Swift.String = "listPluginSettings" + /// - Remark: HTTP `PUT /v1/push/devices/{installationId}`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)`. + public enum PutPushDevice { + public static let id: Swift.String = "putPushDevice" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/header`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/path/installationId`. + public var installationId: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - installationId: + public init(installationId: Swift.String) { + self.installationId = installationId + } + } + public var path: Operations.PutPushDevice.Input.Path + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListPluginSettings.Input.Headers + public var headers: Operations.PutPushDevice.Input.Headers + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/bundleId`. + public var bundleId: Swift.String? + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/environment`. + @frozen public enum EnvironmentPayload: String, Codable, Hashable, Sendable, CaseIterable { + case development = "development" + case production = "production" + } + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/environment`. + public var environment: Operations.PutPushDevice.Input.Body.JsonPayload.EnvironmentPayload + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/platform`. + @frozen public enum PlatformPayload: String, Codable, Hashable, Sendable, CaseIterable { + case macos = "macos" + case ios = "ios" + case android = "android" + } + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/platform`. + public var platform: Operations.PutPushDevice.Input.Body.JsonPayload.PlatformPayload + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/token`. + public var token: Swift.String + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/transport`. + @frozen public enum TransportPayload: String, Codable, Hashable, Sendable, CaseIterable { + case apns = "apns" + case fcm = "fcm" + } + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/transport`. + public var transport: Operations.PutPushDevice.Input.Body.JsonPayload.TransportPayload + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - bundleId: + /// - enabled: + /// - environment: + /// - platform: + /// - token: + /// - transport: + public init( + bundleId: Swift.String? = nil, + enabled: Swift.Bool, + environment: Operations.PutPushDevice.Input.Body.JsonPayload.EnvironmentPayload, + platform: Operations.PutPushDevice.Input.Body.JsonPayload.PlatformPayload, + token: Swift.String, + transport: Operations.PutPushDevice.Input.Body.JsonPayload.TransportPayload + ) { + self.bundleId = bundleId + self.enabled = enabled + self.environment = environment + self.platform = platform + self.token = token + self.transport = transport + } + public enum CodingKeys: String, CodingKey { + case bundleId + case enabled + case environment + case platform + case token + case transport + } + } + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/content/application\/json`. + case json(Operations.PutPushDevice.Input.Body.JsonPayload) + } + public var body: Operations.PutPushDevice.Input.Body /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - public init(headers: Operations.ListPluginSettings.Input.Headers = .init()) { + /// - body: + public init( + path: Operations.PutPushDevice.Input.Path, + headers: Operations.PutPushDevice.Input.Headers = .init(), + body: Operations.PutPushDevice.Input.Body + ) { + self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/200/content/application\/json`. - case json(Components.Schemas.PluginSettings) + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.PushDeviceRegistration) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.PluginSettings { + public var json: Components.Schemas.PushDeviceRegistration { get throws { switch self { case let .json(body): @@ -66392,26 +75109,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPluginSettings.Output.Ok.Body + public var body: Operations.PutPushDevice.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPluginSettings.Output.Ok.Body) { + public init(body: Operations.PutPushDevice.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/200`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListPluginSettings.Output.Ok) + case ok(Operations.PutPushDevice.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListPluginSettings.Output.Ok { + public var ok: Operations.PutPushDevice.Output.Ok { get throws { switch self { case let .ok(response): @@ -66425,9 +75142,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66443,26 +75160,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPluginSettings.Output.BadRequest.Body + public var body: Operations.PutPushDevice.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPluginSettings.Output.BadRequest.Body) { + public init(body: Operations.PutPushDevice.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/400`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListPluginSettings.Output.BadRequest) + case badRequest(Operations.PutPushDevice.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListPluginSettings.Output.BadRequest { + public var badRequest: Operations.PutPushDevice.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -66476,9 +75193,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -66494,26 +75211,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPluginSettings.Output.Unauthorized.Body + public var body: Operations.PutPushDevice.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPluginSettings.Output.Unauthorized.Body) { + public init(body: Operations.PutPushDevice.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/401`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListPluginSettings.Output.Unauthorized) + case unauthorized(Operations.PutPushDevice.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListPluginSettings.Output.Unauthorized { + public var unauthorized: Operations.PutPushDevice.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -66527,9 +75244,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66545,26 +75262,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPluginSettings.Output.NotFound.Body + public var body: Operations.PutPushDevice.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPluginSettings.Output.NotFound.Body) { + public init(body: Operations.PutPushDevice.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/404`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListPluginSettings.Output.NotFound) + case notFound(Operations.PutPushDevice.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListPluginSettings.Output.NotFound { + public var notFound: Operations.PutPushDevice.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -66578,9 +75295,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66596,26 +75313,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPluginSettings.Output.MethodNotAllowed.Body + public var body: Operations.PutPushDevice.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPluginSettings.Output.MethodNotAllowed.Body) { + public init(body: Operations.PutPushDevice.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/405`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListPluginSettings.Output.MethodNotAllowed) + case methodNotAllowed(Operations.PutPushDevice.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListPluginSettings.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.PutPushDevice.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -66629,9 +75346,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66647,26 +75364,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPluginSettings.Output.Conflict.Body + public var body: Operations.PutPushDevice.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPluginSettings.Output.Conflict.Body) { + public init(body: Operations.PutPushDevice.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/409`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListPluginSettings.Output.Conflict) + case conflict(Operations.PutPushDevice.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListPluginSettings.Output.Conflict { + public var conflict: Operations.PutPushDevice.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -66680,9 +75397,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -66698,26 +75415,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPluginSettings.Output.ContentTooLarge.Body + public var body: Operations.PutPushDevice.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPluginSettings.Output.ContentTooLarge.Body) { + public init(body: Operations.PutPushDevice.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/413`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListPluginSettings.Output.ContentTooLarge) + case contentTooLarge(Operations.PutPushDevice.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListPluginSettings.Output.ContentTooLarge { + public var contentTooLarge: Operations.PutPushDevice.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -66731,9 +75448,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66749,26 +75466,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPluginSettings.Output.InternalServerError.Body + public var body: Operations.PutPushDevice.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPluginSettings.Output.InternalServerError.Body) { + public init(body: Operations.PutPushDevice.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/500`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListPluginSettings.Output.InternalServerError) + case internalServerError(Operations.PutPushDevice.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListPluginSettings.Output.InternalServerError { + public var internalServerError: Operations.PutPushDevice.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -66782,9 +75499,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -66800,26 +75517,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListPluginSettings.Output.ServiceUnavailable.Body + public var body: Operations.PutPushDevice.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListPluginSettings.Output.ServiceUnavailable.Body) { + public init(body: Operations.PutPushDevice.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/get(listPluginSettings)/responses/503`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListPluginSettings.Output.ServiceUnavailable) + case serviceUnavailable(Operations.PutPushDevice.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListPluginSettings.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.PutPushDevice.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -66869,189 +75586,89 @@ public enum Operations { } } } - /// Sets a plugin setting to a `value` stored in Crumble, or to a `reference` read from a connected password manager, replacing the one before; send exactly one. A reference is checked by reading it once; 400 when it can't be read. 404 for a plugin or key the server doesn't have. - /// - /// - Remark: HTTP `PUT /v1/plugin-settings/{pluginId}/{key}`. - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)`. - public enum SetPluginSetting { - public static let id: Swift.String = "setPluginSetting" + /// - Remark: HTTP `DELETE /v1/push/devices/{installationId}`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)`. + public enum DeletePushDevice { + public static let id: Swift.String = "deletePushDevice" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/path`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/path/pluginId`. - public var pluginId: Swift.String - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/path/key`. - public var key: Swift.String + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/path/installationId`. + public var installationId: Swift.String /// Creates a new `Path`. /// /// - Parameters: - /// - pluginId: - /// - key: - public init( - pluginId: Swift.String, - key: Swift.String - ) { - self.pluginId = pluginId - self.key = key + /// - installationId: + public init(installationId: Swift.String) { + self.installationId = installationId } } - public var path: Operations.SetPluginSetting.Input.Path - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/header`. + public var path: Operations.DeletePushDevice.Input.Path + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.SetPluginSetting.Input.Headers - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/reference/passwordManager`. - public var passwordManager: Operations.SetPluginSetting.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.SetPluginSetting.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/reference`. - public var reference: Operations.SetPluginSetting.Input.Body.JsonPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/json/value`. - public var value: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.SetPluginSetting.Input.Body.JsonPayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.SetPluginSetting.Input.Body.JsonPayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/requestBody/content/application\/json`. - case json(Operations.SetPluginSetting.Input.Body.JsonPayload) - } - public var body: Operations.SetPluginSetting.Input.Body + public var headers: Operations.DeletePushDevice.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.SetPluginSetting.Input.Path, - headers: Operations.SetPluginSetting.Input.Headers = .init(), - body: Operations.SetPluginSetting.Input.Body + path: Operations.DeletePushDevice.Input.Path, + headers: Operations.DeletePushDevice.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.PluginSetting) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.PluginSetting { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.SetPluginSetting.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.SetPluginSetting.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/200`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.SetPluginSetting.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeletePushDevice.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.SetPluginSetting.Output.Ok { + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeletePushDevice.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67067,26 +75684,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetPluginSetting.Output.BadRequest.Body + public var body: Operations.DeletePushDevice.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetPluginSetting.Output.BadRequest.Body) { + public init(body: Operations.DeletePushDevice.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/400`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.SetPluginSetting.Output.BadRequest) + case badRequest(Operations.DeletePushDevice.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.SetPluginSetting.Output.BadRequest { + public var badRequest: Operations.DeletePushDevice.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -67100,9 +75717,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -67118,26 +75735,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetPluginSetting.Output.Unauthorized.Body + public var body: Operations.DeletePushDevice.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetPluginSetting.Output.Unauthorized.Body) { + public init(body: Operations.DeletePushDevice.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/401`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.SetPluginSetting.Output.Unauthorized) + case unauthorized(Operations.DeletePushDevice.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.SetPluginSetting.Output.Unauthorized { + public var unauthorized: Operations.DeletePushDevice.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -67151,9 +75768,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67169,26 +75786,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetPluginSetting.Output.NotFound.Body + public var body: Operations.DeletePushDevice.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetPluginSetting.Output.NotFound.Body) { + public init(body: Operations.DeletePushDevice.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/404`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.SetPluginSetting.Output.NotFound) + case notFound(Operations.DeletePushDevice.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.SetPluginSetting.Output.NotFound { + public var notFound: Operations.DeletePushDevice.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -67202,9 +75819,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67220,26 +75837,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetPluginSetting.Output.MethodNotAllowed.Body + public var body: Operations.DeletePushDevice.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetPluginSetting.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeletePushDevice.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/405`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.SetPluginSetting.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeletePushDevice.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.SetPluginSetting.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeletePushDevice.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -67253,9 +75870,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67271,26 +75888,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetPluginSetting.Output.Conflict.Body + public var body: Operations.DeletePushDevice.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetPluginSetting.Output.Conflict.Body) { + public init(body: Operations.DeletePushDevice.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/409`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.SetPluginSetting.Output.Conflict) + case conflict(Operations.DeletePushDevice.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.SetPluginSetting.Output.Conflict { + public var conflict: Operations.DeletePushDevice.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -67304,9 +75921,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -67322,26 +75939,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetPluginSetting.Output.ContentTooLarge.Body + public var body: Operations.DeletePushDevice.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetPluginSetting.Output.ContentTooLarge.Body) { + public init(body: Operations.DeletePushDevice.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/413`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.SetPluginSetting.Output.ContentTooLarge) + case contentTooLarge(Operations.DeletePushDevice.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.SetPluginSetting.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeletePushDevice.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -67355,9 +75972,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67373,26 +75990,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetPluginSetting.Output.InternalServerError.Body + public var body: Operations.DeletePushDevice.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetPluginSetting.Output.InternalServerError.Body) { + public init(body: Operations.DeletePushDevice.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/500`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.SetPluginSetting.Output.InternalServerError) + case internalServerError(Operations.DeletePushDevice.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.SetPluginSetting.Output.InternalServerError { + public var internalServerError: Operations.DeletePushDevice.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -67406,9 +76023,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67424,26 +76041,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.SetPluginSetting.Output.ServiceUnavailable.Body + public var body: Operations.DeletePushDevice.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.SetPluginSetting.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeletePushDevice.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/put(setPluginSetting)/responses/503`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.SetPluginSetting.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeletePushDevice.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.SetPluginSetting.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeletePushDevice.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -67493,114 +76110,121 @@ public enum Operations { } } } - /// Removes a plugin setting's value. 404 for a plugin or key the server doesn't have. - /// - /// - Remark: HTTP `DELETE /v1/plugin-settings/{pluginId}/{key}`. - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)`. - public enum DeletePluginSetting { - public static let id: Swift.String = "deletePluginSetting" + /// - Remark: HTTP `PUT /v1/push/devices/{installationId}/presence`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)`. + public enum PutPushPresence { + public static let id: Swift.String = "putPushPresence" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/path`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/path/pluginId`. - public var pluginId: Swift.String - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/path/key`. - public var key: Swift.String + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/path/installationId`. + public var installationId: Swift.String /// Creates a new `Path`. /// /// - Parameters: - /// - pluginId: - /// - key: - public init( - pluginId: Swift.String, - key: Swift.String - ) { - self.pluginId = pluginId - self.key = key + /// - installationId: + public init(installationId: Swift.String) { + self.installationId = installationId } } - public var path: Operations.DeletePluginSetting.Input.Path - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/header`. + public var path: Operations.PutPushPresence.Input.Path + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeletePluginSetting.Input.Headers - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - public init( - path: Operations.DeletePluginSetting.Input.Path, - headers: Operations.DeletePluginSetting.Input.Headers = .init() - ) { - self.path = path - self.headers = headers - } - } - @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/200/content/application\/json`. - case json(Components.Schemas.PluginSetting) - /// The associated value of the enum case if `self` is `.json`. + public var headers: Operations.PutPushPresence.Input.Headers + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/requestBody/json/active`. + public var active: Swift.Bool + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/requestBody/json/agentId`. + public var agentId: Swift.String? + /// Creates a new `JsonPayload`. /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.PluginSetting { - get throws { - switch self { - case let .json(body): - return body - } - } + /// - Parameters: + /// - active: + /// - agentId: + public init( + active: Swift.Bool, + agentId: Swift.String? = nil + ) { + self.active = active + self.agentId = agentId + } + public enum CodingKeys: String, CodingKey { + case active + case agentId } } - /// Received HTTP response body - public var body: Operations.DeletePluginSetting.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.DeletePluginSetting.Output.Ok.Body) { - self.body = body - } + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/requestBody/content/application\/json`. + case json(Operations.PutPushPresence.Input.Body.JsonPayload) + } + public var body: Operations.PutPushPresence.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.PutPushPresence.Input.Path, + headers: Operations.PutPushPresence.Input.Headers = .init(), + body: Operations.PutPushPresence.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body } - /// Success + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/200`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.DeletePluginSetting.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.PutPushPresence.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.DeletePluginSetting.Output.Ok { + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.PutPushPresence.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67616,26 +76240,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePluginSetting.Output.BadRequest.Body + public var body: Operations.PutPushPresence.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePluginSetting.Output.BadRequest.Body) { + public init(body: Operations.PutPushPresence.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/400`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeletePluginSetting.Output.BadRequest) + case badRequest(Operations.PutPushPresence.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeletePluginSetting.Output.BadRequest { + public var badRequest: Operations.PutPushPresence.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -67649,9 +76273,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -67667,26 +76291,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePluginSetting.Output.Unauthorized.Body + public var body: Operations.PutPushPresence.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePluginSetting.Output.Unauthorized.Body) { + public init(body: Operations.PutPushPresence.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/401`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeletePluginSetting.Output.Unauthorized) + case unauthorized(Operations.PutPushPresence.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeletePluginSetting.Output.Unauthorized { + public var unauthorized: Operations.PutPushPresence.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -67700,9 +76324,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67718,26 +76342,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePluginSetting.Output.NotFound.Body + public var body: Operations.PutPushPresence.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePluginSetting.Output.NotFound.Body) { + public init(body: Operations.PutPushPresence.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/404`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeletePluginSetting.Output.NotFound) + case notFound(Operations.PutPushPresence.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeletePluginSetting.Output.NotFound { + public var notFound: Operations.PutPushPresence.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -67751,9 +76375,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67769,26 +76393,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePluginSetting.Output.MethodNotAllowed.Body + public var body: Operations.PutPushPresence.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePluginSetting.Output.MethodNotAllowed.Body) { + public init(body: Operations.PutPushPresence.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/405`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeletePluginSetting.Output.MethodNotAllowed) + case methodNotAllowed(Operations.PutPushPresence.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeletePluginSetting.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.PutPushPresence.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -67802,9 +76426,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67820,26 +76444,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePluginSetting.Output.Conflict.Body + public var body: Operations.PutPushPresence.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePluginSetting.Output.Conflict.Body) { + public init(body: Operations.PutPushPresence.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/409`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeletePluginSetting.Output.Conflict) + case conflict(Operations.PutPushPresence.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeletePluginSetting.Output.Conflict { + public var conflict: Operations.PutPushPresence.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -67853,9 +76477,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -67871,26 +76495,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePluginSetting.Output.ContentTooLarge.Body + public var body: Operations.PutPushPresence.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePluginSetting.Output.ContentTooLarge.Body) { + public init(body: Operations.PutPushPresence.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/413`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeletePluginSetting.Output.ContentTooLarge) + case contentTooLarge(Operations.PutPushPresence.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeletePluginSetting.Output.ContentTooLarge { + public var contentTooLarge: Operations.PutPushPresence.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -67904,9 +76528,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67922,26 +76546,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePluginSetting.Output.InternalServerError.Body + public var body: Operations.PutPushPresence.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePluginSetting.Output.InternalServerError.Body) { + public init(body: Operations.PutPushPresence.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/500`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeletePluginSetting.Output.InternalServerError) + case internalServerError(Operations.PutPushPresence.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeletePluginSetting.Output.InternalServerError { + public var internalServerError: Operations.PutPushPresence.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -67955,9 +76579,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/plugin-settings/{pluginId}/{key}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -67973,26 +76597,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePluginSetting.Output.ServiceUnavailable.Body + public var body: Operations.PutPushPresence.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePluginSetting.Output.ServiceUnavailable.Body) { + public init(body: Operations.PutPushPresence.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/plugin-settings/{pluginId}/{key}/delete(deletePluginSetting)/responses/503`. + /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeletePluginSetting.Output.ServiceUnavailable) + case serviceUnavailable(Operations.PutPushPresence.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeletePluginSetting.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.PutPushPresence.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -68042,60 +76666,60 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/provider-logins/{id}`. - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)`. - public enum GetProviderLogin { - public static let id: Swift.String = "getProviderLogin" + /// - Remark: HTTP `GET /v1/schedules`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)`. + public enum ListSchedules { + public static let id: Swift.String = "listSchedules" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/path/id`. - public var id: Swift.String - /// Creates a new `Path`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/GET/query/agentId`. + public var agentId: Swift.String? + /// Creates a new `Query`. /// /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id + /// - agentId: + public init(agentId: Swift.String? = nil) { + self.agentId = agentId } } - public var path: Operations.GetProviderLogin.Input.Path - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/header`. + public var query: Operations.ListSchedules.Input.Query + /// - Remark: Generated from `#/paths/v1/schedules/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetProviderLogin.Input.Headers + public var headers: Operations.ListSchedules.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: + /// - query: /// - headers: public init( - path: Operations.GetProviderLogin.Input.Path, - headers: Operations.GetProviderLogin.Input.Headers = .init() + query: Operations.ListSchedules.Input.Query = .init(), + headers: Operations.ListSchedules.Input.Headers = .init() ) { - self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.ProviderLoginSession) + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/200/content/application\/json`. + case json([Components.Schemas.Schedule]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.ProviderLoginSession { + public var json: [Components.Schemas.Schedule] { get throws { switch self { case let .json(body): @@ -68105,26 +76729,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetProviderLogin.Output.Ok.Body + public var body: Operations.ListSchedules.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetProviderLogin.Output.Ok.Body) { + public init(body: Operations.ListSchedules.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/200`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.GetProviderLogin.Output.Ok) + case ok(Operations.ListSchedules.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.GetProviderLogin.Output.Ok { + public var ok: Operations.ListSchedules.Output.Ok { get throws { switch self { case let .ok(response): @@ -68138,9 +76762,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -68156,26 +76780,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetProviderLogin.Output.BadRequest.Body + public var body: Operations.ListSchedules.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetProviderLogin.Output.BadRequest.Body) { + public init(body: Operations.ListSchedules.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/400`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetProviderLogin.Output.BadRequest) + case badRequest(Operations.ListSchedules.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetProviderLogin.Output.BadRequest { + public var badRequest: Operations.ListSchedules.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -68189,9 +76813,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -68207,26 +76831,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetProviderLogin.Output.Unauthorized.Body + public var body: Operations.ListSchedules.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetProviderLogin.Output.Unauthorized.Body) { + public init(body: Operations.ListSchedules.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/401`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetProviderLogin.Output.Unauthorized) + case unauthorized(Operations.ListSchedules.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetProviderLogin.Output.Unauthorized { + public var unauthorized: Operations.ListSchedules.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -68240,9 +76864,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -68258,26 +76882,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetProviderLogin.Output.NotFound.Body + public var body: Operations.ListSchedules.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetProviderLogin.Output.NotFound.Body) { + public init(body: Operations.ListSchedules.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/404`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetProviderLogin.Output.NotFound) + case notFound(Operations.ListSchedules.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetProviderLogin.Output.NotFound { + public var notFound: Operations.ListSchedules.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -68291,9 +76915,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -68309,26 +76933,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetProviderLogin.Output.MethodNotAllowed.Body + public var body: Operations.ListSchedules.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetProviderLogin.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListSchedules.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/405`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetProviderLogin.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListSchedules.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetProviderLogin.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListSchedules.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -68342,9 +76966,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -68360,26 +76984,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetProviderLogin.Output.Conflict.Body + public var body: Operations.ListSchedules.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetProviderLogin.Output.Conflict.Body) { + public init(body: Operations.ListSchedules.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/409`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetProviderLogin.Output.Conflict) + case conflict(Operations.ListSchedules.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetProviderLogin.Output.Conflict { + public var conflict: Operations.ListSchedules.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -68392,61 +77016,10 @@ public enum Operations { } } } - public struct Gone: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/410/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/410/content/application\/json`. - case json(Components.Schemas._Error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas._Error { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.GetProviderLogin.Output.Gone.Body - /// Creates a new `Gone`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.GetProviderLogin.Output.Gone.Body) { - self.body = body - } - } - /// Login session ended or was lost on restart - /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/410`. - /// - /// HTTP response code: `410 gone`. - case gone(Operations.GetProviderLogin.Output.Gone) - /// The associated value of the enum case if `self` is `.gone`. - /// - /// - Throws: An error if `self` is not `.gone`. - /// - SeeAlso: `.gone`. - public var gone: Operations.GetProviderLogin.Output.Gone { - get throws { - switch self { - case let .gone(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "gone", - response: self - ) - } - } - } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -68462,26 +77035,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetProviderLogin.Output.ContentTooLarge.Body + public var body: Operations.ListSchedules.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetProviderLogin.Output.ContentTooLarge.Body) { + public init(body: Operations.ListSchedules.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/413`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetProviderLogin.Output.ContentTooLarge) + case contentTooLarge(Operations.ListSchedules.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetProviderLogin.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListSchedules.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -68495,9 +77068,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -68513,26 +77086,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetProviderLogin.Output.InternalServerError.Body + public var body: Operations.ListSchedules.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetProviderLogin.Output.InternalServerError.Body) { + public init(body: Operations.ListSchedules.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/500`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetProviderLogin.Output.InternalServerError) + case internalServerError(Operations.ListSchedules.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetProviderLogin.Output.InternalServerError { + public var internalServerError: Operations.ListSchedules.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -68546,9 +77119,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -68564,26 +77137,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetProviderLogin.Output.ServiceUnavailable.Body + public var body: Operations.ListSchedules.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetProviderLogin.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListSchedules.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/get(getProviderLogin)/responses/503`. + /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetProviderLogin.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListSchedules.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetProviderLogin.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListSchedules.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -68596,97 +77169,178 @@ public enum Operations { } } } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case plainText - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - case "text/plain": - self = .plainText - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - case .plainText: - return "text/plain" - } - } - public static var allCases: [Self] { - [ - .json, - .plainText - ] - } - } - } - /// - Remark: HTTP `DELETE /v1/provider-logins/{id}`. - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)`. - public enum CancelProviderLogin { - public static let id: Swift.String = "cancelProviderLogin" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.CancelProviderLogin.Input.Path - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/header`. - public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - public var headers: Operations.CancelProviderLogin.Input.Headers + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// - Remark: HTTP `POST /v1/schedules`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)`. + public enum CreateSchedule { + public static let id: Swift.String = "createSchedule" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.CreateSchedule.Input.Headers + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/agentId`. + public var agentId: Swift.String + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/command`. + public var command: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/cron`. + public var cron: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/enabled`. + public var enabled: Swift.Bool? + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/eventSourceId`. + public var eventSourceId: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/kind`. + @frozen public enum KindPayload: String, Codable, Hashable, Sendable, CaseIterable { + case prompt = "prompt" + case script = "script" + } + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/kind`. + public var kind: Operations.CreateSchedule.Input.Body.JsonPayload.KindPayload? + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/name`. + public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/notify`. + public var notify: Swift.Bool? + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/prompt`. + public var prompt: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/runAt`. + public var runAt: Foundation.Date? + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/timeoutSeconds`. + public var timeoutSeconds: Swift.Int? + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/timezone`. + public var timezone: Swift.String? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - agentId: + /// - command: + /// - cron: + /// - enabled: + /// - eventSourceId: + /// - kind: + /// - name: + /// - notify: + /// - prompt: + /// - runAt: + /// - timeoutSeconds: + /// - timezone: + public init( + agentId: Swift.String, + command: Swift.String? = nil, + cron: Swift.String? = nil, + enabled: Swift.Bool? = nil, + eventSourceId: Swift.String? = nil, + kind: Operations.CreateSchedule.Input.Body.JsonPayload.KindPayload? = nil, + name: Swift.String, + notify: Swift.Bool? = nil, + prompt: Swift.String? = nil, + runAt: Foundation.Date? = nil, + timeoutSeconds: Swift.Int? = nil, + timezone: Swift.String? = nil + ) { + self.agentId = agentId + self.command = command + self.cron = cron + self.enabled = enabled + self.eventSourceId = eventSourceId + self.kind = kind + self.name = name + self.notify = notify + self.prompt = prompt + self.runAt = runAt + self.timeoutSeconds = timeoutSeconds + self.timezone = timezone + } + public enum CodingKeys: String, CodingKey { + case agentId + case command + case cron + case enabled + case eventSourceId + case kind + case name + case notify + case prompt + case runAt + case timeoutSeconds + case timezone + } + } + /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/content/application\/json`. + case json(Operations.CreateSchedule.Input.Body.JsonPayload) + } + public var body: Operations.CreateSchedule.Input.Body /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: + /// - body: public init( - path: Operations.CancelProviderLogin.Input.Path, - headers: Operations.CancelProviderLogin.Input.Headers = .init() + headers: Operations.CreateSchedule.Input.Headers = .init(), + body: Operations.CreateSchedule.Input.Body ) { - self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/200/content`. + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/200/content/application\/json`. - case json(Components.Schemas.ProviderLoginSession) + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/201/content/application\/json`. + case json(Components.Schemas.Schedule) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.ProviderLoginSession { + public var json: Components.Schemas.Schedule { get throws { switch self { case let .json(body): @@ -68696,42 +77350,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CancelProviderLogin.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.CreateSchedule.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CancelProviderLogin.Output.Ok.Body) { + public init(body: Operations.CreateSchedule.Output.Created.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/200`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/201`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.CancelProviderLogin.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `201 created`. + case created(Operations.CreateSchedule.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.CancelProviderLogin.Output.Ok { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.CreateSchedule.Output.Created { get throws { switch self { - case let .ok(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "created", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -68747,26 +77401,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CancelProviderLogin.Output.BadRequest.Body + public var body: Operations.CreateSchedule.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CancelProviderLogin.Output.BadRequest.Body) { + public init(body: Operations.CreateSchedule.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/400`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CancelProviderLogin.Output.BadRequest) + case badRequest(Operations.CreateSchedule.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CancelProviderLogin.Output.BadRequest { + public var badRequest: Operations.CreateSchedule.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -68780,9 +77434,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -68798,26 +77452,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CancelProviderLogin.Output.Unauthorized.Body + public var body: Operations.CreateSchedule.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CancelProviderLogin.Output.Unauthorized.Body) { + public init(body: Operations.CreateSchedule.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/401`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CancelProviderLogin.Output.Unauthorized) + case unauthorized(Operations.CreateSchedule.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CancelProviderLogin.Output.Unauthorized { + public var unauthorized: Operations.CreateSchedule.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -68830,10 +77484,10 @@ public enum Operations { } } } - public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/404/content`. + public struct Forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/403/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/403/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -68849,42 +77503,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CancelProviderLogin.Output.NotFound.Body - /// Creates a new `NotFound`. + public var body: Operations.CreateSchedule.Output.Forbidden.Body + /// Creates a new `Forbidden`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CancelProviderLogin.Output.NotFound.Body) { + public init(body: Operations.CreateSchedule.Output.Forbidden.Body) { self.body = body } } - /// Resource not found + /// Script tasks need coding jobs and must stay with their creator /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/404`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/403`. /// - /// HTTP response code: `404 notFound`. - case notFound(Operations.CancelProviderLogin.Output.NotFound) - /// The associated value of the enum case if `self` is `.notFound`. + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.CreateSchedule.Output.Forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Operations.CancelProviderLogin.Output.NotFound { + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Operations.CreateSchedule.Output.Forbidden { get throws { switch self { - case let .notFound(response): + case let .forbidden(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "forbidden", response: self ) } } } - public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/405/content`. + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -68900,42 +77554,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CancelProviderLogin.Output.MethodNotAllowed.Body - /// Creates a new `MethodNotAllowed`. + public var body: Operations.CreateSchedule.Output.NotFound.Body + /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CancelProviderLogin.Output.MethodNotAllowed.Body) { + public init(body: Operations.CreateSchedule.Output.NotFound.Body) { self.body = body } } - /// Resource is read-only + /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/405`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/404`. /// - /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CancelProviderLogin.Output.MethodNotAllowed) - /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// HTTP response code: `404 notFound`. + case notFound(Operations.CreateSchedule.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. /// - /// - Throws: An error if `self` is not `.methodNotAllowed`. - /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CancelProviderLogin.Output.MethodNotAllowed { + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.CreateSchedule.Output.NotFound { get throws { switch self { - case let .methodNotAllowed(response): + case let .notFound(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "methodNotAllowed", + expectedStatus: "notFound", response: self ) } } } - public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/409/content`. + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -68951,42 +77605,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CancelProviderLogin.Output.Conflict.Body - /// Creates a new `Conflict`. + public var body: Operations.CreateSchedule.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CancelProviderLogin.Output.Conflict.Body) { + public init(body: Operations.CreateSchedule.Output.MethodNotAllowed.Body) { self.body = body } } - /// Conflicting request + /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/409`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/405`. /// - /// HTTP response code: `409 conflict`. - case conflict(Operations.CancelProviderLogin.Output.Conflict) - /// The associated value of the enum case if `self` is `.conflict`. + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.CreateSchedule.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// - /// - Throws: An error if `self` is not `.conflict`. - /// - SeeAlso: `.conflict`. - public var conflict: Operations.CancelProviderLogin.Output.Conflict { + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.CreateSchedule.Output.MethodNotAllowed { get throws { switch self { - case let .conflict(response): + case let .methodNotAllowed(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "conflict", + expectedStatus: "methodNotAllowed", response: self ) } } } - public struct Gone: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/410/content`. + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/410/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69002,42 +77656,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CancelProviderLogin.Output.Gone.Body - /// Creates a new `Gone`. + public var body: Operations.CreateSchedule.Output.Conflict.Body + /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CancelProviderLogin.Output.Gone.Body) { + public init(body: Operations.CreateSchedule.Output.Conflict.Body) { self.body = body } } - /// Login session ended or was lost on restart + /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/410`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/409`. /// - /// HTTP response code: `410 gone`. - case gone(Operations.CancelProviderLogin.Output.Gone) - /// The associated value of the enum case if `self` is `.gone`. + /// HTTP response code: `409 conflict`. + case conflict(Operations.CreateSchedule.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. /// - /// - Throws: An error if `self` is not `.gone`. - /// - SeeAlso: `.gone`. - public var gone: Operations.CancelProviderLogin.Output.Gone { + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.CreateSchedule.Output.Conflict { get throws { switch self { - case let .gone(response): + case let .conflict(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "gone", + expectedStatus: "conflict", response: self ) } } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -69053,26 +77707,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CancelProviderLogin.Output.ContentTooLarge.Body + public var body: Operations.CreateSchedule.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CancelProviderLogin.Output.ContentTooLarge.Body) { + public init(body: Operations.CreateSchedule.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/413`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CancelProviderLogin.Output.ContentTooLarge) + case contentTooLarge(Operations.CreateSchedule.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CancelProviderLogin.Output.ContentTooLarge { + public var contentTooLarge: Operations.CreateSchedule.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -69086,9 +77740,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69104,26 +77758,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CancelProviderLogin.Output.InternalServerError.Body + public var body: Operations.CreateSchedule.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CancelProviderLogin.Output.InternalServerError.Body) { + public init(body: Operations.CreateSchedule.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/500`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CancelProviderLogin.Output.InternalServerError) + case internalServerError(Operations.CreateSchedule.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CancelProviderLogin.Output.InternalServerError { + public var internalServerError: Operations.CreateSchedule.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -69137,9 +77791,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69155,26 +77809,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CancelProviderLogin.Output.ServiceUnavailable.Body + public var body: Operations.CreateSchedule.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CancelProviderLogin.Output.ServiceUnavailable.Body) { + public init(body: Operations.CreateSchedule.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/delete(cancelProviderLogin)/responses/503`. + /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CancelProviderLogin.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CreateSchedule.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CancelProviderLogin.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CreateSchedule.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -69224,14 +77878,14 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/provider-logins/{id}/responses`. - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)`. - public enum AnswerProviderLogin { - public static let id: Swift.String = "answerProviderLogin" + /// - Remark: HTTP `PATCH /v1/schedules/{id}`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)`. + public enum UpdateSchedule { + public static let id: Swift.String = "updateSchedule" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/path`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -69241,75 +77895,254 @@ public enum Operations { self.id = id } } - public var path: Operations.AnswerProviderLogin.Input.Path - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/header`. + public var path: Operations.UpdateSchedule.Input.Path + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.AnswerProviderLogin.Input.Headers - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/requestBody`. + public var headers: Operations.UpdateSchedule.Input.Headers + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/requestBody/json/promptId`. - public var promptId: Swift.String - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/requestBody/json/value`. - public var value: Swift.String + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/agentId`. + public var agentId: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/command`. + public var command: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/cron`. + public var cron: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/enabled`. + public var enabled: Swift.Bool? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/eventSourceId`. + public var eventSourceId: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/kind`. + @frozen public enum KindPayload: String, Codable, Hashable, Sendable, CaseIterable { + case prompt = "prompt" + case script = "script" + } + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/kind`. + public var kind: Operations.UpdateSchedule.Input.Body.JsonPayload.KindPayload? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/notify`. + public var notify: Swift.Bool? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/prompt`. + public var prompt: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/runAt`. + public var runAt: Foundation.Date? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/timeoutSeconds`. + public var timeoutSeconds: Swift.Int? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/timezone`. + public var timezone: Swift.String? /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - promptId: - /// - value: + /// - agentId: + /// - command: + /// - cron: + /// - enabled: + /// - eventSourceId: + /// - kind: + /// - name: + /// - notify: + /// - prompt: + /// - runAt: + /// - timeoutSeconds: + /// - timezone: public init( - promptId: Swift.String, - value: Swift.String + agentId: Swift.String? = nil, + command: Swift.String? = nil, + cron: Swift.String? = nil, + enabled: Swift.Bool? = nil, + eventSourceId: Swift.String? = nil, + kind: Operations.UpdateSchedule.Input.Body.JsonPayload.KindPayload? = nil, + name: Swift.String? = nil, + notify: Swift.Bool? = nil, + prompt: Swift.String? = nil, + runAt: Foundation.Date? = nil, + timeoutSeconds: Swift.Int? = nil, + timezone: Swift.String? = nil ) { - self.promptId = promptId - self.value = value + self.agentId = agentId + self.command = command + self.cron = cron + self.enabled = enabled + self.eventSourceId = eventSourceId + self.kind = kind + self.name = name + self.notify = notify + self.prompt = prompt + self.runAt = runAt + self.timeoutSeconds = timeoutSeconds + self.timezone = timezone } public enum CodingKeys: String, CodingKey { - case promptId - case value + case agentId + case command + case cron + case enabled + case eventSourceId + case kind + case name + case notify + case prompt + case runAt + case timeoutSeconds + case timezone + } + } + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/content/application\/json`. + case json(Operations.UpdateSchedule.Input.Body.JsonPayload) + } + public var body: Operations.UpdateSchedule.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.UpdateSchedule.Input.Path, + headers: Operations.UpdateSchedule.Input.Headers = .init(), + body: Operations.UpdateSchedule.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/agentId`. + public var agentId: Swift.String + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/command`. + public var command: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/createdAt`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/createdByAgentId`. + public var createdByAgentId: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/cron`. + public var cron: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/enabled`. + public var enabled: Swift.Bool + /// The event source whose events start this automation; set instead of `cron` and `runAt`. + /// + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/eventSourceId`. + public var eventSourceId: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/id`. + public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/kind`. + @frozen public enum KindPayload: String, Codable, Hashable, Sendable, CaseIterable { + case prompt = "prompt" + case script = "script" + } + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/kind`. + public var kind: Operations.UpdateSchedule.Output.Ok.Body.JsonPayload.KindPayload + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/name`. + public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/nextRunAt`. + public var nextRunAt: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/notify`. + public var notify: Swift.Bool + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/prompt`. + public var prompt: Swift.String + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/runAt`. + public var runAt: Swift.String? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/timeoutSeconds`. + public var timeoutSeconds: Swift.Int + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/timezone`. + public var timezone: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - agentId: + /// - command: + /// - createdAt: + /// - createdByAgentId: + /// - cron: + /// - enabled: + /// - eventSourceId: The event source whose events start this automation; set instead of `cron` and `runAt`. + /// - id: + /// - kind: + /// - name: + /// - nextRunAt: + /// - notify: + /// - prompt: + /// - runAt: + /// - timeoutSeconds: + /// - timezone: + public init( + agentId: Swift.String, + command: Swift.String? = nil, + createdAt: Swift.String, + createdByAgentId: Swift.String? = nil, + cron: Swift.String? = nil, + enabled: Swift.Bool, + eventSourceId: Swift.String? = nil, + id: Swift.String, + kind: Operations.UpdateSchedule.Output.Ok.Body.JsonPayload.KindPayload, + name: Swift.String, + nextRunAt: Swift.String? = nil, + notify: Swift.Bool, + prompt: Swift.String, + runAt: Swift.String? = nil, + timeoutSeconds: Swift.Int, + timezone: Swift.String + ) { + self.agentId = agentId + self.command = command + self.createdAt = createdAt + self.createdByAgentId = createdByAgentId + self.cron = cron + self.enabled = enabled + self.eventSourceId = eventSourceId + self.id = id + self.kind = kind + self.name = name + self.nextRunAt = nextRunAt + self.notify = notify + self.prompt = prompt + self.runAt = runAt + self.timeoutSeconds = timeoutSeconds + self.timezone = timezone + } + public enum CodingKeys: String, CodingKey { + case agentId + case command + case createdAt + case createdByAgentId + case cron + case enabled + case eventSourceId + case id + case kind + case name + case nextRunAt + case notify + case prompt + case runAt + case timeoutSeconds + case timezone + } } - } - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/requestBody/content/application\/json`. - case json(Operations.AnswerProviderLogin.Input.Body.JsonPayload) - } - public var body: Operations.AnswerProviderLogin.Input.Body - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - /// - body: - public init( - path: Operations.AnswerProviderLogin.Input.Path, - headers: Operations.AnswerProviderLogin.Input.Headers = .init(), - body: Operations.AnswerProviderLogin.Input.Body - ) { - self.path = path - self.headers = headers - self.body = body - } - } - @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/200/content/application\/json`. - case json(Components.Schemas.ProviderLoginSession) + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/application\/json`. + case json(Operations.UpdateSchedule.Output.Ok.Body.JsonPayload?) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.ProviderLoginSession { + public var json: Operations.UpdateSchedule.Output.Ok.Body.JsonPayload? { get throws { switch self { case let .json(body): @@ -69319,26 +78152,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerProviderLogin.Output.Ok.Body + public var body: Operations.UpdateSchedule.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerProviderLogin.Output.Ok.Body) { + public init(body: Operations.UpdateSchedule.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/200`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.AnswerProviderLogin.Output.Ok) + case ok(Operations.UpdateSchedule.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.AnswerProviderLogin.Output.Ok { + public var ok: Operations.UpdateSchedule.Output.Ok { get throws { switch self { case let .ok(response): @@ -69352,9 +78185,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69370,26 +78203,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerProviderLogin.Output.BadRequest.Body + public var body: Operations.UpdateSchedule.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerProviderLogin.Output.BadRequest.Body) { + public init(body: Operations.UpdateSchedule.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/400`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.AnswerProviderLogin.Output.BadRequest) + case badRequest(Operations.UpdateSchedule.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.AnswerProviderLogin.Output.BadRequest { + public var badRequest: Operations.UpdateSchedule.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -69403,9 +78236,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -69421,26 +78254,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerProviderLogin.Output.Unauthorized.Body + public var body: Operations.UpdateSchedule.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerProviderLogin.Output.Unauthorized.Body) { + public init(body: Operations.UpdateSchedule.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/401`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.AnswerProviderLogin.Output.Unauthorized) + case unauthorized(Operations.UpdateSchedule.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.AnswerProviderLogin.Output.Unauthorized { + public var unauthorized: Operations.UpdateSchedule.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -69453,10 +78286,10 @@ public enum Operations { } } } - public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/404/content`. + public struct Forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/403/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/403/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69472,42 +78305,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerProviderLogin.Output.NotFound.Body - /// Creates a new `NotFound`. + public var body: Operations.UpdateSchedule.Output.Forbidden.Body + /// Creates a new `Forbidden`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerProviderLogin.Output.NotFound.Body) { + public init(body: Operations.UpdateSchedule.Output.Forbidden.Body) { self.body = body } } - /// Resource not found + /// Script tasks need coding jobs and must stay with their creator /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/404`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/403`. /// - /// HTTP response code: `404 notFound`. - case notFound(Operations.AnswerProviderLogin.Output.NotFound) - /// The associated value of the enum case if `self` is `.notFound`. + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.UpdateSchedule.Output.Forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Operations.AnswerProviderLogin.Output.NotFound { + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Operations.UpdateSchedule.Output.Forbidden { get throws { switch self { - case let .notFound(response): + case let .forbidden(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "forbidden", response: self ) } } } - public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/405/content`. + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69523,42 +78356,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerProviderLogin.Output.MethodNotAllowed.Body - /// Creates a new `MethodNotAllowed`. + public var body: Operations.UpdateSchedule.Output.NotFound.Body + /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerProviderLogin.Output.MethodNotAllowed.Body) { + public init(body: Operations.UpdateSchedule.Output.NotFound.Body) { self.body = body } } - /// Resource is read-only + /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/405`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/404`. /// - /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.AnswerProviderLogin.Output.MethodNotAllowed) - /// The associated value of the enum case if `self` is `.methodNotAllowed`. + /// HTTP response code: `404 notFound`. + case notFound(Operations.UpdateSchedule.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. /// - /// - Throws: An error if `self` is not `.methodNotAllowed`. - /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.AnswerProviderLogin.Output.MethodNotAllowed { + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.UpdateSchedule.Output.NotFound { get throws { switch self { - case let .methodNotAllowed(response): + case let .notFound(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "methodNotAllowed", + expectedStatus: "notFound", response: self ) } } } - public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/409/content`. + public struct MethodNotAllowed: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69574,42 +78407,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerProviderLogin.Output.Conflict.Body - /// Creates a new `Conflict`. + public var body: Operations.UpdateSchedule.Output.MethodNotAllowed.Body + /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerProviderLogin.Output.Conflict.Body) { + public init(body: Operations.UpdateSchedule.Output.MethodNotAllowed.Body) { self.body = body } } - /// Conflicting request + /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/409`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/405`. /// - /// HTTP response code: `409 conflict`. - case conflict(Operations.AnswerProviderLogin.Output.Conflict) - /// The associated value of the enum case if `self` is `.conflict`. + /// HTTP response code: `405 methodNotAllowed`. + case methodNotAllowed(Operations.UpdateSchedule.Output.MethodNotAllowed) + /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// - /// - Throws: An error if `self` is not `.conflict`. - /// - SeeAlso: `.conflict`. - public var conflict: Operations.AnswerProviderLogin.Output.Conflict { + /// - Throws: An error if `self` is not `.methodNotAllowed`. + /// - SeeAlso: `.methodNotAllowed`. + public var methodNotAllowed: Operations.UpdateSchedule.Output.MethodNotAllowed { get throws { switch self { - case let .conflict(response): + case let .methodNotAllowed(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "conflict", + expectedStatus: "methodNotAllowed", response: self ) } } } - public struct Gone: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/410/content`. + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/410/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69625,42 +78458,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerProviderLogin.Output.Gone.Body - /// Creates a new `Gone`. + public var body: Operations.UpdateSchedule.Output.Conflict.Body + /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerProviderLogin.Output.Gone.Body) { + public init(body: Operations.UpdateSchedule.Output.Conflict.Body) { self.body = body } } - /// Login session ended or was lost on restart + /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/410`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/409`. /// - /// HTTP response code: `410 gone`. - case gone(Operations.AnswerProviderLogin.Output.Gone) - /// The associated value of the enum case if `self` is `.gone`. + /// HTTP response code: `409 conflict`. + case conflict(Operations.UpdateSchedule.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. /// - /// - Throws: An error if `self` is not `.gone`. - /// - SeeAlso: `.gone`. - public var gone: Operations.AnswerProviderLogin.Output.Gone { + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.UpdateSchedule.Output.Conflict { get throws { switch self { - case let .gone(response): + case let .conflict(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "gone", + expectedStatus: "conflict", response: self ) } } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -69676,26 +78509,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerProviderLogin.Output.ContentTooLarge.Body + public var body: Operations.UpdateSchedule.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerProviderLogin.Output.ContentTooLarge.Body) { + public init(body: Operations.UpdateSchedule.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/413`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.AnswerProviderLogin.Output.ContentTooLarge) + case contentTooLarge(Operations.UpdateSchedule.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.AnswerProviderLogin.Output.ContentTooLarge { + public var contentTooLarge: Operations.UpdateSchedule.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -69709,9 +78542,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69727,26 +78560,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerProviderLogin.Output.InternalServerError.Body + public var body: Operations.UpdateSchedule.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerProviderLogin.Output.InternalServerError.Body) { + public init(body: Operations.UpdateSchedule.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/500`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.AnswerProviderLogin.Output.InternalServerError) + case internalServerError(Operations.UpdateSchedule.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.AnswerProviderLogin.Output.InternalServerError { + public var internalServerError: Operations.UpdateSchedule.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -69760,9 +78593,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/provider-logins/{id}/responses/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69778,26 +78611,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AnswerProviderLogin.Output.ServiceUnavailable.Body + public var body: Operations.UpdateSchedule.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AnswerProviderLogin.Output.ServiceUnavailable.Body) { + public init(body: Operations.UpdateSchedule.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/provider-logins/{id}/responses/post(answerProviderLogin)/responses/503`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.AnswerProviderLogin.Output.ServiceUnavailable) + case serviceUnavailable(Operations.UpdateSchedule.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.AnswerProviderLogin.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.UpdateSchedule.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -69847,87 +78680,89 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/providers`. - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)`. - public enum ListProviders { - public static let id: Swift.String = "listProviders" + /// - Remark: HTTP `DELETE /v1/schedules/{id}`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)`. + public enum DeleteSchedule { + public static let id: Swift.String = "deleteSchedule" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/header`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.DeleteSchedule.Input.Path + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListProviders.Input.Headers + public var headers: Operations.DeleteSchedule.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - public init(headers: Operations.ListProviders.Input.Headers = .init()) { + public init( + path: Operations.DeleteSchedule.Input.Path, + headers: Operations.DeleteSchedule.Input.Headers = .init() + ) { + self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/200/content/application\/json`. - case json([Components.Schemas.Provider]) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: [Components.Schemas.Provider] { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ListProviders.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ListProviders.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/200`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.ListProviders.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteSchedule.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.ListProviders.Output.Ok { + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteSchedule.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -69943,26 +78778,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListProviders.Output.BadRequest.Body + public var body: Operations.DeleteSchedule.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListProviders.Output.BadRequest.Body) { + public init(body: Operations.DeleteSchedule.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/400`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListProviders.Output.BadRequest) + case badRequest(Operations.DeleteSchedule.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListProviders.Output.BadRequest { + public var badRequest: Operations.DeleteSchedule.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -69976,9 +78811,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -69994,26 +78829,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListProviders.Output.Unauthorized.Body + public var body: Operations.DeleteSchedule.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListProviders.Output.Unauthorized.Body) { + public init(body: Operations.DeleteSchedule.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/401`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListProviders.Output.Unauthorized) + case unauthorized(Operations.DeleteSchedule.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListProviders.Output.Unauthorized { + public var unauthorized: Operations.DeleteSchedule.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -70027,9 +78862,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70045,26 +78880,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListProviders.Output.NotFound.Body + public var body: Operations.DeleteSchedule.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListProviders.Output.NotFound.Body) { + public init(body: Operations.DeleteSchedule.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/404`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListProviders.Output.NotFound) + case notFound(Operations.DeleteSchedule.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListProviders.Output.NotFound { + public var notFound: Operations.DeleteSchedule.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -70078,9 +78913,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70096,26 +78931,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListProviders.Output.MethodNotAllowed.Body + public var body: Operations.DeleteSchedule.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListProviders.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteSchedule.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/405`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListProviders.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteSchedule.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListProviders.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteSchedule.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -70129,9 +78964,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70147,26 +78982,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListProviders.Output.Conflict.Body + public var body: Operations.DeleteSchedule.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListProviders.Output.Conflict.Body) { + public init(body: Operations.DeleteSchedule.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/409`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListProviders.Output.Conflict) + case conflict(Operations.DeleteSchedule.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListProviders.Output.Conflict { + public var conflict: Operations.DeleteSchedule.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -70180,9 +79015,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -70198,26 +79033,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListProviders.Output.ContentTooLarge.Body + public var body: Operations.DeleteSchedule.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListProviders.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteSchedule.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/413`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListProviders.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteSchedule.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListProviders.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteSchedule.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -70231,9 +79066,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70249,26 +79084,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListProviders.Output.InternalServerError.Body + public var body: Operations.DeleteSchedule.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListProviders.Output.InternalServerError.Body) { + public init(body: Operations.DeleteSchedule.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/500`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListProviders.Output.InternalServerError) + case internalServerError(Operations.DeleteSchedule.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListProviders.Output.InternalServerError { + public var internalServerError: Operations.DeleteSchedule.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -70282,9 +79117,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70300,26 +79135,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListProviders.Output.ServiceUnavailable.Body + public var body: Operations.DeleteSchedule.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListProviders.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteSchedule.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/providers/get(listProviders)/responses/503`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListProviders.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteSchedule.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListProviders.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteSchedule.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -70369,137 +79204,60 @@ public enum Operations { } } } - /// Saves the provider's API key, or a password manager reference to read it from. A reference is read once to check it; 400 when it can't be read, keeping the previous credential. - /// - /// - Remark: HTTP `PUT /v1/providers/{provider}`. - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)`. - public enum PutProviderKey { - public static let id: Swift.String = "putProviderKey" + /// - Remark: HTTP `POST /v1/schedules/{id}/run`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)`. + public enum RunSchedule { + public static let id: Swift.String = "runSchedule" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/path`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/path/provider`. - public var provider: Swift.String + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/path/id`. + public var id: Swift.String /// Creates a new `Path`. /// /// - Parameters: - /// - provider: - public init(provider: Swift.String) { - self.provider = provider + /// - id: + public init(id: Swift.String) { + self.id = id } } - public var path: Operations.PutProviderKey.Input.Path - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/header`. + public var path: Operations.RunSchedule.Input.Path + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.PutProviderKey.Input.Headers - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/reference`. - public struct ReferencePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/reference/passwordManager`. - @frozen public enum PasswordManagerPayload: String, Codable, Hashable, Sendable, CaseIterable { - case _1password = "1password" - case bitwarden = "bitwarden" - } - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/reference/passwordManager`. - public var passwordManager: Operations.PutProviderKey.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/reference/reference`. - public var reference: Swift.String - /// Creates a new `ReferencePayload`. - /// - /// - Parameters: - /// - passwordManager: - /// - reference: - public init( - passwordManager: Operations.PutProviderKey.Input.Body.JsonPayload.ReferencePayload.PasswordManagerPayload, - reference: Swift.String - ) { - self.passwordManager = passwordManager - self.reference = reference - } - public enum CodingKeys: String, CodingKey { - case passwordManager - case reference - } - } - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/reference`. - public var reference: Operations.PutProviderKey.Input.Body.JsonPayload.ReferencePayload? - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/json/value`. - public var value: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - reference: - /// - value: - public init( - reference: Operations.PutProviderKey.Input.Body.JsonPayload.ReferencePayload? = nil, - value: Swift.String? = nil - ) { - self.reference = reference - self.value = value - } - public enum CodingKeys: String, CodingKey { - case reference - case value - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.reference = try container.decodeIfPresent( - Operations.PutProviderKey.Input.Body.JsonPayload.ReferencePayload.self, - forKey: .reference - ) - self.value = try container.decodeIfPresent( - Swift.String.self, - forKey: .value - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "reference", - "value" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/requestBody/content/application\/json`. - case json(Operations.PutProviderKey.Input.Body.JsonPayload) - } - public var body: Operations.PutProviderKey.Input.Body + public var headers: Operations.RunSchedule.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.PutProviderKey.Input.Path, - headers: Operations.PutProviderKey.Input.Headers = .init(), - body: Operations.PutProviderKey.Input.Body + path: Operations.RunSchedule.Input.Path, + headers: Operations.RunSchedule.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/200/content`. + public struct Accepted: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/202/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.ProviderConfigured) + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/202/content/application\/json`. + case json(Components.Schemas.ScheduleRun) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.ProviderConfigured { + public var json: Components.Schemas.ScheduleRun { get throws { switch self { case let .json(body): @@ -70509,42 +79267,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutProviderKey.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.RunSchedule.Output.Accepted.Body + /// Creates a new `Accepted`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutProviderKey.Output.Ok.Body) { + public init(body: Operations.RunSchedule.Output.Accepted.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/200`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/202`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.PutProviderKey.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `202 accepted`. + case accepted(Operations.RunSchedule.Output.Accepted) + /// The associated value of the enum case if `self` is `.accepted`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.PutProviderKey.Output.Ok { + /// - Throws: An error if `self` is not `.accepted`. + /// - SeeAlso: `.accepted`. + public var accepted: Operations.RunSchedule.Output.Accepted { get throws { switch self { - case let .ok(response): + case let .accepted(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "accepted", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70560,26 +79318,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutProviderKey.Output.BadRequest.Body + public var body: Operations.RunSchedule.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutProviderKey.Output.BadRequest.Body) { + public init(body: Operations.RunSchedule.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/400`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.PutProviderKey.Output.BadRequest) + case badRequest(Operations.RunSchedule.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.PutProviderKey.Output.BadRequest { + public var badRequest: Operations.RunSchedule.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -70593,9 +79351,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -70611,26 +79369,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutProviderKey.Output.Unauthorized.Body + public var body: Operations.RunSchedule.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutProviderKey.Output.Unauthorized.Body) { + public init(body: Operations.RunSchedule.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/401`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.PutProviderKey.Output.Unauthorized) + case unauthorized(Operations.RunSchedule.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.PutProviderKey.Output.Unauthorized { + public var unauthorized: Operations.RunSchedule.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -70644,9 +79402,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70662,26 +79420,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutProviderKey.Output.NotFound.Body + public var body: Operations.RunSchedule.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutProviderKey.Output.NotFound.Body) { + public init(body: Operations.RunSchedule.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/404`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.PutProviderKey.Output.NotFound) + case notFound(Operations.RunSchedule.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.PutProviderKey.Output.NotFound { + public var notFound: Operations.RunSchedule.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -70695,9 +79453,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70713,26 +79471,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutProviderKey.Output.MethodNotAllowed.Body + public var body: Operations.RunSchedule.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutProviderKey.Output.MethodNotAllowed.Body) { + public init(body: Operations.RunSchedule.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/405`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.PutProviderKey.Output.MethodNotAllowed) + case methodNotAllowed(Operations.RunSchedule.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.PutProviderKey.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.RunSchedule.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -70746,9 +79504,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70764,26 +79522,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutProviderKey.Output.Conflict.Body + public var body: Operations.RunSchedule.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutProviderKey.Output.Conflict.Body) { + public init(body: Operations.RunSchedule.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/409`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.PutProviderKey.Output.Conflict) + case conflict(Operations.RunSchedule.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.PutProviderKey.Output.Conflict { + public var conflict: Operations.RunSchedule.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -70797,9 +79555,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -70815,26 +79573,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutProviderKey.Output.ContentTooLarge.Body + public var body: Operations.RunSchedule.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutProviderKey.Output.ContentTooLarge.Body) { + public init(body: Operations.RunSchedule.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/413`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.PutProviderKey.Output.ContentTooLarge) + case contentTooLarge(Operations.RunSchedule.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.PutProviderKey.Output.ContentTooLarge { + public var contentTooLarge: Operations.RunSchedule.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -70848,9 +79606,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70866,26 +79624,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutProviderKey.Output.InternalServerError.Body + public var body: Operations.RunSchedule.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutProviderKey.Output.InternalServerError.Body) { + public init(body: Operations.RunSchedule.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/500`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.PutProviderKey.Output.InternalServerError) + case internalServerError(Operations.RunSchedule.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.PutProviderKey.Output.InternalServerError { + public var internalServerError: Operations.RunSchedule.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -70899,9 +79657,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -70917,26 +79675,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutProviderKey.Output.ServiceUnavailable.Body + public var body: Operations.RunSchedule.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutProviderKey.Output.ServiceUnavailable.Body) { + public init(body: Operations.RunSchedule.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/put(putProviderKey)/responses/503`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.PutProviderKey.Output.ServiceUnavailable) + case serviceUnavailable(Operations.RunSchedule.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.PutProviderKey.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.RunSchedule.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -70986,91 +79744,130 @@ public enum Operations { } } } - /// Remove the provider's saved credential. 409 for a provider that signs in outside Crumble; the message names its sign-out command. + /// Script task runs from the last 90 days, newest first. Page with `before` set to the last run's ID. An unknown ID returns an empty list. /// - /// - Remark: HTTP `DELETE /v1/providers/{provider}`. - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)`. - public enum DeleteProviderKey { - public static let id: Swift.String = "deleteProviderKey" + /// - Remark: HTTP `GET /v1/schedules/{id}/runs`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)`. + public enum ListScriptRuns { + public static let id: Swift.String = "listScriptRuns" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/path`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/path/provider`. - public var provider: Swift.String + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/path/id`. + public var id: Swift.String /// Creates a new `Path`. /// /// - Parameters: - /// - provider: - public init(provider: Swift.String) { - self.provider = provider + /// - id: + public init(id: Swift.String) { + self.id = id } } - public var path: Operations.DeleteProviderKey.Input.Path - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/header`. + public var path: Operations.ListScriptRuns.Input.Path + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/query/limit`. + public var limit: Swift.Int? + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/query/before`. + public var before: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - before: + public init( + limit: Swift.Int? = nil, + before: Swift.String? = nil + ) { + self.limit = limit + self.before = before + } + } + public var query: Operations.ListScriptRuns.Input.Query + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteProviderKey.Input.Headers + public var headers: Operations.ListScriptRuns.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.DeleteProviderKey.Input.Path, - headers: Operations.DeleteProviderKey.Input.Headers = .init() + path: Operations.ListScriptRuns.Input.Path, + query: Operations.ListScriptRuns.Input.Query = .init(), + headers: Operations.ListScriptRuns.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/200/content/application\/json`. + case json([Components.Schemas.ScriptRun]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.ScriptRun] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ListScriptRuns.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ListScriptRuns.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteProviderKey.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/204`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.ListScriptRuns.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteProviderKey.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ListScriptRuns.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71086,26 +79883,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteProviderKey.Output.BadRequest.Body + public var body: Operations.ListScriptRuns.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteProviderKey.Output.BadRequest.Body) { + public init(body: Operations.ListScriptRuns.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/400`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteProviderKey.Output.BadRequest) + case badRequest(Operations.ListScriptRuns.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteProviderKey.Output.BadRequest { + public var badRequest: Operations.ListScriptRuns.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -71119,9 +79916,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -71137,26 +79934,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteProviderKey.Output.Unauthorized.Body + public var body: Operations.ListScriptRuns.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteProviderKey.Output.Unauthorized.Body) { + public init(body: Operations.ListScriptRuns.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/401`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteProviderKey.Output.Unauthorized) + case unauthorized(Operations.ListScriptRuns.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteProviderKey.Output.Unauthorized { + public var unauthorized: Operations.ListScriptRuns.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -71170,9 +79967,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71188,26 +79985,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteProviderKey.Output.NotFound.Body + public var body: Operations.ListScriptRuns.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteProviderKey.Output.NotFound.Body) { + public init(body: Operations.ListScriptRuns.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/404`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteProviderKey.Output.NotFound) + case notFound(Operations.ListScriptRuns.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteProviderKey.Output.NotFound { + public var notFound: Operations.ListScriptRuns.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -71221,9 +80018,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71239,26 +80036,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteProviderKey.Output.MethodNotAllowed.Body + public var body: Operations.ListScriptRuns.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteProviderKey.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListScriptRuns.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/405`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteProviderKey.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListScriptRuns.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteProviderKey.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListScriptRuns.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -71272,9 +80069,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71290,26 +80087,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteProviderKey.Output.Conflict.Body + public var body: Operations.ListScriptRuns.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteProviderKey.Output.Conflict.Body) { + public init(body: Operations.ListScriptRuns.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/409`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteProviderKey.Output.Conflict) + case conflict(Operations.ListScriptRuns.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteProviderKey.Output.Conflict { + public var conflict: Operations.ListScriptRuns.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -71323,9 +80120,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -71341,26 +80138,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteProviderKey.Output.ContentTooLarge.Body + public var body: Operations.ListScriptRuns.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteProviderKey.Output.ContentTooLarge.Body) { + public init(body: Operations.ListScriptRuns.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/413`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteProviderKey.Output.ContentTooLarge) + case contentTooLarge(Operations.ListScriptRuns.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteProviderKey.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListScriptRuns.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -71374,9 +80171,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71392,26 +80189,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteProviderKey.Output.InternalServerError.Body + public var body: Operations.ListScriptRuns.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteProviderKey.Output.InternalServerError.Body) { + public init(body: Operations.ListScriptRuns.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/500`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteProviderKey.Output.InternalServerError) + case internalServerError(Operations.ListScriptRuns.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteProviderKey.Output.InternalServerError { + public var internalServerError: Operations.ListScriptRuns.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -71425,9 +80222,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71443,26 +80240,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteProviderKey.Output.ServiceUnavailable.Body + public var body: Operations.ListScriptRuns.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteProviderKey.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListScriptRuns.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/delete(deleteProviderKey)/responses/503`. + /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteProviderKey.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListScriptRuns.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteProviderKey.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListScriptRuns.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -71512,89 +80309,42 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/providers/{provider}/login`. - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)`. - public enum StartProviderLogin { - public static let id: Swift.String = "startProviderLogin" + /// - Remark: HTTP `GET /v1/skills`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)`. + public enum ListSkills { + public static let id: Swift.String = "listSkills" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/path/provider`. - public var provider: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - provider: - public init(provider: Swift.String) { - self.provider = provider - } - } - public var path: Operations.StartProviderLogin.Input.Path - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/header`. + /// - Remark: Generated from `#/paths/v1/skills/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.StartProviderLogin.Input.Headers - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/requestBody/json/method`. - @frozen public enum MethodPayload: String, Codable, Hashable, Sendable, CaseIterable { - case apiKey = "api_key" - case oauth = "oauth" - } - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/requestBody/json/method`. - public var method: Operations.StartProviderLogin.Input.Body.JsonPayload.MethodPayload - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - method: - public init(method: Operations.StartProviderLogin.Input.Body.JsonPayload.MethodPayload) { - self.method = method - } - public enum CodingKeys: String, CodingKey { - case method - } - } - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/requestBody/content/application\/json`. - case json(Operations.StartProviderLogin.Input.Body.JsonPayload) - } - public var body: Operations.StartProviderLogin.Input.Body + public var headers: Operations.ListSkills.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - /// - body: - public init( - path: Operations.StartProviderLogin.Input.Path, - headers: Operations.StartProviderLogin.Input.Headers = .init(), - body: Operations.StartProviderLogin.Input.Body - ) { - self.path = path + public init(headers: Operations.ListSkills.Input.Headers = .init()) { self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Accepted: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/202/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/202/content/application\/json`. - case json(Components.Schemas.ProviderLoginSession) + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/200/content/application\/json`. + case json([Components.Schemas.ListedSkill]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.ProviderLoginSession { + public var json: [Components.Schemas.ListedSkill] { get throws { switch self { case let .json(body): @@ -71604,42 +80354,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartProviderLogin.Output.Accepted.Body - /// Creates a new `Accepted`. + public var body: Operations.ListSkills.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartProviderLogin.Output.Accepted.Body) { + public init(body: Operations.ListSkills.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/202`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/200`. /// - /// HTTP response code: `202 accepted`. - case accepted(Operations.StartProviderLogin.Output.Accepted) - /// The associated value of the enum case if `self` is `.accepted`. + /// HTTP response code: `200 ok`. + case ok(Operations.ListSkills.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.accepted`. - /// - SeeAlso: `.accepted`. - public var accepted: Operations.StartProviderLogin.Output.Accepted { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.ListSkills.Output.Ok { get throws { switch self { - case let .accepted(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "accepted", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71655,26 +80405,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartProviderLogin.Output.BadRequest.Body + public var body: Operations.ListSkills.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartProviderLogin.Output.BadRequest.Body) { + public init(body: Operations.ListSkills.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.StartProviderLogin.Output.BadRequest) + case badRequest(Operations.ListSkills.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.StartProviderLogin.Output.BadRequest { + public var badRequest: Operations.ListSkills.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -71688,9 +80438,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -71706,26 +80456,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartProviderLogin.Output.Unauthorized.Body + public var body: Operations.ListSkills.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartProviderLogin.Output.Unauthorized.Body) { + public init(body: Operations.ListSkills.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.StartProviderLogin.Output.Unauthorized) + case unauthorized(Operations.ListSkills.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.StartProviderLogin.Output.Unauthorized { + public var unauthorized: Operations.ListSkills.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -71739,9 +80489,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71757,26 +80507,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartProviderLogin.Output.NotFound.Body + public var body: Operations.ListSkills.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartProviderLogin.Output.NotFound.Body) { + public init(body: Operations.ListSkills.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.StartProviderLogin.Output.NotFound) + case notFound(Operations.ListSkills.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.StartProviderLogin.Output.NotFound { + public var notFound: Operations.ListSkills.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -71790,9 +80540,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71808,26 +80558,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartProviderLogin.Output.MethodNotAllowed.Body + public var body: Operations.ListSkills.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartProviderLogin.Output.MethodNotAllowed.Body) { + public init(body: Operations.ListSkills.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.StartProviderLogin.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ListSkills.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.StartProviderLogin.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ListSkills.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -71841,9 +80591,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71859,26 +80609,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartProviderLogin.Output.Conflict.Body + public var body: Operations.ListSkills.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartProviderLogin.Output.Conflict.Body) { + public init(body: Operations.ListSkills.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.StartProviderLogin.Output.Conflict) + case conflict(Operations.ListSkills.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.StartProviderLogin.Output.Conflict { + public var conflict: Operations.ListSkills.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -71892,9 +80642,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -71910,26 +80660,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartProviderLogin.Output.ContentTooLarge.Body + public var body: Operations.ListSkills.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartProviderLogin.Output.ContentTooLarge.Body) { + public init(body: Operations.ListSkills.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.StartProviderLogin.Output.ContentTooLarge) + case contentTooLarge(Operations.ListSkills.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.StartProviderLogin.Output.ContentTooLarge { + public var contentTooLarge: Operations.ListSkills.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -71943,9 +80693,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -71961,26 +80711,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartProviderLogin.Output.InternalServerError.Body + public var body: Operations.ListSkills.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartProviderLogin.Output.InternalServerError.Body) { + public init(body: Operations.ListSkills.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.StartProviderLogin.Output.InternalServerError) + case internalServerError(Operations.ListSkills.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.StartProviderLogin.Output.InternalServerError { + public var internalServerError: Operations.ListSkills.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -71994,9 +80744,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/providers/{provider}/login/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72012,26 +80762,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.StartProviderLogin.Output.ServiceUnavailable.Body + public var body: Operations.ListSkills.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.StartProviderLogin.Output.ServiceUnavailable.Body) { + public init(body: Operations.ListSkills.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/providers/{provider}/login/post(startProviderLogin)/responses/503`. + /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.StartProviderLogin.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ListSkills.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.StartProviderLogin.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ListSkills.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -72081,42 +80831,113 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/push`. - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)`. - public enum GetPushStatus { - public static let id: Swift.String = "getPushStatus" + /// - Remark: HTTP `POST /v1/skills`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)`. + public enum CreateSkill { + public static let id: Swift.String = "createSkill" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/header`. + /// - Remark: Generated from `#/paths/v1/skills/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetPushStatus.Input.Headers + public var headers: Operations.CreateSkill.Input.Headers + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/DocumentsPayload`. + public struct DocumentsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/DocumentsPayload/content`. + public var content: Swift.String + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/DocumentsPayload/path`. + public var path: Swift.String + /// Creates a new `DocumentsPayloadPayload`. + /// + /// - Parameters: + /// - content: + /// - path: + public init( + content: Swift.String, + path: Swift.String + ) { + self.content = content + self.path = path + } + public enum CodingKeys: String, CodingKey { + case content + case path + } + } + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/documents`. + public typealias DocumentsPayload = [Operations.CreateSkill.Input.Body.JsonPayload.DocumentsPayloadPayload] + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/documents`. + public var documents: Operations.CreateSkill.Input.Body.JsonPayload.DocumentsPayload? + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/instructions`. + public var instructions: Swift.String + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/name`. + public var name: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - description: + /// - documents: + /// - instructions: + /// - name: + public init( + description: Swift.String? = nil, + documents: Operations.CreateSkill.Input.Body.JsonPayload.DocumentsPayload? = nil, + instructions: Swift.String, + name: Swift.String + ) { + self.description = description + self.documents = documents + self.instructions = instructions + self.name = name + } + public enum CodingKeys: String, CodingKey { + case description + case documents + case instructions + case name + } + } + /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/content/application\/json`. + case json(Operations.CreateSkill.Input.Body.JsonPayload) + } + public var body: Operations.CreateSkill.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - headers: - public init(headers: Operations.GetPushStatus.Input.Headers = .init()) { + /// - body: + public init( + headers: Operations.CreateSkill.Input.Headers = .init(), + body: Operations.CreateSkill.Input.Body + ) { self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/200/content`. + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/200/content/application\/json`. - case json(Components.Schemas.PushStatus) + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/201/content/application\/json`. + case json(Components.Schemas.Skill) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.PushStatus { + public var json: Components.Schemas.Skill { get throws { switch self { case let .json(body): @@ -72126,42 +80947,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPushStatus.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.CreateSkill.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPushStatus.Output.Ok.Body) { + public init(body: Operations.CreateSkill.Output.Created.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/200`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/201`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.GetPushStatus.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `201 created`. + case created(Operations.CreateSkill.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.GetPushStatus.Output.Ok { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.CreateSkill.Output.Created { get throws { switch self { - case let .ok(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "created", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72177,26 +80998,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPushStatus.Output.BadRequest.Body + public var body: Operations.CreateSkill.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPushStatus.Output.BadRequest.Body) { + public init(body: Operations.CreateSkill.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetPushStatus.Output.BadRequest) + case badRequest(Operations.CreateSkill.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetPushStatus.Output.BadRequest { + public var badRequest: Operations.CreateSkill.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -72210,9 +81031,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -72228,26 +81049,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPushStatus.Output.Unauthorized.Body + public var body: Operations.CreateSkill.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPushStatus.Output.Unauthorized.Body) { + public init(body: Operations.CreateSkill.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetPushStatus.Output.Unauthorized) + case unauthorized(Operations.CreateSkill.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetPushStatus.Output.Unauthorized { + public var unauthorized: Operations.CreateSkill.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -72261,9 +81082,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72279,26 +81100,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPushStatus.Output.NotFound.Body + public var body: Operations.CreateSkill.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPushStatus.Output.NotFound.Body) { + public init(body: Operations.CreateSkill.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetPushStatus.Output.NotFound) + case notFound(Operations.CreateSkill.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetPushStatus.Output.NotFound { + public var notFound: Operations.CreateSkill.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -72312,9 +81133,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72330,26 +81151,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPushStatus.Output.MethodNotAllowed.Body + public var body: Operations.CreateSkill.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPushStatus.Output.MethodNotAllowed.Body) { + public init(body: Operations.CreateSkill.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetPushStatus.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CreateSkill.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetPushStatus.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CreateSkill.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -72363,9 +81184,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72381,26 +81202,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPushStatus.Output.Conflict.Body + public var body: Operations.CreateSkill.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPushStatus.Output.Conflict.Body) { + public init(body: Operations.CreateSkill.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetPushStatus.Output.Conflict) + case conflict(Operations.CreateSkill.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetPushStatus.Output.Conflict { + public var conflict: Operations.CreateSkill.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -72414,9 +81235,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -72432,26 +81253,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPushStatus.Output.ContentTooLarge.Body + public var body: Operations.CreateSkill.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPushStatus.Output.ContentTooLarge.Body) { + public init(body: Operations.CreateSkill.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetPushStatus.Output.ContentTooLarge) + case contentTooLarge(Operations.CreateSkill.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetPushStatus.Output.ContentTooLarge { + public var contentTooLarge: Operations.CreateSkill.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -72465,9 +81286,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72483,26 +81304,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPushStatus.Output.InternalServerError.Body + public var body: Operations.CreateSkill.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPushStatus.Output.InternalServerError.Body) { + public init(body: Operations.CreateSkill.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetPushStatus.Output.InternalServerError) + case internalServerError(Operations.CreateSkill.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetPushStatus.Output.InternalServerError { + public var internalServerError: Operations.CreateSkill.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -72516,9 +81337,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72534,26 +81355,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPushStatus.Output.ServiceUnavailable.Body + public var body: Operations.CreateSkill.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPushStatus.Output.ServiceUnavailable.Body) { + public init(body: Operations.CreateSkill.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/push/get(getPushStatus)/responses/503`. + /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetPushStatus.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CreateSkill.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetPushStatus.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CreateSkill.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -72603,132 +81424,80 @@ public enum Operations { } } } - /// - Remark: HTTP `PUT /v1/push/devices/{installationId}`. - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)`. - public enum PutPushDevice { - public static let id: Swift.String = "putPushDevice" + /// Lists the skills in a public GitHub repository: every folder with a SKILL.md, and whether each can be installed. + /// + /// - Remark: HTTP `POST /v1/skills/github/browse`. + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)`. + public enum BrowseSkillRepository { + public static let id: Swift.String = "browseSkillRepository" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/path/installationId`. - public var installationId: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - installationId: - public init(installationId: Swift.String) { - self.installationId = installationId - } - } - public var path: Operations.PutPushDevice.Input.Path - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/header`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.PutPushDevice.Input.Headers - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody`. + public var headers: Operations.BrowseSkillRepository.Input.Headers + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/bundleId`. - public var bundleId: Swift.String? - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/enabled`. - public var enabled: Swift.Bool - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/environment`. - @frozen public enum EnvironmentPayload: String, Codable, Hashable, Sendable, CaseIterable { - case development = "development" - case production = "production" - } - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/environment`. - public var environment: Operations.PutPushDevice.Input.Body.JsonPayload.EnvironmentPayload - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/platform`. - @frozen public enum PlatformPayload: String, Codable, Hashable, Sendable, CaseIterable { - case macos = "macos" - case ios = "ios" - case android = "android" - } - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/platform`. - public var platform: Operations.PutPushDevice.Input.Body.JsonPayload.PlatformPayload - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/token`. - public var token: Swift.String - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/transport`. - @frozen public enum TransportPayload: String, Codable, Hashable, Sendable, CaseIterable { - case apns = "apns" - case fcm = "fcm" - } - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/json/transport`. - public var transport: Operations.PutPushDevice.Input.Body.JsonPayload.TransportPayload + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/requestBody/json/location`. + public var location: Swift.String /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - bundleId: - /// - enabled: - /// - environment: - /// - platform: - /// - token: - /// - transport: - public init( - bundleId: Swift.String? = nil, - enabled: Swift.Bool, - environment: Operations.PutPushDevice.Input.Body.JsonPayload.EnvironmentPayload, - platform: Operations.PutPushDevice.Input.Body.JsonPayload.PlatformPayload, - token: Swift.String, - transport: Operations.PutPushDevice.Input.Body.JsonPayload.TransportPayload - ) { - self.bundleId = bundleId - self.enabled = enabled - self.environment = environment - self.platform = platform - self.token = token - self.transport = transport + /// - location: + public init(location: Swift.String) { + self.location = location } public enum CodingKeys: String, CodingKey { - case bundleId - case enabled - case environment - case platform - case token - case transport + case location + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.location = try container.decode( + Swift.String.self, + forKey: .location + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "location" + ]) } } - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/requestBody/content/application\/json`. - case json(Operations.PutPushDevice.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/requestBody/content/application\/json`. + case json(Operations.BrowseSkillRepository.Input.Body.JsonPayload) } - public var body: Operations.PutPushDevice.Input.Body + public var body: Operations.BrowseSkillRepository.Input.Body /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: /// - body: public init( - path: Operations.PutPushDevice.Input.Path, - headers: Operations.PutPushDevice.Input.Headers = .init(), - body: Operations.PutPushDevice.Input.Body + headers: Operations.BrowseSkillRepository.Input.Headers = .init(), + body: Operations.BrowseSkillRepository.Input.Body ) { - self.path = path self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.PushDeviceRegistration) + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/200/content/application\/json`. + case json(Components.Schemas.SkillListing) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.PushDeviceRegistration { + public var json: Components.Schemas.SkillListing { get throws { switch self { case let .json(body): @@ -72738,26 +81507,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushDevice.Output.Ok.Body + public var body: Operations.BrowseSkillRepository.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushDevice.Output.Ok.Body) { + public init(body: Operations.BrowseSkillRepository.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/200`. + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.PutPushDevice.Output.Ok) + case ok(Operations.BrowseSkillRepository.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.PutPushDevice.Output.Ok { + public var ok: Operations.BrowseSkillRepository.Output.Ok { get throws { switch self { case let .ok(response): @@ -72771,9 +81540,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72789,26 +81558,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushDevice.Output.BadRequest.Body + public var body: Operations.BrowseSkillRepository.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushDevice.Output.BadRequest.Body) { + public init(body: Operations.BrowseSkillRepository.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.PutPushDevice.Output.BadRequest) + case badRequest(Operations.BrowseSkillRepository.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.PutPushDevice.Output.BadRequest { + public var badRequest: Operations.BrowseSkillRepository.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -72822,9 +81591,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -72840,26 +81609,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushDevice.Output.Unauthorized.Body + public var body: Operations.BrowseSkillRepository.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushDevice.Output.Unauthorized.Body) { + public init(body: Operations.BrowseSkillRepository.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.PutPushDevice.Output.Unauthorized) + case unauthorized(Operations.BrowseSkillRepository.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.PutPushDevice.Output.Unauthorized { + public var unauthorized: Operations.BrowseSkillRepository.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -72873,9 +81642,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72891,26 +81660,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushDevice.Output.NotFound.Body + public var body: Operations.BrowseSkillRepository.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushDevice.Output.NotFound.Body) { + public init(body: Operations.BrowseSkillRepository.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.PutPushDevice.Output.NotFound) + case notFound(Operations.BrowseSkillRepository.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.PutPushDevice.Output.NotFound { + public var notFound: Operations.BrowseSkillRepository.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -72924,9 +81693,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72942,26 +81711,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushDevice.Output.MethodNotAllowed.Body + public var body: Operations.BrowseSkillRepository.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushDevice.Output.MethodNotAllowed.Body) { + public init(body: Operations.BrowseSkillRepository.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.PutPushDevice.Output.MethodNotAllowed) + case methodNotAllowed(Operations.BrowseSkillRepository.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.PutPushDevice.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.BrowseSkillRepository.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -72975,9 +81744,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -72993,26 +81762,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushDevice.Output.Conflict.Body + public var body: Operations.BrowseSkillRepository.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushDevice.Output.Conflict.Body) { + public init(body: Operations.BrowseSkillRepository.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.PutPushDevice.Output.Conflict) + case conflict(Operations.BrowseSkillRepository.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.PutPushDevice.Output.Conflict { + public var conflict: Operations.BrowseSkillRepository.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -73026,9 +81795,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -73044,26 +81813,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushDevice.Output.ContentTooLarge.Body + public var body: Operations.BrowseSkillRepository.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushDevice.Output.ContentTooLarge.Body) { + public init(body: Operations.BrowseSkillRepository.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.PutPushDevice.Output.ContentTooLarge) + case contentTooLarge(Operations.BrowseSkillRepository.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.PutPushDevice.Output.ContentTooLarge { + public var contentTooLarge: Operations.BrowseSkillRepository.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -73077,9 +81846,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -73095,26 +81864,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushDevice.Output.InternalServerError.Body + public var body: Operations.BrowseSkillRepository.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushDevice.Output.InternalServerError.Body) { + public init(body: Operations.BrowseSkillRepository.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.PutPushDevice.Output.InternalServerError) + case internalServerError(Operations.BrowseSkillRepository.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.PutPushDevice.Output.InternalServerError { + public var internalServerError: Operations.BrowseSkillRepository.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -73128,15 +81897,213 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/503/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/503/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BrowseSkillRepository.Output.ServiceUnavailable.Body + /// Creates a new `ServiceUnavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BrowseSkillRepository.Output.ServiceUnavailable.Body) { + self.body = body + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Operations.BrowseSkillRepository.Output.ServiceUnavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Operations.BrowseSkillRepository.Output.ServiceUnavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case plainText + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "text/plain": + self = .plainText + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .plainText: + return "text/plain" + } + } + public static var allCases: [Self] { + [ + .json, + .plainText + ] + } + } + } + /// Installs skills from one commit of a public GitHub repository as read-only shared skills, all or none, and turns them on for `botIds`. + /// + /// - Remark: HTTP `POST /v1/skills/github/install`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)`. + public enum InstallSkills { + public static let id: Swift.String = "installSkills" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.InstallSkills.Input.Headers + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json/botIds`. + public var botIds: [Swift.String]? + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json/branch`. + public var branch: Swift.String + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json/commit`. + public var commit: Swift.String + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json/paths`. + public var paths: [Swift.String] + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json/repository`. + public var repository: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - botIds: + /// - branch: + /// - commit: + /// - paths: + /// - repository: + public init( + botIds: [Swift.String]? = nil, + branch: Swift.String, + commit: Swift.String, + paths: [Swift.String], + repository: Swift.String + ) { + self.botIds = botIds + self.branch = branch + self.commit = commit + self.paths = paths + self.repository = repository + } + public enum CodingKeys: String, CodingKey { + case botIds + case branch + case commit + case paths + case repository + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.botIds = try container.decodeIfPresent( + [Swift.String].self, + forKey: .botIds + ) + self.branch = try container.decode( + Swift.String.self, + forKey: .branch + ) + self.commit = try container.decode( + Swift.String.self, + forKey: .commit + ) + self.paths = try container.decode( + [Swift.String].self, + forKey: .paths + ) + self.repository = try container.decode( + Swift.String.self, + forKey: .repository + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "botIds", + "branch", + "commit", + "paths", + "repository" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/content/application\/json`. + case json(Operations.InstallSkills.Input.Body.JsonPayload) + } + public var body: Operations.InstallSkills.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + /// - body: + public init( + headers: Operations.InstallSkills.Input.Headers = .init(), + body: Operations.InstallSkills.Input.Body + ) { + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/PUT/responses/503/content/application\/json`. - case json(Components.Schemas._Error) + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/201/content/application\/json`. + case json([Components.Schemas.SkillPackage]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas._Error { + public var json: [Components.Schemas.SkillPackage] { get throws { switch self { case let .json(body): @@ -73146,158 +82113,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushDevice.Output.ServiceUnavailable.Body - /// Creates a new `ServiceUnavailable`. + public var body: Operations.InstallSkills.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushDevice.Output.ServiceUnavailable.Body) { + public init(body: Operations.InstallSkills.Output.Created.Body) { self.body = body } } - /// Service unavailable - /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/put(putPushDevice)/responses/503`. - /// - /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.PutPushDevice.Output.ServiceUnavailable) - /// The associated value of the enum case if `self` is `.serviceUnavailable`. - /// - /// - Throws: An error if `self` is not `.serviceUnavailable`. - /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.PutPushDevice.Output.ServiceUnavailable { - get throws { - switch self { - case let .serviceUnavailable(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "serviceUnavailable", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case plainText - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - case "text/plain": - self = .plainText - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - case .plainText: - return "text/plain" - } - } - public static var allCases: [Self] { - [ - .json, - .plainText - ] - } - } - } - /// - Remark: HTTP `DELETE /v1/push/devices/{installationId}`. - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)`. - public enum DeletePushDevice { - public static let id: Swift.String = "deletePushDevice" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/path/installationId`. - public var installationId: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - installationId: - public init(installationId: Swift.String) { - self.installationId = installationId - } - } - public var path: Operations.DeletePushDevice.Input.Path - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/header`. - public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - public var headers: Operations.DeletePushDevice.Input.Headers - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - public init( - path: Operations.DeletePushDevice.Input.Path, - headers: Operations.DeletePushDevice.Input.Headers = .init() - ) { - self.path = path - self.headers = headers - } - } - @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} - } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeletePushDevice.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/204`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/201`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `201 created`. + case created(Operations.InstallSkills.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeletePushDevice.Output.NoContent { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.InstallSkills.Output.Created { get throws { switch self { - case let .noContent(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "created", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -73313,26 +82164,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePushDevice.Output.BadRequest.Body + public var body: Operations.InstallSkills.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePushDevice.Output.BadRequest.Body) { + public init(body: Operations.InstallSkills.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeletePushDevice.Output.BadRequest) + case badRequest(Operations.InstallSkills.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeletePushDevice.Output.BadRequest { + public var badRequest: Operations.InstallSkills.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -73346,9 +82197,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -73364,26 +82215,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePushDevice.Output.Unauthorized.Body + public var body: Operations.InstallSkills.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePushDevice.Output.Unauthorized.Body) { + public init(body: Operations.InstallSkills.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeletePushDevice.Output.Unauthorized) + case unauthorized(Operations.InstallSkills.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeletePushDevice.Output.Unauthorized { + public var unauthorized: Operations.InstallSkills.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -73397,9 +82248,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -73415,26 +82266,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePushDevice.Output.NotFound.Body + public var body: Operations.InstallSkills.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePushDevice.Output.NotFound.Body) { + public init(body: Operations.InstallSkills.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeletePushDevice.Output.NotFound) + case notFound(Operations.InstallSkills.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeletePushDevice.Output.NotFound { + public var notFound: Operations.InstallSkills.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -73448,9 +82299,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -73466,26 +82317,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePushDevice.Output.MethodNotAllowed.Body + public var body: Operations.InstallSkills.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePushDevice.Output.MethodNotAllowed.Body) { + public init(body: Operations.InstallSkills.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeletePushDevice.Output.MethodNotAllowed) + case methodNotAllowed(Operations.InstallSkills.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeletePushDevice.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.InstallSkills.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -73499,9 +82350,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -73517,26 +82368,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePushDevice.Output.Conflict.Body + public var body: Operations.InstallSkills.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePushDevice.Output.Conflict.Body) { + public init(body: Operations.InstallSkills.Output.Conflict.Body) { self.body = body } } - /// Conflicting request + /// A skill is already installed or its name is taken /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeletePushDevice.Output.Conflict) + case conflict(Operations.InstallSkills.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeletePushDevice.Output.Conflict { + public var conflict: Operations.InstallSkills.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -73550,9 +82401,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -73568,26 +82419,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePushDevice.Output.ContentTooLarge.Body + public var body: Operations.InstallSkills.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePushDevice.Output.ContentTooLarge.Body) { + public init(body: Operations.InstallSkills.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeletePushDevice.Output.ContentTooLarge) + case contentTooLarge(Operations.InstallSkills.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeletePushDevice.Output.ContentTooLarge { + public var contentTooLarge: Operations.InstallSkills.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -73601,9 +82452,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -73619,26 +82470,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePushDevice.Output.InternalServerError.Body + public var body: Operations.InstallSkills.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePushDevice.Output.InternalServerError.Body) { + public init(body: Operations.InstallSkills.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeletePushDevice.Output.InternalServerError) + case internalServerError(Operations.InstallSkills.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeletePushDevice.Output.InternalServerError { + public var internalServerError: Operations.InstallSkills.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -73652,9 +82503,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -73670,26 +82521,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeletePushDevice.Output.ServiceUnavailable.Body + public var body: Operations.InstallSkills.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeletePushDevice.Output.ServiceUnavailable.Body) { + public init(body: Operations.InstallSkills.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/delete(deletePushDevice)/responses/503`. + /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeletePushDevice.Output.ServiceUnavailable) + case serviceUnavailable(Operations.InstallSkills.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeletePushDevice.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.InstallSkills.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -73739,121 +82590,89 @@ public enum Operations { } } } - /// - Remark: HTTP `PUT /v1/push/devices/{installationId}/presence`. - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)`. - public enum PutPushPresence { - public static let id: Swift.String = "putPushPresence" + /// Checks every installed skill's branch for changes now. The server also checks daily; GET /v1/skills shows the results as `update`. + /// + /// - Remark: HTTP `POST /v1/skills/updates/check`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)`. + public enum CheckSkillUpdates { + public static let id: Swift.String = "checkSkillUpdates" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/path/installationId`. - public var installationId: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - installationId: - public init(installationId: Swift.String) { - self.installationId = installationId - } - } - public var path: Operations.PutPushPresence.Input.Path - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/header`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.PutPushPresence.Input.Headers - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/requestBody/json/active`. - public var active: Swift.Bool - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/requestBody/json/agentId`. - public var agentId: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - active: - /// - agentId: - public init( - active: Swift.Bool, - agentId: Swift.String? = nil - ) { - self.active = active - self.agentId = agentId - } - public enum CodingKeys: String, CodingKey { - case active - case agentId - } - } - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/requestBody/content/application\/json`. - case json(Operations.PutPushPresence.Input.Body.JsonPayload) - } - public var body: Operations.PutPushPresence.Input.Body + public var headers: Operations.CheckSkillUpdates.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - /// - body: - public init( - path: Operations.PutPushPresence.Input.Path, - headers: Operations.PutPushPresence.Input.Headers = .init(), - body: Operations.PutPushPresence.Input.Body - ) { - self.path = path + public init(headers: Operations.CheckSkillUpdates.Input.Headers = .init()) { self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/200/content/application\/json`. + case json(Components.Schemas.SkillCheck) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.SkillCheck { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CheckSkillUpdates.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CheckSkillUpdates.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.PutPushPresence.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/204`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.CheckSkillUpdates.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.PutPushPresence.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.CheckSkillUpdates.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -73869,26 +82688,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushPresence.Output.BadRequest.Body + public var body: Operations.CheckSkillUpdates.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushPresence.Output.BadRequest.Body) { + public init(body: Operations.CheckSkillUpdates.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.PutPushPresence.Output.BadRequest) + case badRequest(Operations.CheckSkillUpdates.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.PutPushPresence.Output.BadRequest { + public var badRequest: Operations.CheckSkillUpdates.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -73902,9 +82721,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -73920,26 +82739,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushPresence.Output.Unauthorized.Body + public var body: Operations.CheckSkillUpdates.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushPresence.Output.Unauthorized.Body) { + public init(body: Operations.CheckSkillUpdates.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.PutPushPresence.Output.Unauthorized) + case unauthorized(Operations.CheckSkillUpdates.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.PutPushPresence.Output.Unauthorized { + public var unauthorized: Operations.CheckSkillUpdates.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -73953,9 +82772,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -73971,26 +82790,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushPresence.Output.NotFound.Body + public var body: Operations.CheckSkillUpdates.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushPresence.Output.NotFound.Body) { + public init(body: Operations.CheckSkillUpdates.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.PutPushPresence.Output.NotFound) + case notFound(Operations.CheckSkillUpdates.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.PutPushPresence.Output.NotFound { + public var notFound: Operations.CheckSkillUpdates.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -74004,9 +82823,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -74022,26 +82841,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushPresence.Output.MethodNotAllowed.Body + public var body: Operations.CheckSkillUpdates.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushPresence.Output.MethodNotAllowed.Body) { + public init(body: Operations.CheckSkillUpdates.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.PutPushPresence.Output.MethodNotAllowed) + case methodNotAllowed(Operations.CheckSkillUpdates.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.PutPushPresence.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.CheckSkillUpdates.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -74055,9 +82874,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -74073,26 +82892,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushPresence.Output.Conflict.Body + public var body: Operations.CheckSkillUpdates.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushPresence.Output.Conflict.Body) { + public init(body: Operations.CheckSkillUpdates.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.PutPushPresence.Output.Conflict) + case conflict(Operations.CheckSkillUpdates.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.PutPushPresence.Output.Conflict { + public var conflict: Operations.CheckSkillUpdates.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -74106,9 +82925,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -74124,26 +82943,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushPresence.Output.ContentTooLarge.Body + public var body: Operations.CheckSkillUpdates.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushPresence.Output.ContentTooLarge.Body) { + public init(body: Operations.CheckSkillUpdates.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.PutPushPresence.Output.ContentTooLarge) + case contentTooLarge(Operations.CheckSkillUpdates.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.PutPushPresence.Output.ContentTooLarge { + public var contentTooLarge: Operations.CheckSkillUpdates.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -74157,9 +82976,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -74175,26 +82994,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushPresence.Output.InternalServerError.Body + public var body: Operations.CheckSkillUpdates.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushPresence.Output.InternalServerError.Body) { + public init(body: Operations.CheckSkillUpdates.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.PutPushPresence.Output.InternalServerError) + case internalServerError(Operations.CheckSkillUpdates.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.PutPushPresence.Output.InternalServerError { + public var internalServerError: Operations.CheckSkillUpdates.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -74208,9 +83027,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/push/devices/{installationId}/presence/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -74226,26 +83045,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.PutPushPresence.Output.ServiceUnavailable.Body + public var body: Operations.CheckSkillUpdates.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.PutPushPresence.Output.ServiceUnavailable.Body) { + public init(body: Operations.CheckSkillUpdates.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/push/devices/{installationId}/presence/put(putPushPresence)/responses/503`. + /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.PutPushPresence.Output.ServiceUnavailable) + case serviceUnavailable(Operations.CheckSkillUpdates.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.PutPushPresence.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.CheckSkillUpdates.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -74295,60 +83114,62 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/schedules`. - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)`. - public enum ListSchedules { - public static let id: Swift.String = "listSchedules" + /// One shared skill as a full package. GET /v1/skills keeps its earlier item shapes; the full records are here and in the create and update responses. + /// + /// - Remark: HTTP `GET /v1/skills/{id}`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)`. + public enum GetSkill { + public static let id: Swift.String = "getSkill" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/query/agentId`. - public var agentId: Swift.String? - /// Creates a new `Query`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/path/id`. + public var id: Swift.String + /// Creates a new `Path`. /// /// - Parameters: - /// - agentId: - public init(agentId: Swift.String? = nil) { - self.agentId = agentId + /// - id: + public init(id: Swift.String) { + self.id = id } } - public var query: Operations.ListSchedules.Input.Query - /// - Remark: Generated from `#/paths/v1/schedules/GET/header`. + public var path: Operations.GetSkill.Input.Path + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListSchedules.Input.Headers + public var headers: Operations.GetSkill.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - query: + /// - path: /// - headers: public init( - query: Operations.ListSchedules.Input.Query = .init(), - headers: Operations.ListSchedules.Input.Headers = .init() + path: Operations.GetSkill.Input.Path, + headers: Operations.GetSkill.Input.Headers = .init() ) { - self.query = query + self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/200/content/application\/json`. - case json([Components.Schemas.Schedule]) + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.SkillPackage) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.Schedule] { + public var json: Components.Schemas.SkillPackage { get throws { switch self { case let .json(body): @@ -74358,26 +83179,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSchedules.Output.Ok.Body + public var body: Operations.GetSkill.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSchedules.Output.Ok.Body) { + public init(body: Operations.GetSkill.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/200`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListSchedules.Output.Ok) + case ok(Operations.GetSkill.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListSchedules.Output.Ok { + public var ok: Operations.GetSkill.Output.Ok { get throws { switch self { case let .ok(response): @@ -74391,9 +83212,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -74409,26 +83230,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSchedules.Output.BadRequest.Body + public var body: Operations.GetSkill.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSchedules.Output.BadRequest.Body) { + public init(body: Operations.GetSkill.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListSchedules.Output.BadRequest) + case badRequest(Operations.GetSkill.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListSchedules.Output.BadRequest { + public var badRequest: Operations.GetSkill.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -74442,9 +83263,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -74460,26 +83281,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSchedules.Output.Unauthorized.Body + public var body: Operations.GetSkill.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSchedules.Output.Unauthorized.Body) { + public init(body: Operations.GetSkill.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListSchedules.Output.Unauthorized) + case unauthorized(Operations.GetSkill.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListSchedules.Output.Unauthorized { + public var unauthorized: Operations.GetSkill.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -74493,9 +83314,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -74511,26 +83332,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSchedules.Output.NotFound.Body + public var body: Operations.GetSkill.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSchedules.Output.NotFound.Body) { + public init(body: Operations.GetSkill.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListSchedules.Output.NotFound) + case notFound(Operations.GetSkill.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListSchedules.Output.NotFound { + public var notFound: Operations.GetSkill.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -74544,9 +83365,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -74562,26 +83383,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSchedules.Output.MethodNotAllowed.Body + public var body: Operations.GetSkill.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSchedules.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetSkill.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListSchedules.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetSkill.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListSchedules.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetSkill.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -74595,9 +83416,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -74613,26 +83434,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSchedules.Output.Conflict.Body + public var body: Operations.GetSkill.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSchedules.Output.Conflict.Body) { + public init(body: Operations.GetSkill.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListSchedules.Output.Conflict) + case conflict(Operations.GetSkill.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListSchedules.Output.Conflict { + public var conflict: Operations.GetSkill.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -74646,9 +83467,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -74664,26 +83485,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSchedules.Output.ContentTooLarge.Body + public var body: Operations.GetSkill.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSchedules.Output.ContentTooLarge.Body) { + public init(body: Operations.GetSkill.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListSchedules.Output.ContentTooLarge) + case contentTooLarge(Operations.GetSkill.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListSchedules.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetSkill.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -74697,9 +83518,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -74715,26 +83536,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSchedules.Output.InternalServerError.Body + public var body: Operations.GetSkill.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSchedules.Output.InternalServerError.Body) { + public init(body: Operations.GetSkill.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListSchedules.Output.InternalServerError) + case internalServerError(Operations.GetSkill.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListSchedules.Output.InternalServerError { + public var internalServerError: Operations.GetSkill.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -74748,9 +83569,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -74766,26 +83587,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSchedules.Output.ServiceUnavailable.Body + public var body: Operations.GetSkill.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSchedules.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetSkill.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/schedules/get(listSchedules)/responses/503`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListSchedules.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetSkill.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListSchedules.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetSkill.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -74835,141 +83656,170 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/schedules`. - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)`. - public enum CreateSchedule { - public static let id: Swift.String = "createSchedule" + /// - Remark: HTTP `PATCH /v1/skills/{id}`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)`. + public enum UpdateSkill { + public static let id: Swift.String = "updateSkill" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/header`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/path`. + public struct Path: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.UpdateSkill.Input.Path + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CreateSchedule.Input.Headers - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody`. + public var headers: Operations.UpdateSkill.Input.Headers + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/agentId`. - public var agentId: Swift.String - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/command`. - public var command: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/cron`. - public var cron: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/enabled`. - public var enabled: Swift.Bool? - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/eventSourceId`. - public var eventSourceId: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/kind`. - @frozen public enum KindPayload: String, Codable, Hashable, Sendable, CaseIterable { - case prompt = "prompt" - case script = "script" + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/DocumentsPayload`. + public struct DocumentsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/DocumentsPayload/content`. + public var content: Swift.String + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/DocumentsPayload/path`. + public var path: Swift.String + /// Creates a new `DocumentsPayloadPayload`. + /// + /// - Parameters: + /// - content: + /// - path: + public init( + content: Swift.String, + path: Swift.String + ) { + self.content = content + self.path = path + } + public enum CodingKeys: String, CodingKey { + case content + case path + } } - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/kind`. - public var kind: Operations.CreateSchedule.Input.Body.JsonPayload.KindPayload? - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/name`. - public var name: Swift.String - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/notify`. - public var notify: Swift.Bool? - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/prompt`. - public var prompt: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/runAt`. - public var runAt: Foundation.Date? - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/timeoutSeconds`. - public var timeoutSeconds: Swift.Int? - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/json/timezone`. - public var timezone: Swift.String? + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/documents`. + public typealias DocumentsPayload = [Operations.UpdateSkill.Input.Body.JsonPayload.DocumentsPayloadPayload] + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/documents`. + public var documents: Operations.UpdateSkill.Input.Body.JsonPayload.DocumentsPayload? + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/instructions`. + public var instructions: Swift.String? + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/name`. + public var name: Swift.String? /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - agentId: - /// - command: - /// - cron: - /// - enabled: - /// - eventSourceId: - /// - kind: + /// - description: + /// - documents: + /// - instructions: /// - name: - /// - notify: - /// - prompt: - /// - runAt: - /// - timeoutSeconds: - /// - timezone: public init( - agentId: Swift.String, - command: Swift.String? = nil, - cron: Swift.String? = nil, - enabled: Swift.Bool? = nil, - eventSourceId: Swift.String? = nil, - kind: Operations.CreateSchedule.Input.Body.JsonPayload.KindPayload? = nil, - name: Swift.String, - notify: Swift.Bool? = nil, - prompt: Swift.String? = nil, - runAt: Foundation.Date? = nil, - timeoutSeconds: Swift.Int? = nil, - timezone: Swift.String? = nil + description: Swift.String? = nil, + documents: Operations.UpdateSkill.Input.Body.JsonPayload.DocumentsPayload? = nil, + instructions: Swift.String? = nil, + name: Swift.String? = nil ) { - self.agentId = agentId - self.command = command - self.cron = cron - self.enabled = enabled - self.eventSourceId = eventSourceId - self.kind = kind + self.description = description + self.documents = documents + self.instructions = instructions self.name = name - self.notify = notify - self.prompt = prompt - self.runAt = runAt - self.timeoutSeconds = timeoutSeconds - self.timezone = timezone } public enum CodingKeys: String, CodingKey { - case agentId - case command - case cron - case enabled - case eventSourceId - case kind + case description + case documents + case instructions case name - case notify - case prompt - case runAt - case timeoutSeconds - case timezone } } - /// - Remark: Generated from `#/paths/v1/schedules/POST/requestBody/content/application\/json`. - case json(Operations.CreateSchedule.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/content/application\/json`. + case json(Operations.UpdateSkill.Input.Body.JsonPayload) } - public var body: Operations.CreateSchedule.Input.Body + public var body: Operations.UpdateSkill.Input.Body /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: /// - body: public init( - headers: Operations.CreateSchedule.Input.Headers = .init(), - body: Operations.CreateSchedule.Input.Body + path: Operations.UpdateSkill.Input.Path, + headers: Operations.UpdateSkill.Input.Headers = .init(), + body: Operations.UpdateSkill.Input.Body ) { + self.path = path self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/201/content/application\/json`. - case json(Components.Schemas.Schedule) + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json/createdAt`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json/id`. + public var id: Swift.String + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json/instructions`. + public var instructions: Swift.String + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json/name`. + public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json/updatedAt`. + public var updatedAt: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - createdAt: + /// - id: + /// - instructions: + /// - name: + /// - updatedAt: + public init( + createdAt: Swift.String, + id: Swift.String, + instructions: Swift.String, + name: Swift.String, + updatedAt: Swift.String + ) { + self.createdAt = createdAt + self.id = id + self.instructions = instructions + self.name = name + self.updatedAt = updatedAt + } + public enum CodingKeys: String, CodingKey { + case createdAt + case id + case instructions + case name + case updatedAt + } + } + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/application\/json`. + case json(Operations.UpdateSkill.Output.Ok.Body.JsonPayload?) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.Schedule { + public var json: Operations.UpdateSkill.Output.Ok.Body.JsonPayload? { get throws { switch self { case let .json(body): @@ -74979,42 +83829,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSchedule.Output.Created.Body - /// Creates a new `Created`. + public var body: Operations.UpdateSkill.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSchedule.Output.Created.Body) { + public init(body: Operations.UpdateSkill.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/201`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/200`. /// - /// HTTP response code: `201 created`. - case created(Operations.CreateSchedule.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `200 ok`. + case ok(Operations.UpdateSkill.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.CreateSchedule.Output.Created { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.UpdateSkill.Output.Ok { get throws { switch self { - case let .created(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -75030,26 +83880,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSchedule.Output.BadRequest.Body + public var body: Operations.UpdateSkill.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSchedule.Output.BadRequest.Body) { + public init(body: Operations.UpdateSkill.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CreateSchedule.Output.BadRequest) + case badRequest(Operations.UpdateSkill.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CreateSchedule.Output.BadRequest { + public var badRequest: Operations.UpdateSkill.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -75063,9 +83913,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -75081,26 +83931,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSchedule.Output.Unauthorized.Body + public var body: Operations.UpdateSkill.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSchedule.Output.Unauthorized.Body) { + public init(body: Operations.UpdateSkill.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CreateSchedule.Output.Unauthorized) + case unauthorized(Operations.UpdateSkill.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CreateSchedule.Output.Unauthorized { + public var unauthorized: Operations.UpdateSkill.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -75113,61 +83963,10 @@ public enum Operations { } } } - public struct Forbidden: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/403/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/403/content/application\/json`. - case json(Components.Schemas._Error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas._Error { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.CreateSchedule.Output.Forbidden.Body - /// Creates a new `Forbidden`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.CreateSchedule.Output.Forbidden.Body) { - self.body = body - } - } - /// Script tasks need coding jobs and must stay with their creator - /// - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/403`. - /// - /// HTTP response code: `403 forbidden`. - case forbidden(Operations.CreateSchedule.Output.Forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. - /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Operations.CreateSchedule.Output.Forbidden { - get throws { - switch self { - case let .forbidden(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", - response: self - ) - } - } - } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -75183,26 +83982,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSchedule.Output.NotFound.Body + public var body: Operations.UpdateSkill.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSchedule.Output.NotFound.Body) { + public init(body: Operations.UpdateSkill.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CreateSchedule.Output.NotFound) + case notFound(Operations.UpdateSkill.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CreateSchedule.Output.NotFound { + public var notFound: Operations.UpdateSkill.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -75216,9 +84015,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -75234,26 +84033,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSchedule.Output.MethodNotAllowed.Body + public var body: Operations.UpdateSkill.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSchedule.Output.MethodNotAllowed.Body) { + public init(body: Operations.UpdateSkill.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CreateSchedule.Output.MethodNotAllowed) + case methodNotAllowed(Operations.UpdateSkill.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CreateSchedule.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.UpdateSkill.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -75267,9 +84066,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -75285,26 +84084,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSchedule.Output.Conflict.Body + public var body: Operations.UpdateSkill.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSchedule.Output.Conflict.Body) { + public init(body: Operations.UpdateSkill.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CreateSchedule.Output.Conflict) + case conflict(Operations.UpdateSkill.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CreateSchedule.Output.Conflict { + public var conflict: Operations.UpdateSkill.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -75318,9 +84117,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -75336,26 +84135,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSchedule.Output.ContentTooLarge.Body + public var body: Operations.UpdateSkill.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSchedule.Output.ContentTooLarge.Body) { + public init(body: Operations.UpdateSkill.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CreateSchedule.Output.ContentTooLarge) + case contentTooLarge(Operations.UpdateSkill.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CreateSchedule.Output.ContentTooLarge { + public var contentTooLarge: Operations.UpdateSkill.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -75369,9 +84168,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -75387,26 +84186,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSchedule.Output.InternalServerError.Body + public var body: Operations.UpdateSkill.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSchedule.Output.InternalServerError.Body) { + public init(body: Operations.UpdateSkill.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CreateSchedule.Output.InternalServerError) + case internalServerError(Operations.UpdateSkill.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CreateSchedule.Output.InternalServerError { + public var internalServerError: Operations.UpdateSkill.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -75420,9 +84219,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -75438,26 +84237,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSchedule.Output.ServiceUnavailable.Body + public var body: Operations.UpdateSkill.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSchedule.Output.ServiceUnavailable.Body) { + public init(body: Operations.UpdateSkill.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/schedules/post(createSchedule)/responses/503`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CreateSchedule.Output.ServiceUnavailable) + case serviceUnavailable(Operations.UpdateSkill.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CreateSchedule.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.UpdateSkill.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -75507,14 +84306,14 @@ public enum Operations { } } } - /// - Remark: HTTP `PATCH /v1/schedules/{id}`. - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)`. - public enum UpdateSchedule { - public static let id: Swift.String = "updateSchedule" + /// - Remark: HTTP `DELETE /v1/skills/{id}`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)`. + public enum DeleteSkill { + public static let id: Swift.String = "deleteSkill" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/path`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/path/id`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -75524,299 +84323,72 @@ public enum Operations { self.id = id } } - public var path: Operations.UpdateSchedule.Input.Path - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/header`. + public var path: Operations.DeleteSkill.Input.Path + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateSchedule.Input.Headers - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/agentId`. - public var agentId: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/command`. - public var command: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/cron`. - public var cron: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/enabled`. - public var enabled: Swift.Bool? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/eventSourceId`. - public var eventSourceId: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/kind`. - @frozen public enum KindPayload: String, Codable, Hashable, Sendable, CaseIterable { - case prompt = "prompt" - case script = "script" - } - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/kind`. - public var kind: Operations.UpdateSchedule.Input.Body.JsonPayload.KindPayload? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/notify`. - public var notify: Swift.Bool? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/prompt`. - public var prompt: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/runAt`. - public var runAt: Foundation.Date? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/timeoutSeconds`. - public var timeoutSeconds: Swift.Int? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/json/timezone`. - public var timezone: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - agentId: - /// - command: - /// - cron: - /// - enabled: - /// - eventSourceId: - /// - kind: - /// - name: - /// - notify: - /// - prompt: - /// - runAt: - /// - timeoutSeconds: - /// - timezone: - public init( - agentId: Swift.String? = nil, - command: Swift.String? = nil, - cron: Swift.String? = nil, - enabled: Swift.Bool? = nil, - eventSourceId: Swift.String? = nil, - kind: Operations.UpdateSchedule.Input.Body.JsonPayload.KindPayload? = nil, - name: Swift.String? = nil, - notify: Swift.Bool? = nil, - prompt: Swift.String? = nil, - runAt: Foundation.Date? = nil, - timeoutSeconds: Swift.Int? = nil, - timezone: Swift.String? = nil - ) { - self.agentId = agentId - self.command = command - self.cron = cron - self.enabled = enabled - self.eventSourceId = eventSourceId - self.kind = kind - self.name = name - self.notify = notify - self.prompt = prompt - self.runAt = runAt - self.timeoutSeconds = timeoutSeconds - self.timezone = timezone - } - public enum CodingKeys: String, CodingKey { - case agentId - case command - case cron - case enabled - case eventSourceId - case kind - case name - case notify - case prompt - case runAt - case timeoutSeconds - case timezone - } - } - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/requestBody/content/application\/json`. - case json(Operations.UpdateSchedule.Input.Body.JsonPayload) - } - public var body: Operations.UpdateSchedule.Input.Body + public var headers: Operations.DeleteSkill.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.UpdateSchedule.Input.Path, - headers: Operations.UpdateSchedule.Input.Headers = .init(), - body: Operations.UpdateSchedule.Input.Body + path: Operations.DeleteSkill.Input.Path, + headers: Operations.DeleteSkill.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/agentId`. - public var agentId: Swift.String - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/command`. - public var command: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/createdAt`. - public var createdAt: Swift.String - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/createdByAgentId`. - public var createdByAgentId: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/cron`. - public var cron: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/enabled`. - public var enabled: Swift.Bool - /// The event source whose events start this automation; set instead of `cron` and `runAt`. - /// - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/eventSourceId`. - public var eventSourceId: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/id`. - public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/kind`. - @frozen public enum KindPayload: String, Codable, Hashable, Sendable, CaseIterable { - case prompt = "prompt" - case script = "script" - } - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/kind`. - public var kind: Operations.UpdateSchedule.Output.Ok.Body.JsonPayload.KindPayload - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/name`. - public var name: Swift.String - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/nextRunAt`. - public var nextRunAt: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/notify`. - public var notify: Swift.Bool - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/prompt`. - public var prompt: Swift.String - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/runAt`. - public var runAt: Swift.String? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/timeoutSeconds`. - public var timeoutSeconds: Swift.Int - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/json/timezone`. - public var timezone: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - agentId: - /// - command: - /// - createdAt: - /// - createdByAgentId: - /// - cron: - /// - enabled: - /// - eventSourceId: The event source whose events start this automation; set instead of `cron` and `runAt`. - /// - id: - /// - kind: - /// - name: - /// - nextRunAt: - /// - notify: - /// - prompt: - /// - runAt: - /// - timeoutSeconds: - /// - timezone: - public init( - agentId: Swift.String, - command: Swift.String? = nil, - createdAt: Swift.String, - createdByAgentId: Swift.String? = nil, - cron: Swift.String? = nil, - enabled: Swift.Bool, - eventSourceId: Swift.String? = nil, - id: Swift.String, - kind: Operations.UpdateSchedule.Output.Ok.Body.JsonPayload.KindPayload, - name: Swift.String, - nextRunAt: Swift.String? = nil, - notify: Swift.Bool, - prompt: Swift.String, - runAt: Swift.String? = nil, - timeoutSeconds: Swift.Int, - timezone: Swift.String - ) { - self.agentId = agentId - self.command = command - self.createdAt = createdAt - self.createdByAgentId = createdByAgentId - self.cron = cron - self.enabled = enabled - self.eventSourceId = eventSourceId - self.id = id - self.kind = kind - self.name = name - self.nextRunAt = nextRunAt - self.notify = notify - self.prompt = prompt - self.runAt = runAt - self.timeoutSeconds = timeoutSeconds - self.timezone = timezone - } - public enum CodingKeys: String, CodingKey { - case agentId - case command - case createdAt - case createdByAgentId - case cron - case enabled - case eventSourceId - case id - case kind - case name - case nextRunAt - case notify - case prompt - case runAt - case timeoutSeconds - case timezone - } - } - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/200/content/application\/json`. - case json(Operations.UpdateSchedule.Output.Ok.Body.JsonPayload?) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.UpdateSchedule.Output.Ok.Body.JsonPayload? { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.UpdateSchedule.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.UpdateSchedule.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/200`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.UpdateSchedule.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.DeleteSkill.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateSchedule.Output.Ok { + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.DeleteSkill.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -75832,26 +84404,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSchedule.Output.BadRequest.Body + public var body: Operations.DeleteSkill.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSchedule.Output.BadRequest.Body) { + public init(body: Operations.DeleteSkill.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateSchedule.Output.BadRequest) + case badRequest(Operations.DeleteSkill.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateSchedule.Output.BadRequest { + public var badRequest: Operations.DeleteSkill.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -75865,9 +84437,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -75883,26 +84455,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSchedule.Output.Unauthorized.Body + public var body: Operations.DeleteSkill.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSchedule.Output.Unauthorized.Body) { + public init(body: Operations.DeleteSkill.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateSchedule.Output.Unauthorized) + case unauthorized(Operations.DeleteSkill.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateSchedule.Output.Unauthorized { + public var unauthorized: Operations.DeleteSkill.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -75915,61 +84487,10 @@ public enum Operations { } } } - public struct Forbidden: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/403/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/403/content/application\/json`. - case json(Components.Schemas._Error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas._Error { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.UpdateSchedule.Output.Forbidden.Body - /// Creates a new `Forbidden`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.UpdateSchedule.Output.Forbidden.Body) { - self.body = body - } - } - /// Script tasks need coding jobs and must stay with their creator - /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/403`. - /// - /// HTTP response code: `403 forbidden`. - case forbidden(Operations.UpdateSchedule.Output.Forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. - /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Operations.UpdateSchedule.Output.Forbidden { - get throws { - switch self { - case let .forbidden(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", - response: self - ) - } - } - } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -75985,26 +84506,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSchedule.Output.NotFound.Body + public var body: Operations.DeleteSkill.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSchedule.Output.NotFound.Body) { + public init(body: Operations.DeleteSkill.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateSchedule.Output.NotFound) + case notFound(Operations.DeleteSkill.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateSchedule.Output.NotFound { + public var notFound: Operations.DeleteSkill.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -76018,9 +84539,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76036,26 +84557,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSchedule.Output.MethodNotAllowed.Body + public var body: Operations.DeleteSkill.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSchedule.Output.MethodNotAllowed.Body) { + public init(body: Operations.DeleteSkill.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateSchedule.Output.MethodNotAllowed) + case methodNotAllowed(Operations.DeleteSkill.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateSchedule.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.DeleteSkill.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -76069,9 +84590,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76087,26 +84608,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSchedule.Output.Conflict.Body + public var body: Operations.DeleteSkill.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSchedule.Output.Conflict.Body) { + public init(body: Operations.DeleteSkill.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateSchedule.Output.Conflict) + case conflict(Operations.DeleteSkill.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateSchedule.Output.Conflict { + public var conflict: Operations.DeleteSkill.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -76120,9 +84641,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -76138,26 +84659,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSchedule.Output.ContentTooLarge.Body + public var body: Operations.DeleteSkill.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSchedule.Output.ContentTooLarge.Body) { + public init(body: Operations.DeleteSkill.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateSchedule.Output.ContentTooLarge) + case contentTooLarge(Operations.DeleteSkill.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateSchedule.Output.ContentTooLarge { + public var contentTooLarge: Operations.DeleteSkill.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -76171,9 +84692,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76189,26 +84710,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSchedule.Output.InternalServerError.Body + public var body: Operations.DeleteSkill.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSchedule.Output.InternalServerError.Body) { + public init(body: Operations.DeleteSkill.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateSchedule.Output.InternalServerError) + case internalServerError(Operations.DeleteSkill.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateSchedule.Output.InternalServerError { + public var internalServerError: Operations.DeleteSkill.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -76222,9 +84743,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/PATCH/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76240,26 +84761,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSchedule.Output.ServiceUnavailable.Body + public var body: Operations.DeleteSkill.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSchedule.Output.ServiceUnavailable.Body) { + public init(body: Operations.DeleteSkill.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/patch(updateSchedule)/responses/503`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateSchedule.Output.ServiceUnavailable) + case serviceUnavailable(Operations.DeleteSkill.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateSchedule.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.DeleteSkill.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -76309,14 +84830,16 @@ public enum Operations { } } } - /// - Remark: HTTP `DELETE /v1/schedules/{id}`. - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)`. - public enum DeleteSchedule { - public static let id: Swift.String = "deleteSchedule" + /// Turns a shared skill on or off for one bot. For a bot-owned skill, assignment copies the full package and records its source ID; an existing linked copy is left unchanged. Removal deletes only direct linked copies, never name matches or the source. Source deletion leaves copies and their provenance intact. Default skills cannot be assigned. Each request is independent, so clients can report partial failures and retry safely. + /// + /// - Remark: HTTP `POST /v1/skills/{id}/assignment`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)`. + public enum AssignSkillBot { + public static let id: Swift.String = "assignSkillBot" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/path`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/path/id`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -76326,72 +84849,150 @@ public enum Operations { self.id = id } } - public var path: Operations.DeleteSchedule.Input.Path - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/header`. + public var path: Operations.AssignSkillBot.Input.Path + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteSchedule.Input.Headers + public var headers: Operations.AssignSkillBot.Input.Headers + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/requestBody/json/assigned`. + public var assigned: Swift.Bool + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/requestBody/json/botId`. + public var botId: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - assigned: + /// - botId: + public init( + assigned: Swift.Bool, + botId: Swift.String + ) { + self.assigned = assigned + self.botId = botId + } + public enum CodingKeys: String, CodingKey { + case assigned + case botId + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.assigned = try container.decode( + Swift.Bool.self, + forKey: .assigned + ) + self.botId = try container.decode( + Swift.String.self, + forKey: .botId + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "assigned", + "botId" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/requestBody/content/application\/json`. + case json(Operations.AssignSkillBot.Input.Body.JsonPayload) + } + public var body: Operations.AssignSkillBot.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.DeleteSchedule.Input.Path, - headers: Operations.DeleteSchedule.Input.Headers = .init() + path: Operations.AssignSkillBot.Input.Path, + headers: Operations.AssignSkillBot.Input.Headers = .init(), + body: Operations.AssignSkillBot.Input.Body ) { self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/200/content/json/skipped`. + public var skipped: Swift.Bool + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - skipped: + public init(skipped: Swift.Bool) { + self.skipped = skipped + } + public enum CodingKeys: String, CodingKey { + case skipped + } + } + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/200/content/application\/json`. + case json(Operations.AssignSkillBot.Output.Ok.Body.JsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.AssignSkillBot.Output.Ok.Body.JsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.AssignSkillBot.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.AssignSkillBot.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteSchedule.Output.NoContent) - /// Success, no response body + /// Success /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/204`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.AssignSkillBot.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteSchedule.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.AssignSkillBot.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76407,26 +85008,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSchedule.Output.BadRequest.Body + public var body: Operations.AssignSkillBot.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSchedule.Output.BadRequest.Body) { + public init(body: Operations.AssignSkillBot.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteSchedule.Output.BadRequest) + case badRequest(Operations.AssignSkillBot.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteSchedule.Output.BadRequest { + public var badRequest: Operations.AssignSkillBot.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -76440,9 +85041,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -76458,26 +85059,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSchedule.Output.Unauthorized.Body + public var body: Operations.AssignSkillBot.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSchedule.Output.Unauthorized.Body) { + public init(body: Operations.AssignSkillBot.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteSchedule.Output.Unauthorized) + case unauthorized(Operations.AssignSkillBot.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteSchedule.Output.Unauthorized { + public var unauthorized: Operations.AssignSkillBot.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -76491,9 +85092,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76509,26 +85110,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSchedule.Output.NotFound.Body + public var body: Operations.AssignSkillBot.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSchedule.Output.NotFound.Body) { + public init(body: Operations.AssignSkillBot.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteSchedule.Output.NotFound) + case notFound(Operations.AssignSkillBot.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteSchedule.Output.NotFound { + public var notFound: Operations.AssignSkillBot.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -76542,9 +85143,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76560,26 +85161,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSchedule.Output.MethodNotAllowed.Body + public var body: Operations.AssignSkillBot.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSchedule.Output.MethodNotAllowed.Body) { + public init(body: Operations.AssignSkillBot.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteSchedule.Output.MethodNotAllowed) + case methodNotAllowed(Operations.AssignSkillBot.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteSchedule.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.AssignSkillBot.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -76593,9 +85194,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76611,26 +85212,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSchedule.Output.Conflict.Body + public var body: Operations.AssignSkillBot.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSchedule.Output.Conflict.Body) { + public init(body: Operations.AssignSkillBot.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteSchedule.Output.Conflict) + case conflict(Operations.AssignSkillBot.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteSchedule.Output.Conflict { + public var conflict: Operations.AssignSkillBot.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -76644,9 +85245,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -76662,26 +85263,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSchedule.Output.ContentTooLarge.Body + public var body: Operations.AssignSkillBot.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSchedule.Output.ContentTooLarge.Body) { + public init(body: Operations.AssignSkillBot.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteSchedule.Output.ContentTooLarge) + case contentTooLarge(Operations.AssignSkillBot.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteSchedule.Output.ContentTooLarge { + public var contentTooLarge: Operations.AssignSkillBot.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -76695,9 +85296,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76713,26 +85314,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSchedule.Output.InternalServerError.Body + public var body: Operations.AssignSkillBot.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSchedule.Output.InternalServerError.Body) { + public init(body: Operations.AssignSkillBot.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteSchedule.Output.InternalServerError) + case internalServerError(Operations.AssignSkillBot.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteSchedule.Output.InternalServerError { + public var internalServerError: Operations.AssignSkillBot.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -76746,9 +85347,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76764,26 +85365,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSchedule.Output.ServiceUnavailable.Body + public var body: Operations.AssignSkillBot.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSchedule.Output.ServiceUnavailable.Body) { + public init(body: Operations.AssignSkillBot.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/delete(deleteSchedule)/responses/503`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteSchedule.Output.ServiceUnavailable) + case serviceUnavailable(Operations.AssignSkillBot.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteSchedule.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.AssignSkillBot.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -76833,14 +85434,16 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/schedules/{id}/run`. - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)`. - public enum RunSchedule { - public static let id: Swift.String = "runSchedule" + /// The upstream version an installed skill would update to. + /// + /// - Remark: HTTP `GET /v1/skills/{id}/update`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)`. + public enum GetPendingSkillUpdate { + public static let id: Swift.String = "getPendingSkillUpdate" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/path`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/path/id`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -76850,43 +85453,43 @@ public enum Operations { self.id = id } } - public var path: Operations.RunSchedule.Input.Path - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/header`. + public var path: Operations.GetPendingSkillUpdate.Input.Path + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.RunSchedule.Input.Headers + public var headers: Operations.GetPendingSkillUpdate.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.RunSchedule.Input.Path, - headers: Operations.RunSchedule.Input.Headers = .init() + path: Operations.GetPendingSkillUpdate.Input.Path, + headers: Operations.GetPendingSkillUpdate.Input.Headers = .init() ) { self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Accepted: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/202/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/202/content/application\/json`. - case json(Components.Schemas.ScheduleRun) + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/200/content/application\/json`. + case json(Components.Schemas.PendingSkillUpdate) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.ScheduleRun { + public var json: Components.Schemas.PendingSkillUpdate { get throws { switch self { case let .json(body): @@ -76896,42 +85499,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RunSchedule.Output.Accepted.Body - /// Creates a new `Accepted`. + public var body: Operations.GetPendingSkillUpdate.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RunSchedule.Output.Accepted.Body) { + public init(body: Operations.GetPendingSkillUpdate.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/202`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/200`. /// - /// HTTP response code: `202 accepted`. - case accepted(Operations.RunSchedule.Output.Accepted) - /// The associated value of the enum case if `self` is `.accepted`. + /// HTTP response code: `200 ok`. + case ok(Operations.GetPendingSkillUpdate.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.accepted`. - /// - SeeAlso: `.accepted`. - public var accepted: Operations.RunSchedule.Output.Accepted { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.GetPendingSkillUpdate.Output.Ok { get throws { switch self { - case let .accepted(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "accepted", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -76947,26 +85550,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RunSchedule.Output.BadRequest.Body + public var body: Operations.GetPendingSkillUpdate.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RunSchedule.Output.BadRequest.Body) { + public init(body: Operations.GetPendingSkillUpdate.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.RunSchedule.Output.BadRequest) + case badRequest(Operations.GetPendingSkillUpdate.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.RunSchedule.Output.BadRequest { + public var badRequest: Operations.GetPendingSkillUpdate.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -76980,9 +85583,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -76998,26 +85601,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RunSchedule.Output.Unauthorized.Body + public var body: Operations.GetPendingSkillUpdate.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RunSchedule.Output.Unauthorized.Body) { + public init(body: Operations.GetPendingSkillUpdate.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.RunSchedule.Output.Unauthorized) + case unauthorized(Operations.GetPendingSkillUpdate.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.RunSchedule.Output.Unauthorized { + public var unauthorized: Operations.GetPendingSkillUpdate.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -77031,9 +85634,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77049,26 +85652,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RunSchedule.Output.NotFound.Body + public var body: Operations.GetPendingSkillUpdate.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RunSchedule.Output.NotFound.Body) { + public init(body: Operations.GetPendingSkillUpdate.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.RunSchedule.Output.NotFound) + case notFound(Operations.GetPendingSkillUpdate.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.RunSchedule.Output.NotFound { + public var notFound: Operations.GetPendingSkillUpdate.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -77082,9 +85685,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77100,26 +85703,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RunSchedule.Output.MethodNotAllowed.Body + public var body: Operations.GetPendingSkillUpdate.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RunSchedule.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetPendingSkillUpdate.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.RunSchedule.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetPendingSkillUpdate.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.RunSchedule.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetPendingSkillUpdate.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -77133,9 +85736,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77151,26 +85754,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RunSchedule.Output.Conflict.Body + public var body: Operations.GetPendingSkillUpdate.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RunSchedule.Output.Conflict.Body) { + public init(body: Operations.GetPendingSkillUpdate.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.RunSchedule.Output.Conflict) + case conflict(Operations.GetPendingSkillUpdate.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.RunSchedule.Output.Conflict { + public var conflict: Operations.GetPendingSkillUpdate.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -77184,9 +85787,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -77202,26 +85805,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RunSchedule.Output.ContentTooLarge.Body + public var body: Operations.GetPendingSkillUpdate.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RunSchedule.Output.ContentTooLarge.Body) { + public init(body: Operations.GetPendingSkillUpdate.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.RunSchedule.Output.ContentTooLarge) + case contentTooLarge(Operations.GetPendingSkillUpdate.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.RunSchedule.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetPendingSkillUpdate.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -77235,9 +85838,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77253,26 +85856,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RunSchedule.Output.InternalServerError.Body + public var body: Operations.GetPendingSkillUpdate.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RunSchedule.Output.InternalServerError.Body) { + public init(body: Operations.GetPendingSkillUpdate.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.RunSchedule.Output.InternalServerError) + case internalServerError(Operations.GetPendingSkillUpdate.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.RunSchedule.Output.InternalServerError { + public var internalServerError: Operations.GetPendingSkillUpdate.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -77286,9 +85889,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/run/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77304,26 +85907,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.RunSchedule.Output.ServiceUnavailable.Body + public var body: Operations.GetPendingSkillUpdate.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.RunSchedule.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetPendingSkillUpdate.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/run/post(runSchedule)/responses/503`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.RunSchedule.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetPendingSkillUpdate.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.RunSchedule.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetPendingSkillUpdate.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -77373,16 +85976,16 @@ public enum Operations { } } } - /// Script task runs from the last 90 days, newest first. Page with `before` set to the last run's ID. An unknown ID returns an empty list. + /// Replaces an installed skill with its upstream version, recorded as a change the owner can revert. /// - /// - Remark: HTTP `GET /v1/schedules/{id}/runs`. - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)`. - public enum ListScriptRuns { - public static let id: Swift.String = "listScriptRuns" + /// - Remark: HTTP `POST /v1/skills/{id}/update`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)`. + public enum ApplySkillUpdate { + public static let id: Swift.String = "applySkillUpdate" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/path`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/path/id`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/path/id`. public var id: Swift.String /// Creates a new `Path`. /// @@ -77392,66 +85995,43 @@ public enum Operations { self.id = id } } - public var path: Operations.ListScriptRuns.Input.Path - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/query/limit`. - public var limit: Swift.Int? - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/query/before`. - public var before: Swift.String? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - limit: - /// - before: - public init( - limit: Swift.Int? = nil, - before: Swift.String? = nil - ) { - self.limit = limit - self.before = before - } - } - public var query: Operations.ListScriptRuns.Input.Query - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/header`. + public var path: Operations.ApplySkillUpdate.Input.Path + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListScriptRuns.Input.Headers + public var headers: Operations.ApplySkillUpdate.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - query: /// - headers: public init( - path: Operations.ListScriptRuns.Input.Path, - query: Operations.ListScriptRuns.Input.Query = .init(), - headers: Operations.ListScriptRuns.Input.Headers = .init() + path: Operations.ApplySkillUpdate.Input.Path, + headers: Operations.ApplySkillUpdate.Input.Headers = .init() ) { self.path = path - self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/200/content/application\/json`. - case json([Components.Schemas.ScriptRun]) + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/200/content/application\/json`. + case json(Components.Schemas.SkillPackage) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.ScriptRun] { + public var json: Components.Schemas.SkillPackage { get throws { switch self { case let .json(body): @@ -77461,26 +86041,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListScriptRuns.Output.Ok.Body + public var body: Operations.ApplySkillUpdate.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListScriptRuns.Output.Ok.Body) { + public init(body: Operations.ApplySkillUpdate.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/200`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListScriptRuns.Output.Ok) + case ok(Operations.ApplySkillUpdate.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListScriptRuns.Output.Ok { + public var ok: Operations.ApplySkillUpdate.Output.Ok { get throws { switch self { case let .ok(response): @@ -77494,9 +86074,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77512,26 +86092,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListScriptRuns.Output.BadRequest.Body + public var body: Operations.ApplySkillUpdate.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListScriptRuns.Output.BadRequest.Body) { + public init(body: Operations.ApplySkillUpdate.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/400`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListScriptRuns.Output.BadRequest) + case badRequest(Operations.ApplySkillUpdate.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListScriptRuns.Output.BadRequest { + public var badRequest: Operations.ApplySkillUpdate.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -77545,9 +86125,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -77563,26 +86143,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListScriptRuns.Output.Unauthorized.Body + public var body: Operations.ApplySkillUpdate.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListScriptRuns.Output.Unauthorized.Body) { + public init(body: Operations.ApplySkillUpdate.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/401`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListScriptRuns.Output.Unauthorized) + case unauthorized(Operations.ApplySkillUpdate.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListScriptRuns.Output.Unauthorized { + public var unauthorized: Operations.ApplySkillUpdate.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -77596,9 +86176,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77614,26 +86194,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListScriptRuns.Output.NotFound.Body + public var body: Operations.ApplySkillUpdate.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListScriptRuns.Output.NotFound.Body) { + public init(body: Operations.ApplySkillUpdate.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/404`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListScriptRuns.Output.NotFound) + case notFound(Operations.ApplySkillUpdate.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListScriptRuns.Output.NotFound { + public var notFound: Operations.ApplySkillUpdate.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -77647,9 +86227,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77665,26 +86245,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListScriptRuns.Output.MethodNotAllowed.Body + public var body: Operations.ApplySkillUpdate.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListScriptRuns.Output.MethodNotAllowed.Body) { + public init(body: Operations.ApplySkillUpdate.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/405`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListScriptRuns.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ApplySkillUpdate.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListScriptRuns.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ApplySkillUpdate.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -77698,9 +86278,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77716,26 +86296,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListScriptRuns.Output.Conflict.Body + public var body: Operations.ApplySkillUpdate.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListScriptRuns.Output.Conflict.Body) { + public init(body: Operations.ApplySkillUpdate.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/409`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListScriptRuns.Output.Conflict) + case conflict(Operations.ApplySkillUpdate.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListScriptRuns.Output.Conflict { + public var conflict: Operations.ApplySkillUpdate.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -77749,9 +86329,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -77767,26 +86347,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListScriptRuns.Output.ContentTooLarge.Body + public var body: Operations.ApplySkillUpdate.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListScriptRuns.Output.ContentTooLarge.Body) { + public init(body: Operations.ApplySkillUpdate.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/413`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListScriptRuns.Output.ContentTooLarge) + case contentTooLarge(Operations.ApplySkillUpdate.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListScriptRuns.Output.ContentTooLarge { + public var contentTooLarge: Operations.ApplySkillUpdate.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -77800,9 +86380,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77818,26 +86398,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListScriptRuns.Output.InternalServerError.Body + public var body: Operations.ApplySkillUpdate.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListScriptRuns.Output.InternalServerError.Body) { + public init(body: Operations.ApplySkillUpdate.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/500`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListScriptRuns.Output.InternalServerError) + case internalServerError(Operations.ApplySkillUpdate.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListScriptRuns.Output.InternalServerError { + public var internalServerError: Operations.ApplySkillUpdate.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -77851,9 +86431,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/schedules/{id}/runs/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -77869,26 +86449,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListScriptRuns.Output.ServiceUnavailable.Body + public var body: Operations.ApplySkillUpdate.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListScriptRuns.Output.ServiceUnavailable.Body) { + public init(body: Operations.ApplySkillUpdate.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/schedules/{id}/runs/get(listScriptRuns)/responses/503`. + /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListScriptRuns.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ApplySkillUpdate.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListScriptRuns.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ApplySkillUpdate.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -77938,42 +86518,44 @@ public enum Operations { } } } - /// - Remark: HTTP `GET /v1/skills`. - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)`. - public enum ListSkills { - public static let id: Swift.String = "listSkills" + /// The account's vision model, which describes images for bots whose model can't read them, and the models that read images the account's provider keys reach. + /// + /// - Remark: HTTP `GET /v1/vision-model`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)`. + public enum GetVisionModel { + public static let id: Swift.String = "getVisionModel" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/header`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ListSkills.Input.Headers + public var headers: Operations.GetVisionModel.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - headers: - public init(headers: Operations.ListSkills.Input.Headers = .init()) { + public init(headers: Operations.GetVisionModel.Input.Headers = .init()) { self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/200/content/application\/json`. - case json([Components.Schemas.ListedSkill]) + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/200/content/application\/json`. + case json(Components.Schemas.VisionModel) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.ListedSkill] { + public var json: Components.Schemas.VisionModel { get throws { switch self { case let .json(body): @@ -77983,26 +86565,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSkills.Output.Ok.Body + public var body: Operations.GetVisionModel.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSkills.Output.Ok.Body) { + public init(body: Operations.GetVisionModel.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/200`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ListSkills.Output.Ok) + case ok(Operations.GetVisionModel.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ListSkills.Output.Ok { + public var ok: Operations.GetVisionModel.Output.Ok { get throws { switch self { case let .ok(response): @@ -78016,9 +86598,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78034,26 +86616,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSkills.Output.BadRequest.Body + public var body: Operations.GetVisionModel.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSkills.Output.BadRequest.Body) { + public init(body: Operations.GetVisionModel.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/400`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ListSkills.Output.BadRequest) + case badRequest(Operations.GetVisionModel.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ListSkills.Output.BadRequest { + public var badRequest: Operations.GetVisionModel.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -78067,9 +86649,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -78085,26 +86667,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSkills.Output.Unauthorized.Body + public var body: Operations.GetVisionModel.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSkills.Output.Unauthorized.Body) { + public init(body: Operations.GetVisionModel.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/401`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ListSkills.Output.Unauthorized) + case unauthorized(Operations.GetVisionModel.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ListSkills.Output.Unauthorized { + public var unauthorized: Operations.GetVisionModel.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -78118,9 +86700,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78136,26 +86718,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSkills.Output.NotFound.Body + public var body: Operations.GetVisionModel.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSkills.Output.NotFound.Body) { + public init(body: Operations.GetVisionModel.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/404`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ListSkills.Output.NotFound) + case notFound(Operations.GetVisionModel.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ListSkills.Output.NotFound { + public var notFound: Operations.GetVisionModel.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -78169,9 +86751,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78187,26 +86769,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSkills.Output.MethodNotAllowed.Body + public var body: Operations.GetVisionModel.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSkills.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetVisionModel.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/405`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ListSkills.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetVisionModel.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ListSkills.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetVisionModel.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -78220,9 +86802,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78238,26 +86820,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSkills.Output.Conflict.Body + public var body: Operations.GetVisionModel.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSkills.Output.Conflict.Body) { + public init(body: Operations.GetVisionModel.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/409`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ListSkills.Output.Conflict) + case conflict(Operations.GetVisionModel.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ListSkills.Output.Conflict { + public var conflict: Operations.GetVisionModel.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -78271,9 +86853,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -78289,26 +86871,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSkills.Output.ContentTooLarge.Body + public var body: Operations.GetVisionModel.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSkills.Output.ContentTooLarge.Body) { + public init(body: Operations.GetVisionModel.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/413`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ListSkills.Output.ContentTooLarge) + case contentTooLarge(Operations.GetVisionModel.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ListSkills.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetVisionModel.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -78322,9 +86904,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78340,26 +86922,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSkills.Output.InternalServerError.Body + public var body: Operations.GetVisionModel.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSkills.Output.InternalServerError.Body) { + public init(body: Operations.GetVisionModel.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/500`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ListSkills.Output.InternalServerError) + case internalServerError(Operations.GetVisionModel.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ListSkills.Output.InternalServerError { + public var internalServerError: Operations.GetVisionModel.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -78373,9 +86955,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78391,26 +86973,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ListSkills.Output.ServiceUnavailable.Body + public var body: Operations.GetVisionModel.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ListSkills.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetVisionModel.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/get(listSkills)/responses/503`. + /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ListSkills.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetVisionModel.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ListSkills.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetVisionModel.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -78460,113 +87042,93 @@ public enum Operations { } } } - /// - Remark: HTTP `POST /v1/skills`. - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)`. - public enum CreateSkill { - public static let id: Swift.String = "createSkill" + /// Choose the account's vision model, or turn it off with null. It must be one of the choices `getVisionModel` lists. + /// + /// - Remark: HTTP `PUT /v1/vision-model`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)`. + public enum UpdateVisionModel { + public static let id: Swift.String = "updateVisionModel" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/header`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CreateSkill.Input.Headers - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody`. + public var headers: Operations.UpdateVisionModel.Input.Headers + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/DocumentsPayload`. - public struct DocumentsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/DocumentsPayload/content`. - public var content: Swift.String - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/DocumentsPayload/path`. - public var path: Swift.String - /// Creates a new `DocumentsPayloadPayload`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/json/visionModel`. + public struct VisionModelPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/json/visionModel/model`. + public var model: Swift.String + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/json/visionModel/provider`. + public var provider: Swift.String + /// Creates a new `VisionModelPayload`. /// /// - Parameters: - /// - content: - /// - path: + /// - model: + /// - provider: public init( - content: Swift.String, - path: Swift.String + model: Swift.String, + provider: Swift.String ) { - self.content = content - self.path = path + self.model = model + self.provider = provider } public enum CodingKeys: String, CodingKey { - case content - case path + case model + case provider } } - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/documents`. - public typealias DocumentsPayload = [Operations.CreateSkill.Input.Body.JsonPayload.DocumentsPayloadPayload] - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/documents`. - public var documents: Operations.CreateSkill.Input.Body.JsonPayload.DocumentsPayload? - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/instructions`. - public var instructions: Swift.String - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/json/name`. - public var name: Swift.String + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/json/visionModel`. + public var visionModel: Operations.UpdateVisionModel.Input.Body.JsonPayload.VisionModelPayload? /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - description: - /// - documents: - /// - instructions: - /// - name: - public init( - description: Swift.String? = nil, - documents: Operations.CreateSkill.Input.Body.JsonPayload.DocumentsPayload? = nil, - instructions: Swift.String, - name: Swift.String - ) { - self.description = description - self.documents = documents - self.instructions = instructions - self.name = name + /// - visionModel: + public init(visionModel: Operations.UpdateVisionModel.Input.Body.JsonPayload.VisionModelPayload? = nil) { + self.visionModel = visionModel } public enum CodingKeys: String, CodingKey { - case description - case documents - case instructions - case name + case visionModel } } - /// - Remark: Generated from `#/paths/v1/skills/POST/requestBody/content/application\/json`. - case json(Operations.CreateSkill.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/content/application\/json`. + case json(Operations.UpdateVisionModel.Input.Body.JsonPayload) } - public var body: Operations.CreateSkill.Input.Body + public var body: Operations.UpdateVisionModel.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - headers: /// - body: public init( - headers: Operations.CreateSkill.Input.Headers = .init(), - body: Operations.CreateSkill.Input.Body + headers: Operations.UpdateVisionModel.Input.Headers = .init(), + body: Operations.UpdateVisionModel.Input.Body ) { self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/201/content/application\/json`. - case json(Components.Schemas.Skill) + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.VisionModel) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.Skill { + public var json: Components.Schemas.VisionModel { get throws { switch self { case let .json(body): @@ -78576,42 +87138,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSkill.Output.Created.Body - /// Creates a new `Created`. + public var body: Operations.UpdateVisionModel.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSkill.Output.Created.Body) { + public init(body: Operations.UpdateVisionModel.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/201`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/200`. /// - /// HTTP response code: `201 created`. - case created(Operations.CreateSkill.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `200 ok`. + case ok(Operations.UpdateVisionModel.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.CreateSkill.Output.Created { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.UpdateVisionModel.Output.Ok { get throws { switch self { - case let .created(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78627,26 +87189,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSkill.Output.BadRequest.Body + public var body: Operations.UpdateVisionModel.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSkill.Output.BadRequest.Body) { + public init(body: Operations.UpdateVisionModel.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/400`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CreateSkill.Output.BadRequest) + case badRequest(Operations.UpdateVisionModel.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CreateSkill.Output.BadRequest { + public var badRequest: Operations.UpdateVisionModel.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -78660,9 +87222,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -78678,26 +87240,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSkill.Output.Unauthorized.Body + public var body: Operations.UpdateVisionModel.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSkill.Output.Unauthorized.Body) { + public init(body: Operations.UpdateVisionModel.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/401`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CreateSkill.Output.Unauthorized) + case unauthorized(Operations.UpdateVisionModel.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CreateSkill.Output.Unauthorized { + public var unauthorized: Operations.UpdateVisionModel.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -78711,9 +87273,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78729,26 +87291,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSkill.Output.NotFound.Body + public var body: Operations.UpdateVisionModel.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSkill.Output.NotFound.Body) { + public init(body: Operations.UpdateVisionModel.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/404`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CreateSkill.Output.NotFound) + case notFound(Operations.UpdateVisionModel.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CreateSkill.Output.NotFound { + public var notFound: Operations.UpdateVisionModel.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -78762,9 +87324,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78780,26 +87342,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSkill.Output.MethodNotAllowed.Body + public var body: Operations.UpdateVisionModel.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSkill.Output.MethodNotAllowed.Body) { + public init(body: Operations.UpdateVisionModel.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/405`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CreateSkill.Output.MethodNotAllowed) + case methodNotAllowed(Operations.UpdateVisionModel.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CreateSkill.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.UpdateVisionModel.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -78813,9 +87375,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78831,26 +87393,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSkill.Output.Conflict.Body + public var body: Operations.UpdateVisionModel.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSkill.Output.Conflict.Body) { + public init(body: Operations.UpdateVisionModel.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/409`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CreateSkill.Output.Conflict) + case conflict(Operations.UpdateVisionModel.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CreateSkill.Output.Conflict { + public var conflict: Operations.UpdateVisionModel.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -78864,9 +87426,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -78882,26 +87444,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSkill.Output.ContentTooLarge.Body + public var body: Operations.UpdateVisionModel.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSkill.Output.ContentTooLarge.Body) { + public init(body: Operations.UpdateVisionModel.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/413`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CreateSkill.Output.ContentTooLarge) + case contentTooLarge(Operations.UpdateVisionModel.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CreateSkill.Output.ContentTooLarge { + public var contentTooLarge: Operations.UpdateVisionModel.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -78915,9 +87477,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78933,26 +87495,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSkill.Output.InternalServerError.Body + public var body: Operations.UpdateVisionModel.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSkill.Output.InternalServerError.Body) { + public init(body: Operations.UpdateVisionModel.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/500`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CreateSkill.Output.InternalServerError) + case internalServerError(Operations.UpdateVisionModel.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CreateSkill.Output.InternalServerError { + public var internalServerError: Operations.UpdateVisionModel.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -78966,9 +87528,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -78984,26 +87546,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CreateSkill.Output.ServiceUnavailable.Body + public var body: Operations.UpdateVisionModel.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CreateSkill.Output.ServiceUnavailable.Body) { + public init(body: Operations.UpdateVisionModel.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/post(createSkill)/responses/503`. + /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CreateSkill.Output.ServiceUnavailable) + case serviceUnavailable(Operations.UpdateVisionModel.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CreateSkill.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.UpdateVisionModel.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -79053,80 +87615,310 @@ public enum Operations { } } } - /// Lists the skills in a public GitHub repository: every folder with a SKILL.md, and whether each can be installed. + /// The account's voice gateway: its lines and the owner's numbers, when its token was issued, and the connection status. /// - /// - Remark: HTTP `POST /v1/skills/github/browse`. - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)`. - public enum BrowseSkillRepository { - public static let id: Swift.String = "browseSkillRepository" + /// - Remark: HTTP `GET /v1/voice-gateway`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)`. + public enum GetVoiceGateway { + public static let id: Swift.String = "getVoiceGateway" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/header`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.BrowseSkillRepository.Input.Headers - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/requestBody/json/location`. - public var location: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - location: - public init(location: Swift.String) { - self.location = location - } - public enum CodingKeys: String, CodingKey { - case location - } - public init(from decoder: any Swift.Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.location = try container.decode( - Swift.String.self, - forKey: .location - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "location" - ]) - } - } - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/requestBody/content/application\/json`. - case json(Operations.BrowseSkillRepository.Input.Body.JsonPayload) - } - public var body: Operations.BrowseSkillRepository.Input.Body + public var headers: Operations.GetVoiceGateway.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - headers: - /// - body: - public init( - headers: Operations.BrowseSkillRepository.Input.Headers = .init(), - body: Operations.BrowseSkillRepository.Input.Body - ) { + public init(headers: Operations.GetVoiceGateway.Input.Headers = .init()) { self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/200/content/application\/json`. - case json(Components.Schemas.SkillListing) + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config`. + public struct ConfigPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config/LinesPayload`. + public struct LinesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config/LinesPayload/botId`. + public var botId: Swift.String + /// Whether the line's bot may ask to call people other than the owner, each call after the owner approved it. Absent means false. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config/LinesPayload/callsOthers`. + public var callsOthers: Swift.Bool + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config/LinesPayload/callsOwner`. + public var callsOwner: Swift.Bool + /// The name callers hear; null uses the bot's name. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config/LinesPayload/displayName`. + public var displayName: Swift.String? + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config/LinesPayload/username`. + public var username: Swift.String + /// Creates a new `LinesPayloadPayload`. + /// + /// - Parameters: + /// - botId: + /// - callsOthers: Whether the line's bot may ask to call people other than the owner, each call after the owner approved it. Absent means false. + /// - callsOwner: + /// - displayName: The name callers hear; null uses the bot's name. + /// - username: + public init( + botId: Swift.String, + callsOthers: Swift.Bool, + callsOwner: Swift.Bool, + displayName: Swift.String? = nil, + username: Swift.String + ) { + self.botId = botId + self.callsOthers = callsOthers + self.callsOwner = callsOwner + self.displayName = displayName + self.username = username + } + public enum CodingKeys: String, CodingKey { + case botId + case callsOthers + case callsOwner + case displayName + case username + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.botId = try container.decode( + Swift.String.self, + forKey: .botId + ) + self.callsOthers = try container.decode( + Swift.Bool.self, + forKey: .callsOthers + ) + self.callsOwner = try container.decode( + Swift.Bool.self, + forKey: .callsOwner + ) + self.displayName = try container.decodeIfPresent( + Swift.String.self, + forKey: .displayName + ) + self.username = try container.decode( + Swift.String.self, + forKey: .username + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "botId", + "callsOthers", + "callsOwner", + "displayName", + "username" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config/lines`. + public typealias LinesPayload = [Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload.LinesPayloadPayload] + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config/lines`. + public var lines: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload.LinesPayload + /// The owner's phone numbers. A call from one of them reaches the line's bot as the owner; a bot calling the owner dials the first. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config/ownerNumbers`. + public var ownerNumbers: [Swift.String] + /// Creates a new `ConfigPayload`. + /// + /// - Parameters: + /// - enabled: + /// - lines: + /// - ownerNumbers: The owner's phone numbers. A call from one of them reaches the line's bot as the owner; a bot calling the owner dials the first. + public init( + enabled: Swift.Bool, + lines: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload.LinesPayload, + ownerNumbers: [Swift.String] + ) { + self.enabled = enabled + self.lines = lines + self.ownerNumbers = ownerNumbers + } + public enum CodingKeys: String, CodingKey { + case enabled + case lines + case ownerNumbers + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.enabled = try container.decode( + Swift.Bool.self, + forKey: .enabled + ) + self.lines = try container.decode( + Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload.LinesPayload.self, + forKey: .lines + ) + self.ownerNumbers = try container.decode( + [Swift.String].self, + forKey: .ownerNumbers + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "enabled", + "lines", + "ownerNumbers" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/config`. + public var config: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/connectedAt`. + public var connectedAt: Swift.String? + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/LinesPayload`. + public struct LinesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/LinesPayload/error`. + public var error: Swift.String? + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/LinesPayload/registered`. + public var registered: Swift.Bool + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/LinesPayload/username`. + public var username: Swift.String + /// Creates a new `LinesPayloadPayload`. + /// + /// - Parameters: + /// - error: + /// - registered: + /// - username: + public init( + error: Swift.String? = nil, + registered: Swift.Bool, + username: Swift.String + ) { + self.error = error + self.registered = registered + self.username = username + } + public enum CodingKeys: String, CodingKey { + case error + case registered + case username + } + } + /// Line registration as the connected voice gateway last reported it; empty until it reports and after it disconnects. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/lines`. + public typealias LinesPayload = [Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.LinesPayloadPayload] + /// Line registration as the connected voice gateway last reported it; empty until it reports and after it disconnects. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/lines`. + public var lines: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.LinesPayload + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/status`. + @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { + case disconnected = "disconnected" + case connecting = "connecting" + case connected = "connected" + case error = "error" + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/status`. + public var status: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.StatusPayload + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/token`. + public struct TokenPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/token/issuedAt`. + public var issuedAt: Swift.String + /// Creates a new `TokenPayload`. + /// + /// - Parameters: + /// - issuedAt: + public init(issuedAt: Swift.String) { + self.issuedAt = issuedAt + } + public enum CodingKeys: String, CodingKey { + case issuedAt + } + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/token`. + public var token: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.TokenPayload? + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/UnavailableLinesPayload`. + public struct UnavailableLinesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/UnavailableLinesPayload/reason`. + @frozen public enum ReasonPayload: String, Codable, Hashable, Sendable, CaseIterable { + case botDeleted = "botDeleted" + case botDisabled = "botDisabled" + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/UnavailableLinesPayload/reason`. + public var reason: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.UnavailableLinesPayloadPayload.ReasonPayload + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/UnavailableLinesPayload/username`. + public var username: Swift.String + /// Creates a new `UnavailableLinesPayloadPayload`. + /// + /// - Parameters: + /// - reason: + /// - username: + public init( + reason: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.UnavailableLinesPayloadPayload.ReasonPayload, + username: Swift.String + ) { + self.reason = reason + self.username = username + } + public enum CodingKeys: String, CodingKey { + case reason + case username + } + } + /// Configured lines whose bot was deleted or is disabled. The voice gateway does not receive them; a line comes back when its bot is enabled again. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/unavailableLines`. + public typealias UnavailableLinesPayload = [Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.UnavailableLinesPayloadPayload] + /// Configured lines whose bot was deleted or is disabled. The voice gateway does not receive them; a line comes back when its bot is enabled again. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/json/unavailableLines`. + public var unavailableLines: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.UnavailableLinesPayload + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - config: + /// - connectedAt: + /// - lines: Line registration as the connected voice gateway last reported it; empty until it reports and after it disconnects. + /// - status: + /// - token: + /// - unavailableLines: Configured lines whose bot was deleted or is disabled. The voice gateway does not receive them; a line comes back when its bot is enabled again. + public init( + config: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload, + connectedAt: Swift.String? = nil, + lines: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.LinesPayload, + status: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.StatusPayload, + token: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.TokenPayload? = nil, + unavailableLines: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload.UnavailableLinesPayload + ) { + self.config = config + self.connectedAt = connectedAt + self.lines = lines + self.status = status + self.token = token + self.unavailableLines = unavailableLines + } + public enum CodingKeys: String, CodingKey { + case config + case connectedAt + case lines + case status + case token + case unavailableLines + } + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/200/content/application\/json`. + case json(Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.SkillListing { + public var json: Operations.GetVoiceGateway.Output.Ok.Body.JsonPayload { get throws { switch self { case let .json(body): @@ -79136,26 +87928,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.BrowseSkillRepository.Output.Ok.Body + public var body: Operations.GetVoiceGateway.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.BrowseSkillRepository.Output.Ok.Body) { + public init(body: Operations.GetVoiceGateway.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/200`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.BrowseSkillRepository.Output.Ok) + case ok(Operations.GetVoiceGateway.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.BrowseSkillRepository.Output.Ok { + public var ok: Operations.GetVoiceGateway.Output.Ok { get throws { switch self { case let .ok(response): @@ -79169,9 +87961,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -79187,26 +87979,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.BrowseSkillRepository.Output.BadRequest.Body + public var body: Operations.GetVoiceGateway.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.BrowseSkillRepository.Output.BadRequest.Body) { + public init(body: Operations.GetVoiceGateway.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.BrowseSkillRepository.Output.BadRequest) + case badRequest(Operations.GetVoiceGateway.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.BrowseSkillRepository.Output.BadRequest { + public var badRequest: Operations.GetVoiceGateway.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -79220,9 +88012,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -79238,26 +88030,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.BrowseSkillRepository.Output.Unauthorized.Body + public var body: Operations.GetVoiceGateway.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.BrowseSkillRepository.Output.Unauthorized.Body) { + public init(body: Operations.GetVoiceGateway.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.BrowseSkillRepository.Output.Unauthorized) + case unauthorized(Operations.GetVoiceGateway.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.BrowseSkillRepository.Output.Unauthorized { + public var unauthorized: Operations.GetVoiceGateway.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -79271,9 +88063,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -79289,26 +88081,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.BrowseSkillRepository.Output.NotFound.Body + public var body: Operations.GetVoiceGateway.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.BrowseSkillRepository.Output.NotFound.Body) { + public init(body: Operations.GetVoiceGateway.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.BrowseSkillRepository.Output.NotFound) + case notFound(Operations.GetVoiceGateway.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.BrowseSkillRepository.Output.NotFound { + public var notFound: Operations.GetVoiceGateway.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -79322,9 +88114,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -79340,26 +88132,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.BrowseSkillRepository.Output.MethodNotAllowed.Body + public var body: Operations.GetVoiceGateway.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.BrowseSkillRepository.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetVoiceGateway.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.BrowseSkillRepository.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetVoiceGateway.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.BrowseSkillRepository.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetVoiceGateway.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -79373,9 +88165,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -79391,26 +88183,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.BrowseSkillRepository.Output.Conflict.Body + public var body: Operations.GetVoiceGateway.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.BrowseSkillRepository.Output.Conflict.Body) { + public init(body: Operations.GetVoiceGateway.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.BrowseSkillRepository.Output.Conflict) + case conflict(Operations.GetVoiceGateway.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.BrowseSkillRepository.Output.Conflict { + public var conflict: Operations.GetVoiceGateway.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -79424,9 +88216,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -79442,26 +88234,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.BrowseSkillRepository.Output.ContentTooLarge.Body + public var body: Operations.GetVoiceGateway.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.BrowseSkillRepository.Output.ContentTooLarge.Body) { + public init(body: Operations.GetVoiceGateway.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.BrowseSkillRepository.Output.ContentTooLarge) + case contentTooLarge(Operations.GetVoiceGateway.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.BrowseSkillRepository.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetVoiceGateway.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -79475,9 +88267,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -79493,26 +88285,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.BrowseSkillRepository.Output.InternalServerError.Body + public var body: Operations.GetVoiceGateway.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.BrowseSkillRepository.Output.InternalServerError.Body) { + public init(body: Operations.GetVoiceGateway.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.BrowseSkillRepository.Output.InternalServerError) + case internalServerError(Operations.GetVoiceGateway.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.BrowseSkillRepository.Output.InternalServerError { + public var internalServerError: Operations.GetVoiceGateway.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -79526,9 +88318,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/browse/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -79544,26 +88336,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.BrowseSkillRepository.Output.ServiceUnavailable.Body + public var body: Operations.GetVoiceGateway.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.BrowseSkillRepository.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetVoiceGateway.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/github/browse/post(browseSkillRepository)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.BrowseSkillRepository.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetVoiceGateway.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.BrowseSkillRepository.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetVoiceGateway.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -79613,126 +88405,449 @@ public enum Operations { } } } - /// Installs skills from one commit of a public GitHub repository as read-only shared skills, all or none, and turns them on for `botIds`. + /// Saves the voice gateway's lines and the owner's numbers. 400 for an unknown bot. /// - /// - Remark: HTTP `POST /v1/skills/github/install`. - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)`. - public enum InstallSkills { - public static let id: Swift.String = "installSkills" + /// - Remark: HTTP `PUT /v1/voice-gateway`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)`. + public enum UpdateVoiceGateway { + public static let id: Swift.String = "updateVoiceGateway" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/header`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.InstallSkills.Input.Headers - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody`. + public var headers: Operations.UpdateVoiceGateway.Input.Headers + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json/botIds`. - public var botIds: [Swift.String]? - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json/branch`. - public var branch: Swift.String - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json/commit`. - public var commit: Swift.String - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json/paths`. - public var paths: [Swift.String] - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/json/repository`. - public var repository: Swift.String + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json/LinesPayload`. + public struct LinesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json/LinesPayload/botId`. + public var botId: Swift.String + /// Whether the line's bot may ask to call people other than the owner, each call after the owner approved it. Absent means false. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json/LinesPayload/callsOthers`. + public var callsOthers: Swift.Bool + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json/LinesPayload/callsOwner`. + public var callsOwner: Swift.Bool + /// The name callers hear; null uses the bot's name. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json/LinesPayload/displayName`. + public var displayName: Swift.String? + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json/LinesPayload/username`. + public var username: Swift.String + /// Creates a new `LinesPayloadPayload`. + /// + /// - Parameters: + /// - botId: + /// - callsOthers: Whether the line's bot may ask to call people other than the owner, each call after the owner approved it. Absent means false. + /// - callsOwner: + /// - displayName: The name callers hear; null uses the bot's name. + /// - username: + public init( + botId: Swift.String, + callsOthers: Swift.Bool, + callsOwner: Swift.Bool, + displayName: Swift.String? = nil, + username: Swift.String + ) { + self.botId = botId + self.callsOthers = callsOthers + self.callsOwner = callsOwner + self.displayName = displayName + self.username = username + } + public enum CodingKeys: String, CodingKey { + case botId + case callsOthers + case callsOwner + case displayName + case username + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.botId = try container.decode( + Swift.String.self, + forKey: .botId + ) + self.callsOthers = try container.decode( + Swift.Bool.self, + forKey: .callsOthers + ) + self.callsOwner = try container.decode( + Swift.Bool.self, + forKey: .callsOwner + ) + self.displayName = try container.decodeIfPresent( + Swift.String.self, + forKey: .displayName + ) + self.username = try container.decode( + Swift.String.self, + forKey: .username + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "botId", + "callsOthers", + "callsOwner", + "displayName", + "username" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json/lines`. + public typealias LinesPayload = [Operations.UpdateVoiceGateway.Input.Body.JsonPayload.LinesPayloadPayload] + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json/lines`. + public var lines: Operations.UpdateVoiceGateway.Input.Body.JsonPayload.LinesPayload + /// The owner's phone numbers. A call from one of them reaches the line's bot as the owner; a bot calling the owner dials the first. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/json/ownerNumbers`. + public var ownerNumbers: [Swift.String] /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - botIds: - /// - branch: - /// - commit: - /// - paths: - /// - repository: + /// - enabled: + /// - lines: + /// - ownerNumbers: The owner's phone numbers. A call from one of them reaches the line's bot as the owner; a bot calling the owner dials the first. public init( - botIds: [Swift.String]? = nil, - branch: Swift.String, - commit: Swift.String, - paths: [Swift.String], - repository: Swift.String + enabled: Swift.Bool, + lines: Operations.UpdateVoiceGateway.Input.Body.JsonPayload.LinesPayload, + ownerNumbers: [Swift.String] ) { - self.botIds = botIds - self.branch = branch - self.commit = commit - self.paths = paths - self.repository = repository + self.enabled = enabled + self.lines = lines + self.ownerNumbers = ownerNumbers } public enum CodingKeys: String, CodingKey { - case botIds - case branch - case commit - case paths - case repository + case enabled + case lines + case ownerNumbers } public init(from decoder: any Swift.Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - self.botIds = try container.decodeIfPresent( - [Swift.String].self, - forKey: .botIds + self.enabled = try container.decode( + Swift.Bool.self, + forKey: .enabled ) - self.branch = try container.decode( - Swift.String.self, - forKey: .branch + self.lines = try container.decode( + Operations.UpdateVoiceGateway.Input.Body.JsonPayload.LinesPayload.self, + forKey: .lines ) - self.commit = try container.decode( - Swift.String.self, - forKey: .commit - ) - self.paths = try container.decode( + self.ownerNumbers = try container.decode( [Swift.String].self, - forKey: .paths - ) - self.repository = try container.decode( - Swift.String.self, - forKey: .repository + forKey: .ownerNumbers ) try decoder.ensureNoAdditionalProperties(knownKeys: [ - "botIds", - "branch", - "commit", - "paths", - "repository" + "enabled", + "lines", + "ownerNumbers" ]) } } - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/requestBody/content/application\/json`. - case json(Operations.InstallSkills.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/requestBody/content/application\/json`. + case json(Operations.UpdateVoiceGateway.Input.Body.JsonPayload) } - public var body: Operations.InstallSkills.Input.Body + public var body: Operations.UpdateVoiceGateway.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - headers: /// - body: public init( - headers: Operations.InstallSkills.Input.Headers = .init(), - body: Operations.InstallSkills.Input.Body + headers: Operations.UpdateVoiceGateway.Input.Headers = .init(), + body: Operations.UpdateVoiceGateway.Input.Body ) { self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/201/content/application\/json`. - case json([Components.Schemas.SkillPackage]) + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config`. + public struct ConfigPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config/enabled`. + public var enabled: Swift.Bool + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config/LinesPayload`. + public struct LinesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config/LinesPayload/botId`. + public var botId: Swift.String + /// Whether the line's bot may ask to call people other than the owner, each call after the owner approved it. Absent means false. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config/LinesPayload/callsOthers`. + public var callsOthers: Swift.Bool + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config/LinesPayload/callsOwner`. + public var callsOwner: Swift.Bool + /// The name callers hear; null uses the bot's name. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config/LinesPayload/displayName`. + public var displayName: Swift.String? + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config/LinesPayload/username`. + public var username: Swift.String + /// Creates a new `LinesPayloadPayload`. + /// + /// - Parameters: + /// - botId: + /// - callsOthers: Whether the line's bot may ask to call people other than the owner, each call after the owner approved it. Absent means false. + /// - callsOwner: + /// - displayName: The name callers hear; null uses the bot's name. + /// - username: + public init( + botId: Swift.String, + callsOthers: Swift.Bool, + callsOwner: Swift.Bool, + displayName: Swift.String? = nil, + username: Swift.String + ) { + self.botId = botId + self.callsOthers = callsOthers + self.callsOwner = callsOwner + self.displayName = displayName + self.username = username + } + public enum CodingKeys: String, CodingKey { + case botId + case callsOthers + case callsOwner + case displayName + case username + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.botId = try container.decode( + Swift.String.self, + forKey: .botId + ) + self.callsOthers = try container.decode( + Swift.Bool.self, + forKey: .callsOthers + ) + self.callsOwner = try container.decode( + Swift.Bool.self, + forKey: .callsOwner + ) + self.displayName = try container.decodeIfPresent( + Swift.String.self, + forKey: .displayName + ) + self.username = try container.decode( + Swift.String.self, + forKey: .username + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "botId", + "callsOthers", + "callsOwner", + "displayName", + "username" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config/lines`. + public typealias LinesPayload = [Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload.LinesPayloadPayload] + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config/lines`. + public var lines: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload.LinesPayload + /// The owner's phone numbers. A call from one of them reaches the line's bot as the owner; a bot calling the owner dials the first. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config/ownerNumbers`. + public var ownerNumbers: [Swift.String] + /// Creates a new `ConfigPayload`. + /// + /// - Parameters: + /// - enabled: + /// - lines: + /// - ownerNumbers: The owner's phone numbers. A call from one of them reaches the line's bot as the owner; a bot calling the owner dials the first. + public init( + enabled: Swift.Bool, + lines: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload.LinesPayload, + ownerNumbers: [Swift.String] + ) { + self.enabled = enabled + self.lines = lines + self.ownerNumbers = ownerNumbers + } + public enum CodingKeys: String, CodingKey { + case enabled + case lines + case ownerNumbers + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.enabled = try container.decode( + Swift.Bool.self, + forKey: .enabled + ) + self.lines = try container.decode( + Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload.LinesPayload.self, + forKey: .lines + ) + self.ownerNumbers = try container.decode( + [Swift.String].self, + forKey: .ownerNumbers + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "enabled", + "lines", + "ownerNumbers" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/config`. + public var config: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/connectedAt`. + public var connectedAt: Swift.String? + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/LinesPayload`. + public struct LinesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/LinesPayload/error`. + public var error: Swift.String? + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/LinesPayload/registered`. + public var registered: Swift.Bool + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/LinesPayload/username`. + public var username: Swift.String + /// Creates a new `LinesPayloadPayload`. + /// + /// - Parameters: + /// - error: + /// - registered: + /// - username: + public init( + error: Swift.String? = nil, + registered: Swift.Bool, + username: Swift.String + ) { + self.error = error + self.registered = registered + self.username = username + } + public enum CodingKeys: String, CodingKey { + case error + case registered + case username + } + } + /// Line registration as the connected voice gateway last reported it; empty until it reports and after it disconnects. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/lines`. + public typealias LinesPayload = [Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.LinesPayloadPayload] + /// Line registration as the connected voice gateway last reported it; empty until it reports and after it disconnects. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/lines`. + public var lines: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.LinesPayload + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/status`. + @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { + case disconnected = "disconnected" + case connecting = "connecting" + case connected = "connected" + case error = "error" + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/status`. + public var status: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.StatusPayload + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/token`. + public struct TokenPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/token/issuedAt`. + public var issuedAt: Swift.String + /// Creates a new `TokenPayload`. + /// + /// - Parameters: + /// - issuedAt: + public init(issuedAt: Swift.String) { + self.issuedAt = issuedAt + } + public enum CodingKeys: String, CodingKey { + case issuedAt + } + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/token`. + public var token: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.TokenPayload? + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/UnavailableLinesPayload`. + public struct UnavailableLinesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/UnavailableLinesPayload/reason`. + @frozen public enum ReasonPayload: String, Codable, Hashable, Sendable, CaseIterable { + case botDeleted = "botDeleted" + case botDisabled = "botDisabled" + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/UnavailableLinesPayload/reason`. + public var reason: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.UnavailableLinesPayloadPayload.ReasonPayload + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/UnavailableLinesPayload/username`. + public var username: Swift.String + /// Creates a new `UnavailableLinesPayloadPayload`. + /// + /// - Parameters: + /// - reason: + /// - username: + public init( + reason: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.UnavailableLinesPayloadPayload.ReasonPayload, + username: Swift.String + ) { + self.reason = reason + self.username = username + } + public enum CodingKeys: String, CodingKey { + case reason + case username + } + } + /// Configured lines whose bot was deleted or is disabled. The voice gateway does not receive them; a line comes back when its bot is enabled again. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/unavailableLines`. + public typealias UnavailableLinesPayload = [Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.UnavailableLinesPayloadPayload] + /// Configured lines whose bot was deleted or is disabled. The voice gateway does not receive them; a line comes back when its bot is enabled again. + /// + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/json/unavailableLines`. + public var unavailableLines: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.UnavailableLinesPayload + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - config: + /// - connectedAt: + /// - lines: Line registration as the connected voice gateway last reported it; empty until it reports and after it disconnects. + /// - status: + /// - token: + /// - unavailableLines: Configured lines whose bot was deleted or is disabled. The voice gateway does not receive them; a line comes back when its bot is enabled again. + public init( + config: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.ConfigPayload, + connectedAt: Swift.String? = nil, + lines: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.LinesPayload, + status: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.StatusPayload, + token: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.TokenPayload? = nil, + unavailableLines: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload.UnavailableLinesPayload + ) { + self.config = config + self.connectedAt = connectedAt + self.lines = lines + self.status = status + self.token = token + self.unavailableLines = unavailableLines + } + public enum CodingKeys: String, CodingKey { + case config + case connectedAt + case lines + case status + case token + case unavailableLines + } + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/200/content/application\/json`. + case json(Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.SkillPackage] { + public var json: Operations.UpdateVoiceGateway.Output.Ok.Body.JsonPayload { get throws { switch self { case let .json(body): @@ -79742,42 +88857,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.InstallSkills.Output.Created.Body - /// Creates a new `Created`. + public var body: Operations.UpdateVoiceGateway.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.InstallSkills.Output.Created.Body) { + public init(body: Operations.UpdateVoiceGateway.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/201`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)/responses/200`. /// - /// HTTP response code: `201 created`. - case created(Operations.InstallSkills.Output.Created) - /// The associated value of the enum case if `self` is `.created`. + /// HTTP response code: `200 ok`. + case ok(Operations.UpdateVoiceGateway.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.InstallSkills.Output.Created { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.UpdateVoiceGateway.Output.Ok { get throws { switch self { - case let .created(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "created", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -79793,26 +88908,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.InstallSkills.Output.BadRequest.Body + public var body: Operations.UpdateVoiceGateway.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.InstallSkills.Output.BadRequest.Body) { + public init(body: Operations.UpdateVoiceGateway.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.InstallSkills.Output.BadRequest) + case badRequest(Operations.UpdateVoiceGateway.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.InstallSkills.Output.BadRequest { + public var badRequest: Operations.UpdateVoiceGateway.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -79826,9 +88941,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -79844,26 +88959,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.InstallSkills.Output.Unauthorized.Body + public var body: Operations.UpdateVoiceGateway.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.InstallSkills.Output.Unauthorized.Body) { + public init(body: Operations.UpdateVoiceGateway.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.InstallSkills.Output.Unauthorized) + case unauthorized(Operations.UpdateVoiceGateway.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.InstallSkills.Output.Unauthorized { + public var unauthorized: Operations.UpdateVoiceGateway.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -79877,9 +88992,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -79895,26 +89010,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.InstallSkills.Output.NotFound.Body + public var body: Operations.UpdateVoiceGateway.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.InstallSkills.Output.NotFound.Body) { + public init(body: Operations.UpdateVoiceGateway.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.InstallSkills.Output.NotFound) + case notFound(Operations.UpdateVoiceGateway.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.InstallSkills.Output.NotFound { + public var notFound: Operations.UpdateVoiceGateway.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -79928,9 +89043,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -79946,26 +89061,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.InstallSkills.Output.MethodNotAllowed.Body + public var body: Operations.UpdateVoiceGateway.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.InstallSkills.Output.MethodNotAllowed.Body) { + public init(body: Operations.UpdateVoiceGateway.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.InstallSkills.Output.MethodNotAllowed) + case methodNotAllowed(Operations.UpdateVoiceGateway.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.InstallSkills.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.UpdateVoiceGateway.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -79979,9 +89094,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -79997,26 +89112,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.InstallSkills.Output.Conflict.Body + public var body: Operations.UpdateVoiceGateway.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.InstallSkills.Output.Conflict.Body) { + public init(body: Operations.UpdateVoiceGateway.Output.Conflict.Body) { self.body = body } } - /// A skill is already installed or its name is taken + /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.InstallSkills.Output.Conflict) + case conflict(Operations.UpdateVoiceGateway.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.InstallSkills.Output.Conflict { + public var conflict: Operations.UpdateVoiceGateway.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -80030,9 +89145,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -80048,26 +89163,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.InstallSkills.Output.ContentTooLarge.Body + public var body: Operations.UpdateVoiceGateway.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.InstallSkills.Output.ContentTooLarge.Body) { + public init(body: Operations.UpdateVoiceGateway.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.InstallSkills.Output.ContentTooLarge) + case contentTooLarge(Operations.UpdateVoiceGateway.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.InstallSkills.Output.ContentTooLarge { + public var contentTooLarge: Operations.UpdateVoiceGateway.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -80081,9 +89196,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -80099,26 +89214,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.InstallSkills.Output.InternalServerError.Body + public var body: Operations.UpdateVoiceGateway.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.InstallSkills.Output.InternalServerError.Body) { + public init(body: Operations.UpdateVoiceGateway.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.InstallSkills.Output.InternalServerError) + case internalServerError(Operations.UpdateVoiceGateway.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.InstallSkills.Output.InternalServerError { + public var internalServerError: Operations.UpdateVoiceGateway.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -80132,9 +89247,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/github/install/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -80150,26 +89265,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.InstallSkills.Output.ServiceUnavailable.Body + public var body: Operations.UpdateVoiceGateway.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.InstallSkills.Output.ServiceUnavailable.Body) { + public init(body: Operations.UpdateVoiceGateway.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/github/install/post(installSkills)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.InstallSkills.Output.ServiceUnavailable) + case serviceUnavailable(Operations.UpdateVoiceGateway.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.InstallSkills.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.UpdateVoiceGateway.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -80219,44 +89334,67 @@ public enum Operations { } } } - /// Checks every installed skill's branch for changes now. The server also checks daily; GET /v1/skills shows the results as `update`. + /// Issues the voice gateway token, returned only once. An earlier token stops working at once. /// - /// - Remark: HTTP `POST /v1/skills/updates/check`. - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)`. - public enum CheckSkillUpdates { - public static let id: Swift.String = "checkSkillUpdates" + /// - Remark: HTTP `POST /v1/voice-gateway/token`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)`. + public enum IssueVoiceGatewayToken { + public static let id: Swift.String = "issueVoiceGatewayToken" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/header`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.CheckSkillUpdates.Input.Headers + public var headers: Operations.IssueVoiceGatewayToken.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - headers: - public init(headers: Operations.CheckSkillUpdates.Input.Headers = .init()) { + public init(headers: Operations.IssueVoiceGatewayToken.Input.Headers = .init()) { self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/200/content`. + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/200/content/application\/json`. - case json(Components.Schemas.SkillCheck) + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/201/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/201/content/json/issuedAt`. + public var issuedAt: Swift.String + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/201/content/json/token`. + public var token: Swift.String + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - issuedAt: + /// - token: + public init( + issuedAt: Swift.String, + token: Swift.String + ) { + self.issuedAt = issuedAt + self.token = token + } + public enum CodingKeys: String, CodingKey { + case issuedAt + case token + } + } + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/201/content/application\/json`. + case json(Operations.IssueVoiceGatewayToken.Output.Created.Body.JsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.SkillCheck { + public var json: Operations.IssueVoiceGatewayToken.Output.Created.Body.JsonPayload { get throws { switch self { case let .json(body): @@ -80266,42 +89404,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CheckSkillUpdates.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.IssueVoiceGatewayToken.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CheckSkillUpdates.Output.Ok.Body) { + public init(body: Operations.IssueVoiceGatewayToken.Output.Created.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/200`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)/responses/201`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.CheckSkillUpdates.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `201 created`. + case created(Operations.IssueVoiceGatewayToken.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.CheckSkillUpdates.Output.Ok { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.IssueVoiceGatewayToken.Output.Created { get throws { switch self { - case let .ok(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "created", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -80317,26 +89455,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CheckSkillUpdates.Output.BadRequest.Body + public var body: Operations.IssueVoiceGatewayToken.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CheckSkillUpdates.Output.BadRequest.Body) { + public init(body: Operations.IssueVoiceGatewayToken.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.CheckSkillUpdates.Output.BadRequest) + case badRequest(Operations.IssueVoiceGatewayToken.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.CheckSkillUpdates.Output.BadRequest { + public var badRequest: Operations.IssueVoiceGatewayToken.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -80350,9 +89488,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -80368,26 +89506,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CheckSkillUpdates.Output.Unauthorized.Body + public var body: Operations.IssueVoiceGatewayToken.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CheckSkillUpdates.Output.Unauthorized.Body) { + public init(body: Operations.IssueVoiceGatewayToken.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.CheckSkillUpdates.Output.Unauthorized) + case unauthorized(Operations.IssueVoiceGatewayToken.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.CheckSkillUpdates.Output.Unauthorized { + public var unauthorized: Operations.IssueVoiceGatewayToken.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -80401,9 +89539,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -80419,26 +89557,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CheckSkillUpdates.Output.NotFound.Body + public var body: Operations.IssueVoiceGatewayToken.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CheckSkillUpdates.Output.NotFound.Body) { + public init(body: Operations.IssueVoiceGatewayToken.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.CheckSkillUpdates.Output.NotFound) + case notFound(Operations.IssueVoiceGatewayToken.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.CheckSkillUpdates.Output.NotFound { + public var notFound: Operations.IssueVoiceGatewayToken.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -80452,9 +89590,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -80470,26 +89608,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CheckSkillUpdates.Output.MethodNotAllowed.Body + public var body: Operations.IssueVoiceGatewayToken.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CheckSkillUpdates.Output.MethodNotAllowed.Body) { + public init(body: Operations.IssueVoiceGatewayToken.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.CheckSkillUpdates.Output.MethodNotAllowed) + case methodNotAllowed(Operations.IssueVoiceGatewayToken.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.CheckSkillUpdates.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.IssueVoiceGatewayToken.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -80503,9 +89641,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -80521,26 +89659,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CheckSkillUpdates.Output.Conflict.Body + public var body: Operations.IssueVoiceGatewayToken.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CheckSkillUpdates.Output.Conflict.Body) { + public init(body: Operations.IssueVoiceGatewayToken.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.CheckSkillUpdates.Output.Conflict) + case conflict(Operations.IssueVoiceGatewayToken.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.CheckSkillUpdates.Output.Conflict { + public var conflict: Operations.IssueVoiceGatewayToken.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -80554,9 +89692,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -80572,26 +89710,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CheckSkillUpdates.Output.ContentTooLarge.Body + public var body: Operations.IssueVoiceGatewayToken.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CheckSkillUpdates.Output.ContentTooLarge.Body) { + public init(body: Operations.IssueVoiceGatewayToken.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.CheckSkillUpdates.Output.ContentTooLarge) + case contentTooLarge(Operations.IssueVoiceGatewayToken.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.CheckSkillUpdates.Output.ContentTooLarge { + public var contentTooLarge: Operations.IssueVoiceGatewayToken.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -80605,9 +89743,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -80623,26 +89761,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CheckSkillUpdates.Output.InternalServerError.Body + public var body: Operations.IssueVoiceGatewayToken.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CheckSkillUpdates.Output.InternalServerError.Body) { + public init(body: Operations.IssueVoiceGatewayToken.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.CheckSkillUpdates.Output.InternalServerError) + case internalServerError(Operations.IssueVoiceGatewayToken.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.CheckSkillUpdates.Output.InternalServerError { + public var internalServerError: Operations.IssueVoiceGatewayToken.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -80656,9 +89794,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/updates/check/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -80674,26 +89812,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.CheckSkillUpdates.Output.ServiceUnavailable.Body + public var body: Operations.IssueVoiceGatewayToken.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.CheckSkillUpdates.Output.ServiceUnavailable.Body) { + public init(body: Operations.IssueVoiceGatewayToken.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/updates/check/post(checkSkillUpdates)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.CheckSkillUpdates.Output.ServiceUnavailable) + case serviceUnavailable(Operations.IssueVoiceGatewayToken.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.CheckSkillUpdates.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.IssueVoiceGatewayToken.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -80743,107 +89881,73 @@ public enum Operations { } } } - /// One shared skill as a full package. GET /v1/skills keeps its earlier item shapes; the full records are here and in the create and update responses. + /// Revokes the voice gateway token. 404 when none is issued. /// - /// - Remark: HTTP `GET /v1/skills/{id}`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)`. - public enum GetSkill { - public static let id: Swift.String = "getSkill" + /// - Remark: HTTP `DELETE /v1/voice-gateway/token`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)`. + public enum RevokeVoiceGatewayToken { + public static let id: Swift.String = "revokeVoiceGatewayToken" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.GetSkill.Input.Path - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/header`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetSkill.Input.Headers + public var headers: Operations.RevokeVoiceGatewayToken.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: - public init( - path: Operations.GetSkill.Input.Path, - headers: Operations.GetSkill.Input.Headers = .init() - ) { - self.path = path + public init(headers: Operations.RevokeVoiceGatewayToken.Input.Headers = .init()) { self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.SkillPackage) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.SkillPackage { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.GetSkill.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.GetSkill.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/200`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.GetSkill.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.RevokeVoiceGatewayToken.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.GetSkill.Output.Ok { + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.RevokeVoiceGatewayToken.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -80859,26 +89963,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetSkill.Output.BadRequest.Body + public var body: Operations.RevokeVoiceGatewayToken.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetSkill.Output.BadRequest.Body) { + public init(body: Operations.RevokeVoiceGatewayToken.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetSkill.Output.BadRequest) + case badRequest(Operations.RevokeVoiceGatewayToken.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetSkill.Output.BadRequest { + public var badRequest: Operations.RevokeVoiceGatewayToken.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -80892,9 +89996,9 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/401/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/401/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -80910,26 +90014,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetSkill.Output.Unauthorized.Body + public var body: Operations.RevokeVoiceGatewayToken.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetSkill.Output.Unauthorized.Body) { + public init(body: Operations.RevokeVoiceGatewayToken.Output.Unauthorized.Body) { self.body = body } } /// Missing, expired, or invalid account session /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetSkill.Output.Unauthorized) + case unauthorized(Operations.RevokeVoiceGatewayToken.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetSkill.Output.Unauthorized { + public var unauthorized: Operations.RevokeVoiceGatewayToken.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -80943,9 +90047,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -80961,26 +90065,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetSkill.Output.NotFound.Body + public var body: Operations.RevokeVoiceGatewayToken.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetSkill.Output.NotFound.Body) { + public init(body: Operations.RevokeVoiceGatewayToken.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetSkill.Output.NotFound) + case notFound(Operations.RevokeVoiceGatewayToken.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetSkill.Output.NotFound { + public var notFound: Operations.RevokeVoiceGatewayToken.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -80994,9 +90098,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -81012,26 +90116,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetSkill.Output.MethodNotAllowed.Body + public var body: Operations.RevokeVoiceGatewayToken.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetSkill.Output.MethodNotAllowed.Body) { + public init(body: Operations.RevokeVoiceGatewayToken.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetSkill.Output.MethodNotAllowed) + case methodNotAllowed(Operations.RevokeVoiceGatewayToken.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetSkill.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.RevokeVoiceGatewayToken.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -81045,9 +90149,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -81063,26 +90167,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetSkill.Output.Conflict.Body + public var body: Operations.RevokeVoiceGatewayToken.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetSkill.Output.Conflict.Body) { + public init(body: Operations.RevokeVoiceGatewayToken.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetSkill.Output.Conflict) + case conflict(Operations.RevokeVoiceGatewayToken.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetSkill.Output.Conflict { + public var conflict: Operations.RevokeVoiceGatewayToken.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -81096,9 +90200,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -81114,26 +90218,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetSkill.Output.ContentTooLarge.Body + public var body: Operations.RevokeVoiceGatewayToken.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetSkill.Output.ContentTooLarge.Body) { + public init(body: Operations.RevokeVoiceGatewayToken.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetSkill.Output.ContentTooLarge) + case contentTooLarge(Operations.RevokeVoiceGatewayToken.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetSkill.Output.ContentTooLarge { + public var contentTooLarge: Operations.RevokeVoiceGatewayToken.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -81147,9 +90251,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -81165,26 +90269,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetSkill.Output.InternalServerError.Body + public var body: Operations.RevokeVoiceGatewayToken.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetSkill.Output.InternalServerError.Body) { + public init(body: Operations.RevokeVoiceGatewayToken.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetSkill.Output.InternalServerError) + case internalServerError(Operations.RevokeVoiceGatewayToken.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetSkill.Output.InternalServerError { + public var internalServerError: Operations.RevokeVoiceGatewayToken.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -81198,9 +90302,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice-gateway/token/DELETE/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -81216,26 +90320,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetSkill.Output.ServiceUnavailable.Body + public var body: Operations.RevokeVoiceGatewayToken.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetSkill.Output.ServiceUnavailable.Body) { + public init(body: Operations.RevokeVoiceGatewayToken.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/get(getSkill)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetSkill.Output.ServiceUnavailable) + case serviceUnavailable(Operations.RevokeVoiceGatewayToken.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetSkill.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.RevokeVoiceGatewayToken.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -81285,102 +90389,46 @@ public enum Operations { } } } - /// - Remark: HTTP `PATCH /v1/skills/{id}`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)`. - public enum UpdateSkill { - public static let id: Swift.String = "updateSkill" + /// Reports a call a bot placed: ringing as soon as dialing starts, then how it settled. A call not acknowledged within 15 seconds, or not settled within 3 minutes 30 seconds of its call event, is cancelled. 404 for a call that is neither waiting to settle nor active: hang up. ended reports that a started call ended, and answers 204 for any callId. + /// + /// - Remark: HTTP `POST /v1/voice/calls/{callId}`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)`. + public enum ReportVoiceCall { + public static let id: Swift.String = "reportVoiceCall" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/path`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/path/id`. - public var id: Swift.String + /// The callId of a call event. + /// + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/path/callId`. + public var callId: Swift.String /// Creates a new `Path`. /// /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id + /// - callId: The callId of a call event. + public init(callId: Swift.String) { + self.callId = callId } } - public var path: Operations.UpdateSkill.Input.Path - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/header`. + public var path: Operations.ReportVoiceCall.Input.Path + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateSkill.Input.Headers - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody`. + public var headers: Operations.ReportVoiceCall.Input.Headers + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/DocumentsPayload`. - public struct DocumentsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/DocumentsPayload/content`. - public var content: Swift.String - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/DocumentsPayload/path`. - public var path: Swift.String - /// Creates a new `DocumentsPayloadPayload`. - /// - /// - Parameters: - /// - content: - /// - path: - public init( - content: Swift.String, - path: Swift.String - ) { - self.content = content - self.path = path - } - public enum CodingKeys: String, CodingKey { - case content - case path - } - } - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/documents`. - public typealias DocumentsPayload = [Operations.UpdateSkill.Input.Body.JsonPayload.DocumentsPayloadPayload] - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/documents`. - public var documents: Operations.UpdateSkill.Input.Body.JsonPayload.DocumentsPayload? - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/instructions`. - public var instructions: Swift.String? - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/json/name`. - public var name: Swift.String? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - description: - /// - documents: - /// - instructions: - /// - name: - public init( - description: Swift.String? = nil, - documents: Operations.UpdateSkill.Input.Body.JsonPayload.DocumentsPayload? = nil, - instructions: Swift.String? = nil, - name: Swift.String? = nil - ) { - self.description = description - self.documents = documents - self.instructions = instructions - self.name = name - } - public enum CodingKeys: String, CodingKey { - case description - case documents - case instructions - case name - } - } - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/requestBody/content/application\/json`. - case json(Operations.UpdateSkill.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/requestBody/content/application\/json`. + case json(Components.Schemas.VoiceCallReport) } - public var body: Operations.UpdateSkill.Input.Body + public var body: Operations.ReportVoiceCall.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -81388,9 +90436,9 @@ public enum Operations { /// - headers: /// - body: public init( - path: Operations.UpdateSkill.Input.Path, - headers: Operations.UpdateSkill.Input.Headers = .init(), - body: Operations.UpdateSkill.Input.Body + path: Operations.ReportVoiceCall.Input.Path, + headers: Operations.ReportVoiceCall.Input.Headers = .init(), + body: Operations.ReportVoiceCall.Input.Body ) { self.path = path self.headers = headers @@ -81398,102 +90446,45 @@ public enum Operations { } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json/createdAt`. - public var createdAt: Swift.String - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json/id`. - public var id: Swift.String - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json/instructions`. - public var instructions: Swift.String - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json/name`. - public var name: Swift.String - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/json/updatedAt`. - public var updatedAt: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - createdAt: - /// - id: - /// - instructions: - /// - name: - /// - updatedAt: - public init( - createdAt: Swift.String, - id: Swift.String, - instructions: Swift.String, - name: Swift.String, - updatedAt: Swift.String - ) { - self.createdAt = createdAt - self.id = id - self.instructions = instructions - self.name = name - self.updatedAt = updatedAt - } - public enum CodingKeys: String, CodingKey { - case createdAt - case id - case instructions - case name - case updatedAt - } - } - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/200/content/application\/json`. - case json(Operations.UpdateSkill.Output.Ok.Body.JsonPayload?) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.UpdateSkill.Output.Ok.Body.JsonPayload? { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.UpdateSkill.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.UpdateSkill.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/200`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.UpdateSkill.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.ReportVoiceCall.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateSkill.Output.Ok { + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.ReportVoiceCall.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -81509,26 +90500,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSkill.Output.BadRequest.Body + public var body: Operations.ReportVoiceCall.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSkill.Output.BadRequest.Body) { + public init(body: Operations.ReportVoiceCall.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateSkill.Output.BadRequest) + case badRequest(Operations.ReportVoiceCall.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateSkill.Output.BadRequest { + public var badRequest: Operations.ReportVoiceCall.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -81542,44 +90533,44 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/401/content/text\/plain`. - case plainText(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.plainText`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/401/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.plainText`. - /// - SeeAlso: `.plainText`. - public var plainText: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { get throws { switch self { - case let .plainText(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.UpdateSkill.Output.Unauthorized.Body + public var body: Operations.ReportVoiceCall.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSkill.Output.Unauthorized.Body) { + public init(body: Operations.ReportVoiceCall.Output.Unauthorized.Body) { self.body = body } } - /// Missing, expired, or invalid account session + /// Missing, revoked, or replaced voice gateway token /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateSkill.Output.Unauthorized) + case unauthorized(Operations.ReportVoiceCall.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateSkill.Output.Unauthorized { + public var unauthorized: Operations.ReportVoiceCall.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -81593,9 +90584,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -81611,26 +90602,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSkill.Output.NotFound.Body + public var body: Operations.ReportVoiceCall.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSkill.Output.NotFound.Body) { + public init(body: Operations.ReportVoiceCall.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateSkill.Output.NotFound) + case notFound(Operations.ReportVoiceCall.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateSkill.Output.NotFound { + public var notFound: Operations.ReportVoiceCall.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -81644,9 +90635,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -81662,26 +90653,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSkill.Output.MethodNotAllowed.Body + public var body: Operations.ReportVoiceCall.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSkill.Output.MethodNotAllowed.Body) { + public init(body: Operations.ReportVoiceCall.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateSkill.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ReportVoiceCall.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateSkill.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ReportVoiceCall.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -81695,9 +90686,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -81713,26 +90704,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSkill.Output.Conflict.Body + public var body: Operations.ReportVoiceCall.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSkill.Output.Conflict.Body) { + public init(body: Operations.ReportVoiceCall.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateSkill.Output.Conflict) + case conflict(Operations.ReportVoiceCall.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateSkill.Output.Conflict { + public var conflict: Operations.ReportVoiceCall.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -81746,9 +90737,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -81764,26 +90755,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSkill.Output.ContentTooLarge.Body + public var body: Operations.ReportVoiceCall.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSkill.Output.ContentTooLarge.Body) { + public init(body: Operations.ReportVoiceCall.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateSkill.Output.ContentTooLarge) + case contentTooLarge(Operations.ReportVoiceCall.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateSkill.Output.ContentTooLarge { + public var contentTooLarge: Operations.ReportVoiceCall.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -81797,9 +90788,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -81815,26 +90806,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSkill.Output.InternalServerError.Body + public var body: Operations.ReportVoiceCall.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSkill.Output.InternalServerError.Body) { + public init(body: Operations.ReportVoiceCall.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateSkill.Output.InternalServerError) + case internalServerError(Operations.ReportVoiceCall.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateSkill.Output.InternalServerError { + public var internalServerError: Operations.ReportVoiceCall.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -81848,9 +90839,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/PATCH/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/calls/{callId}/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -81866,26 +90857,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateSkill.Output.ServiceUnavailable.Body + public var body: Operations.ReportVoiceCall.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateSkill.Output.ServiceUnavailable.Body) { + public init(body: Operations.ReportVoiceCall.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/patch(updateSkill)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateSkill.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ReportVoiceCall.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateSkill.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ReportVoiceCall.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -81935,89 +90926,109 @@ public enum Operations { } } } - /// - Remark: HTTP `DELETE /v1/skills/{id}`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)`. - public enum DeleteSkill { - public static let id: Swift.String = "deleteSkill" + /// Server-sent events for the voice gateway. A config event comes first and after every change to lines, owner numbers, or their bots. With calls=true, call and cancel events ask the gateway to place and hang up calls to the owner. One stream is live per account: a new connection sends replaced to the older one and closes it. Revoking or replacing the token closes the stream. + /// + /// - Remark: HTTP `GET /v1/voice/events`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)`. + public enum StreamVoiceGatewayEvents { + public static let id: Swift.String = "streamVoiceGatewayEvents" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/path/id`. - public var id: Swift.String - /// Creates a new `Path`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/query`. + public struct Query: Sendable, Hashable { + /// With calls=true, the voice gateway declares it can place calls: bots with a line that may call the owner are offered the call_owner tool, approved call requests can dial, and call events arrive on this stream. /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id + /// - Remark: Generated from `#/paths/v1/voice/events/GET/query/calls`. + public var calls: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - calls: With calls=true, the voice gateway declares it can place calls: bots with a line that may call the owner are offered the call_owner tool, approved call requests can dial, and call events arrive on this stream. + public init(calls: Swift.String? = nil) { + self.calls = calls } } - public var path: Operations.DeleteSkill.Input.Path - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/header`. + public var query: Operations.StreamVoiceGatewayEvents.Input.Query + /// - Remark: Generated from `#/paths/v1/voice/events/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.DeleteSkill.Input.Headers + public var headers: Operations.StreamVoiceGatewayEvents.Input.Headers /// Creates a new `Input`. /// /// - Parameters: - /// - path: + /// - query: /// - headers: public init( - path: Operations.DeleteSkill.Input.Path, - headers: Operations.DeleteSkill.Input.Headers = .init() + query: Operations.StreamVoiceGatewayEvents.Input.Query = .init(), + headers: Operations.StreamVoiceGatewayEvents.Input.Headers = .init() ) { - self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/200/content/text\/event-stream`. + case textEventStream(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.textEventStream`. + /// + /// - Throws: An error if `self` is not `.textEventStream`. + /// - SeeAlso: `.textEventStream`. + public var textEventStream: OpenAPIRuntime.HTTPBody { + get throws { + switch self { + case let .textEventStream(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.StreamVoiceGatewayEvents.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.StreamVoiceGatewayEvents.Output.Ok.Body) { + self.body = body + } } - /// Success, no response body - /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.DeleteSkill.Output.NoContent) - /// Success, no response body + /// SSE stream, not a JSON array /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/204`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)/responses/200`. /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.StreamVoiceGatewayEvents.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.DeleteSkill.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.StreamVoiceGatewayEvents.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82033,26 +91044,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSkill.Output.BadRequest.Body + public var body: Operations.StreamVoiceGatewayEvents.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSkill.Output.BadRequest.Body) { + public init(body: Operations.StreamVoiceGatewayEvents.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.DeleteSkill.Output.BadRequest) + case badRequest(Operations.StreamVoiceGatewayEvents.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.DeleteSkill.Output.BadRequest { + public var badRequest: Operations.StreamVoiceGatewayEvents.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -82066,44 +91077,44 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/401/content/text\/plain`. - case plainText(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.plainText`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/401/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.plainText`. - /// - SeeAlso: `.plainText`. - public var plainText: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { get throws { switch self { - case let .plainText(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.DeleteSkill.Output.Unauthorized.Body + public var body: Operations.StreamVoiceGatewayEvents.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSkill.Output.Unauthorized.Body) { + public init(body: Operations.StreamVoiceGatewayEvents.Output.Unauthorized.Body) { self.body = body } } - /// Missing, expired, or invalid account session + /// Missing, revoked, or replaced voice gateway token /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.DeleteSkill.Output.Unauthorized) + case unauthorized(Operations.StreamVoiceGatewayEvents.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.DeleteSkill.Output.Unauthorized { + public var unauthorized: Operations.StreamVoiceGatewayEvents.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -82117,9 +91128,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82135,26 +91146,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSkill.Output.NotFound.Body + public var body: Operations.StreamVoiceGatewayEvents.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSkill.Output.NotFound.Body) { + public init(body: Operations.StreamVoiceGatewayEvents.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.DeleteSkill.Output.NotFound) + case notFound(Operations.StreamVoiceGatewayEvents.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.DeleteSkill.Output.NotFound { + public var notFound: Operations.StreamVoiceGatewayEvents.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -82168,9 +91179,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82186,26 +91197,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSkill.Output.MethodNotAllowed.Body + public var body: Operations.StreamVoiceGatewayEvents.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSkill.Output.MethodNotAllowed.Body) { + public init(body: Operations.StreamVoiceGatewayEvents.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.DeleteSkill.Output.MethodNotAllowed) + case methodNotAllowed(Operations.StreamVoiceGatewayEvents.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.DeleteSkill.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.StreamVoiceGatewayEvents.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -82219,9 +91230,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82237,26 +91248,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSkill.Output.Conflict.Body + public var body: Operations.StreamVoiceGatewayEvents.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSkill.Output.Conflict.Body) { + public init(body: Operations.StreamVoiceGatewayEvents.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.DeleteSkill.Output.Conflict) + case conflict(Operations.StreamVoiceGatewayEvents.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.DeleteSkill.Output.Conflict { + public var conflict: Operations.StreamVoiceGatewayEvents.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -82270,9 +91281,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -82288,26 +91299,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSkill.Output.ContentTooLarge.Body + public var body: Operations.StreamVoiceGatewayEvents.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSkill.Output.ContentTooLarge.Body) { + public init(body: Operations.StreamVoiceGatewayEvents.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.DeleteSkill.Output.ContentTooLarge) + case contentTooLarge(Operations.StreamVoiceGatewayEvents.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.DeleteSkill.Output.ContentTooLarge { + public var contentTooLarge: Operations.StreamVoiceGatewayEvents.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -82321,9 +91332,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82339,26 +91350,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSkill.Output.InternalServerError.Body + public var body: Operations.StreamVoiceGatewayEvents.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSkill.Output.InternalServerError.Body) { + public init(body: Operations.StreamVoiceGatewayEvents.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.DeleteSkill.Output.InternalServerError) + case internalServerError(Operations.StreamVoiceGatewayEvents.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.DeleteSkill.Output.InternalServerError { + public var internalServerError: Operations.StreamVoiceGatewayEvents.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -82372,9 +91383,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/DELETE/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/events/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82390,26 +91401,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.DeleteSkill.Output.ServiceUnavailable.Body + public var body: Operations.StreamVoiceGatewayEvents.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.DeleteSkill.Output.ServiceUnavailable.Body) { + public init(body: Operations.StreamVoiceGatewayEvents.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/delete(deleteSkill)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.DeleteSkill.Output.ServiceUnavailable) + case serviceUnavailable(Operations.StreamVoiceGatewayEvents.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.DeleteSkill.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.StreamVoiceGatewayEvents.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -82428,11 +91439,14 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } @frozen public enum AcceptableContentType: AcceptableProtocol { + case textEventStream case json case plainText case other(Swift.String) public init?(rawValue: Swift.String) { switch rawValue.lowercased() { + case "text/event-stream": + self = .textEventStream case "application/json": self = .json case "text/plain": @@ -82445,6 +91459,8 @@ public enum Operations { switch self { case let .other(string): return string + case .textEventStream: + return "text/event-stream" case .json: return "application/json" case .plainText: @@ -82453,175 +91469,167 @@ public enum Operations { } public static var allCases: [Self] { [ + .textEventStream, .json, .plainText ] } } } - /// Turns a shared skill on or off for one bot. For a bot-owned skill, assignment copies the full package and records its source ID; an existing linked copy is left unchanged. Removal deletes only direct linked copies, never name matches or the source. Source deletion leaves copies and their provenance intact. Default skills cannot be assigned. Each request is independent, so clients can report partial failures and retry safely. + /// Reports which lines the voice gateway registered with the telephone system. Accepted only while this token's /v1/voice/events stream is live, 409 otherwise; the owner sees the report in settings until that stream closes. /// - /// - Remark: HTTP `POST /v1/skills/{id}/assignment`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)`. - public enum AssignSkillBot { - public static let id: Swift.String = "assignSkillBot" + /// - Remark: HTTP `PUT /v1/voice/lines`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)`. + public enum ReportVoiceLines { + public static let id: Swift.String = "reportVoiceLines" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/path`. - public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/path/id`. - public var id: Swift.String - /// Creates a new `Path`. - /// - /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id - } - } - public var path: Operations.AssignSkillBot.Input.Path - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/header`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.AssignSkillBot.Input.Headers - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/requestBody`. + public var headers: Operations.ReportVoiceLines.Input.Headers + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/requestBody/json/assigned`. - public var assigned: Swift.Bool - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/requestBody/json/botId`. - public var botId: Swift.String + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/requestBody/json/LinesPayload`. + public struct LinesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/requestBody/json/LinesPayload/error`. + public var error: Swift.String? + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/requestBody/json/LinesPayload/registered`. + public var registered: Swift.Bool + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/requestBody/json/LinesPayload/username`. + public var username: Swift.String + /// Creates a new `LinesPayloadPayload`. + /// + /// - Parameters: + /// - error: + /// - registered: + /// - username: + public init( + error: Swift.String? = nil, + registered: Swift.Bool, + username: Swift.String + ) { + self.error = error + self.registered = registered + self.username = username + } + public enum CodingKeys: String, CodingKey { + case error + case registered + case username + } + public init(from decoder: any Swift.Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.error = try container.decodeIfPresent( + Swift.String.self, + forKey: .error + ) + self.registered = try container.decode( + Swift.Bool.self, + forKey: .registered + ) + self.username = try container.decode( + Swift.String.self, + forKey: .username + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "error", + "registered", + "username" + ]) + } + } + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/requestBody/json/lines`. + public typealias LinesPayload = [Operations.ReportVoiceLines.Input.Body.JsonPayload.LinesPayloadPayload] + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/requestBody/json/lines`. + public var lines: Operations.ReportVoiceLines.Input.Body.JsonPayload.LinesPayload /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - assigned: - /// - botId: - public init( - assigned: Swift.Bool, - botId: Swift.String - ) { - self.assigned = assigned - self.botId = botId + /// - lines: + public init(lines: Operations.ReportVoiceLines.Input.Body.JsonPayload.LinesPayload) { + self.lines = lines } public enum CodingKeys: String, CodingKey { - case assigned - case botId + case lines } public init(from decoder: any Swift.Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - self.assigned = try container.decode( - Swift.Bool.self, - forKey: .assigned - ) - self.botId = try container.decode( - Swift.String.self, - forKey: .botId + self.lines = try container.decode( + Operations.ReportVoiceLines.Input.Body.JsonPayload.LinesPayload.self, + forKey: .lines ) try decoder.ensureNoAdditionalProperties(knownKeys: [ - "assigned", - "botId" + "lines" ]) } } - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/requestBody/content/application\/json`. - case json(Operations.AssignSkillBot.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/requestBody/content/application\/json`. + case json(Operations.ReportVoiceLines.Input.Body.JsonPayload) } - public var body: Operations.AssignSkillBot.Input.Body + public var body: Operations.ReportVoiceLines.Input.Body /// Creates a new `Input`. /// /// - Parameters: - /// - path: /// - headers: /// - body: public init( - path: Operations.AssignSkillBot.Input.Path, - headers: Operations.AssignSkillBot.Input.Headers = .init(), - body: Operations.AssignSkillBot.Input.Body + headers: Operations.ReportVoiceLines.Input.Headers = .init(), + body: Operations.ReportVoiceLines.Input.Body ) { - self.path = path self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/200/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/200/content/json/skipped`. - public var skipped: Swift.Bool - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - skipped: - public init(skipped: Swift.Bool) { - self.skipped = skipped - } - public enum CodingKeys: String, CodingKey { - case skipped - } - } - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/200/content/application\/json`. - case json(Operations.AssignSkillBot.Output.Ok.Body.JsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.AssignSkillBot.Output.Ok.Body.JsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.AssignSkillBot.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.AssignSkillBot.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/200`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.AssignSkillBot.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.ReportVoiceLines.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.AssignSkillBot.Output.Ok { + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.ReportVoiceLines.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82637,26 +91645,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AssignSkillBot.Output.BadRequest.Body + public var body: Operations.ReportVoiceLines.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AssignSkillBot.Output.BadRequest.Body) { + public init(body: Operations.ReportVoiceLines.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.AssignSkillBot.Output.BadRequest) + case badRequest(Operations.ReportVoiceLines.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.AssignSkillBot.Output.BadRequest { + public var badRequest: Operations.ReportVoiceLines.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -82670,44 +91678,44 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/401/content/text\/plain`. - case plainText(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.plainText`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/401/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.plainText`. - /// - SeeAlso: `.plainText`. - public var plainText: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { get throws { switch self { - case let .plainText(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.AssignSkillBot.Output.Unauthorized.Body + public var body: Operations.ReportVoiceLines.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AssignSkillBot.Output.Unauthorized.Body) { + public init(body: Operations.ReportVoiceLines.Output.Unauthorized.Body) { self.body = body } } - /// Missing, expired, or invalid account session + /// Missing, revoked, or replaced voice gateway token /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.AssignSkillBot.Output.Unauthorized) + case unauthorized(Operations.ReportVoiceLines.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.AssignSkillBot.Output.Unauthorized { + public var unauthorized: Operations.ReportVoiceLines.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -82721,9 +91729,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82739,26 +91747,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AssignSkillBot.Output.NotFound.Body + public var body: Operations.ReportVoiceLines.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AssignSkillBot.Output.NotFound.Body) { + public init(body: Operations.ReportVoiceLines.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.AssignSkillBot.Output.NotFound) + case notFound(Operations.ReportVoiceLines.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.AssignSkillBot.Output.NotFound { + public var notFound: Operations.ReportVoiceLines.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -82772,9 +91780,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82790,26 +91798,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AssignSkillBot.Output.MethodNotAllowed.Body + public var body: Operations.ReportVoiceLines.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AssignSkillBot.Output.MethodNotAllowed.Body) { + public init(body: Operations.ReportVoiceLines.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.AssignSkillBot.Output.MethodNotAllowed) + case methodNotAllowed(Operations.ReportVoiceLines.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.AssignSkillBot.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.ReportVoiceLines.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -82823,9 +91831,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82841,26 +91849,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AssignSkillBot.Output.Conflict.Body + public var body: Operations.ReportVoiceLines.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AssignSkillBot.Output.Conflict.Body) { + public init(body: Operations.ReportVoiceLines.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.AssignSkillBot.Output.Conflict) + case conflict(Operations.ReportVoiceLines.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.AssignSkillBot.Output.Conflict { + public var conflict: Operations.ReportVoiceLines.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -82874,9 +91882,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -82892,26 +91900,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AssignSkillBot.Output.ContentTooLarge.Body + public var body: Operations.ReportVoiceLines.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AssignSkillBot.Output.ContentTooLarge.Body) { + public init(body: Operations.ReportVoiceLines.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.AssignSkillBot.Output.ContentTooLarge) + case contentTooLarge(Operations.ReportVoiceLines.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.AssignSkillBot.Output.ContentTooLarge { + public var contentTooLarge: Operations.ReportVoiceLines.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -82925,9 +91933,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82943,26 +91951,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AssignSkillBot.Output.InternalServerError.Body + public var body: Operations.ReportVoiceLines.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AssignSkillBot.Output.InternalServerError.Body) { + public init(body: Operations.ReportVoiceLines.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.AssignSkillBot.Output.InternalServerError) + case internalServerError(Operations.ReportVoiceLines.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.AssignSkillBot.Output.InternalServerError { + public var internalServerError: Operations.ReportVoiceLines.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -82976,9 +91984,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/assignment/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -82994,26 +92002,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.AssignSkillBot.Output.ServiceUnavailable.Body + public var body: Operations.ReportVoiceLines.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.AssignSkillBot.Output.ServiceUnavailable.Body) { + public init(body: Operations.ReportVoiceLines.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/assignment/post(assignSkillBot)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.AssignSkillBot.Output.ServiceUnavailable) + case serviceUnavailable(Operations.ReportVoiceLines.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.AssignSkillBot.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.ReportVoiceLines.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -83063,107 +92071,119 @@ public enum Operations { } } } - /// The upstream version an installed skill would update to. + /// Reports that a call on the line started, before the greeting is spoken; send it again after every config event while the call runs. For a call a bot placed, it also settles the call as answered. A call nobody confirms within 15 seconds of a new events stream, or 60 seconds without one, ends. 409 when the call ended, another call is active on the line, or the callId is an outside call's that no longer rings: hang up. /// - /// - Remark: HTTP `GET /v1/skills/{id}/update`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)`. - public enum GetPendingSkillUpdate { - public static let id: Swift.String = "getPendingSkillUpdate" + /// - Remark: HTTP `PUT /v1/voice/lines/{username}/calls/{callId}`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)`. + public enum StartVoiceCall { + public static let id: Swift.String = "startVoiceCall" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/path`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/path/id`. - public var id: Swift.String + /// A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404. + /// + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/path/username`. + public var username: Swift.String + /// The call's ID, the callId its spoken messages carry: a call event's callId for a call a bot placed. + /// + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/path/callId`. + public var callId: Swift.String /// Creates a new `Path`. /// /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id + /// - username: A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404. + /// - callId: The call's ID, the callId its spoken messages carry: a call event's callId for a call a bot placed. + public init( + username: Swift.String, + callId: Swift.String + ) { + self.username = username + self.callId = callId } } - public var path: Operations.GetPendingSkillUpdate.Input.Path - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/header`. + public var path: Operations.StartVoiceCall.Input.Path + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetPendingSkillUpdate.Input.Headers + public var headers: Operations.StartVoiceCall.Input.Headers + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// Creates a new `JsonPayload`. + public init() {} + public init(from decoder: any Swift.Decoder) throws { + try decoder.ensureNoAdditionalProperties(knownKeys: []) + } + } + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/requestBody/content/application\/json`. + case json(Operations.StartVoiceCall.Input.Body.JsonPayload) + } + public var body: Operations.StartVoiceCall.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.GetPendingSkillUpdate.Input.Path, - headers: Operations.GetPendingSkillUpdate.Input.Headers = .init() + path: Operations.StartVoiceCall.Input.Path, + headers: Operations.StartVoiceCall.Input.Headers = .init(), + body: Operations.StartVoiceCall.Input.Body ) { self.path = path self.headers = headers + self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/200/content/application\/json`. - case json(Components.Schemas.PendingSkillUpdate) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.PendingSkillUpdate { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.GetPendingSkillUpdate.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.GetPendingSkillUpdate.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Success + /// Success, no response body /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/200`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.GetPendingSkillUpdate.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.StartVoiceCall.Output.NoContent) + /// Success, no response body /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.GetPendingSkillUpdate.Output.Ok { + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.StartVoiceCall.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -83179,26 +92199,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPendingSkillUpdate.Output.BadRequest.Body + public var body: Operations.StartVoiceCall.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPendingSkillUpdate.Output.BadRequest.Body) { + public init(body: Operations.StartVoiceCall.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetPendingSkillUpdate.Output.BadRequest) + case badRequest(Operations.StartVoiceCall.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetPendingSkillUpdate.Output.BadRequest { + public var badRequest: Operations.StartVoiceCall.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -83212,44 +92232,44 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/401/content/text\/plain`. - case plainText(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.plainText`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/401/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.plainText`. - /// - SeeAlso: `.plainText`. - public var plainText: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { get throws { switch self { - case let .plainText(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.GetPendingSkillUpdate.Output.Unauthorized.Body + public var body: Operations.StartVoiceCall.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPendingSkillUpdate.Output.Unauthorized.Body) { + public init(body: Operations.StartVoiceCall.Output.Unauthorized.Body) { self.body = body } } - /// Missing, expired, or invalid account session + /// Missing, revoked, or replaced voice gateway token /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetPendingSkillUpdate.Output.Unauthorized) + case unauthorized(Operations.StartVoiceCall.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetPendingSkillUpdate.Output.Unauthorized { + public var unauthorized: Operations.StartVoiceCall.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -83263,9 +92283,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -83281,26 +92301,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPendingSkillUpdate.Output.NotFound.Body + public var body: Operations.StartVoiceCall.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPendingSkillUpdate.Output.NotFound.Body) { + public init(body: Operations.StartVoiceCall.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetPendingSkillUpdate.Output.NotFound) + case notFound(Operations.StartVoiceCall.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetPendingSkillUpdate.Output.NotFound { + public var notFound: Operations.StartVoiceCall.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -83314,9 +92334,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -83332,26 +92352,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPendingSkillUpdate.Output.MethodNotAllowed.Body + public var body: Operations.StartVoiceCall.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPendingSkillUpdate.Output.MethodNotAllowed.Body) { + public init(body: Operations.StartVoiceCall.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetPendingSkillUpdate.Output.MethodNotAllowed) + case methodNotAllowed(Operations.StartVoiceCall.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetPendingSkillUpdate.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.StartVoiceCall.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -83365,9 +92385,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -83383,26 +92403,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPendingSkillUpdate.Output.Conflict.Body + public var body: Operations.StartVoiceCall.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPendingSkillUpdate.Output.Conflict.Body) { + public init(body: Operations.StartVoiceCall.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetPendingSkillUpdate.Output.Conflict) + case conflict(Operations.StartVoiceCall.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetPendingSkillUpdate.Output.Conflict { + public var conflict: Operations.StartVoiceCall.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -83416,9 +92436,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -83434,26 +92454,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPendingSkillUpdate.Output.ContentTooLarge.Body + public var body: Operations.StartVoiceCall.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPendingSkillUpdate.Output.ContentTooLarge.Body) { + public init(body: Operations.StartVoiceCall.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetPendingSkillUpdate.Output.ContentTooLarge) + case contentTooLarge(Operations.StartVoiceCall.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetPendingSkillUpdate.Output.ContentTooLarge { + public var contentTooLarge: Operations.StartVoiceCall.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -83467,9 +92487,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -83485,26 +92505,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPendingSkillUpdate.Output.InternalServerError.Body + public var body: Operations.StartVoiceCall.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPendingSkillUpdate.Output.InternalServerError.Body) { + public init(body: Operations.StartVoiceCall.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetPendingSkillUpdate.Output.InternalServerError) + case internalServerError(Operations.StartVoiceCall.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetPendingSkillUpdate.Output.InternalServerError { + public var internalServerError: Operations.StartVoiceCall.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -83518,9 +92538,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/calls/{callId}/PUT/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -83536,26 +92556,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetPendingSkillUpdate.Output.ServiceUnavailable.Body + public var body: Operations.StartVoiceCall.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetPendingSkillUpdate.Output.ServiceUnavailable.Body) { + public init(body: Operations.StartVoiceCall.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/get(getPendingSkillUpdate)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetPendingSkillUpdate.Output.ServiceUnavailable) + case serviceUnavailable(Operations.StartVoiceCall.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetPendingSkillUpdate.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.StartVoiceCall.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -83605,91 +92625,125 @@ public enum Operations { } } } - /// Replaces an installed skill with its upstream version, recorded as a change the owner can revert. + /// The line's bot chat as server-sent events, the same as /v1/agents/{id}/events. While the line's active call is an outside call, the snapshots are that call's conversation instead. The stream closes when the line gets another bot, is removed, or its bot is deleted or disabled. /// - /// - Remark: HTTP `POST /v1/skills/{id}/update`. - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)`. - public enum ApplySkillUpdate { - public static let id: Swift.String = "applySkillUpdate" + /// - Remark: HTTP `GET /v1/voice/lines/{username}/events`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)`. + public enum StreamVoiceLineEvents { + public static let id: Swift.String = "streamVoiceLineEvents" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/path`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/path`. public struct Path: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/path/id`. - public var id: Swift.String + /// A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404. + /// + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/path/username`. + public var username: Swift.String /// Creates a new `Path`. /// /// - Parameters: - /// - id: - public init(id: Swift.String) { - self.id = id + /// - username: A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404. + public init(username: Swift.String) { + self.username = username } } - public var path: Operations.ApplySkillUpdate.Input.Path - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/header`. + public var path: Operations.StreamVoiceLineEvents.Input.Path + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/query/limit`. + public var limit: Swift.Int? + /// With partial=true, each snapshot's partial carries the reply text the bot is writing, updated about every 100 ms. Without it, partial stays empty and replies appear only when the turn ends. + /// + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/query/partial`. + public var partial: Swift.String? + /// The call the turn belongs to. For the line's active outside call, the stream sends that call's conversation; for another outside call's ID it answers 409: hang up. Without it, the stream follows the line's active call. + /// + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/query/callId`. + public var callId: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - limit: + /// - partial: With partial=true, each snapshot's partial carries the reply text the bot is writing, updated about every 100 ms. Without it, partial stays empty and replies appear only when the turn ends. + /// - callId: The call the turn belongs to. For the line's active outside call, the stream sends that call's conversation; for another outside call's ID it answers 409: hang up. Without it, the stream follows the line's active call. + public init( + limit: Swift.Int? = nil, + partial: Swift.String? = nil, + callId: Swift.String? = nil + ) { + self.limit = limit + self.partial = partial + self.callId = callId + } + } + public var query: Operations.StreamVoiceLineEvents.Input.Query + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ApplySkillUpdate.Input.Headers + public var headers: Operations.StreamVoiceLineEvents.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.ApplySkillUpdate.Input.Path, - headers: Operations.ApplySkillUpdate.Input.Headers = .init() + path: Operations.StreamVoiceLineEvents.Input.Path, + query: Operations.StreamVoiceLineEvents.Input.Query = .init(), + headers: Operations.StreamVoiceLineEvents.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/200/content/application\/json`. - case json(Components.Schemas.SkillPackage) - /// The associated value of the enum case if `self` is `.json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/200/content/text\/event-stream`. + case textEventStream(OpenAPIRuntime.HTTPBody) + /// The associated value of the enum case if `self` is `.textEventStream`. /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.SkillPackage { + /// - Throws: An error if `self` is not `.textEventStream`. + /// - SeeAlso: `.textEventStream`. + public var textEventStream: OpenAPIRuntime.HTTPBody { get throws { switch self { - case let .json(body): + case let .textEventStream(body): return body } } } } /// Received HTTP response body - public var body: Operations.ApplySkillUpdate.Output.Ok.Body + public var body: Operations.StreamVoiceLineEvents.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApplySkillUpdate.Output.Ok.Body) { + public init(body: Operations.StreamVoiceLineEvents.Output.Ok.Body) { self.body = body } } - /// Success + /// SSE stream, not a JSON array /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/200`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ApplySkillUpdate.Output.Ok) + case ok(Operations.StreamVoiceLineEvents.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.ApplySkillUpdate.Output.Ok { + public var ok: Operations.StreamVoiceLineEvents.Output.Ok { get throws { switch self { case let .ok(response): @@ -83703,9 +92757,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -83721,26 +92775,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApplySkillUpdate.Output.BadRequest.Body + public var body: Operations.StreamVoiceLineEvents.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApplySkillUpdate.Output.BadRequest.Body) { + public init(body: Operations.StreamVoiceLineEvents.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.ApplySkillUpdate.Output.BadRequest) + case badRequest(Operations.StreamVoiceLineEvents.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.ApplySkillUpdate.Output.BadRequest { + public var badRequest: Operations.StreamVoiceLineEvents.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -83754,44 +92808,44 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/401/content/text\/plain`. - case plainText(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.plainText`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/401/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.plainText`. - /// - SeeAlso: `.plainText`. - public var plainText: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { get throws { switch self { - case let .plainText(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.ApplySkillUpdate.Output.Unauthorized.Body + public var body: Operations.StreamVoiceLineEvents.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApplySkillUpdate.Output.Unauthorized.Body) { + public init(body: Operations.StreamVoiceLineEvents.Output.Unauthorized.Body) { self.body = body } } - /// Missing, expired, or invalid account session + /// Missing, revoked, or replaced voice gateway token /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.ApplySkillUpdate.Output.Unauthorized) + case unauthorized(Operations.StreamVoiceLineEvents.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.ApplySkillUpdate.Output.Unauthorized { + public var unauthorized: Operations.StreamVoiceLineEvents.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -83805,9 +92859,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -83823,26 +92877,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApplySkillUpdate.Output.NotFound.Body + public var body: Operations.StreamVoiceLineEvents.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApplySkillUpdate.Output.NotFound.Body) { + public init(body: Operations.StreamVoiceLineEvents.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.ApplySkillUpdate.Output.NotFound) + case notFound(Operations.StreamVoiceLineEvents.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.ApplySkillUpdate.Output.NotFound { + public var notFound: Operations.StreamVoiceLineEvents.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -83856,9 +92910,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -83874,26 +92928,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApplySkillUpdate.Output.MethodNotAllowed.Body + public var body: Operations.StreamVoiceLineEvents.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApplySkillUpdate.Output.MethodNotAllowed.Body) { + public init(body: Operations.StreamVoiceLineEvents.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.ApplySkillUpdate.Output.MethodNotAllowed) + case methodNotAllowed(Operations.StreamVoiceLineEvents.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.ApplySkillUpdate.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.StreamVoiceLineEvents.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -83907,9 +92961,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -83925,26 +92979,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApplySkillUpdate.Output.Conflict.Body + public var body: Operations.StreamVoiceLineEvents.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApplySkillUpdate.Output.Conflict.Body) { + public init(body: Operations.StreamVoiceLineEvents.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.ApplySkillUpdate.Output.Conflict) + case conflict(Operations.StreamVoiceLineEvents.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.ApplySkillUpdate.Output.Conflict { + public var conflict: Operations.StreamVoiceLineEvents.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -83958,9 +93012,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -83976,26 +93030,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApplySkillUpdate.Output.ContentTooLarge.Body + public var body: Operations.StreamVoiceLineEvents.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApplySkillUpdate.Output.ContentTooLarge.Body) { + public init(body: Operations.StreamVoiceLineEvents.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.ApplySkillUpdate.Output.ContentTooLarge) + case contentTooLarge(Operations.StreamVoiceLineEvents.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.ApplySkillUpdate.Output.ContentTooLarge { + public var contentTooLarge: Operations.StreamVoiceLineEvents.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -84009,9 +93063,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84027,26 +93081,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApplySkillUpdate.Output.InternalServerError.Body + public var body: Operations.StreamVoiceLineEvents.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApplySkillUpdate.Output.InternalServerError.Body) { + public init(body: Operations.StreamVoiceLineEvents.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.ApplySkillUpdate.Output.InternalServerError) + case internalServerError(Operations.StreamVoiceLineEvents.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.ApplySkillUpdate.Output.InternalServerError { + public var internalServerError: Operations.StreamVoiceLineEvents.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -84060,9 +93114,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/skills/{id}/update/POST/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/events/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84078,26 +93132,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ApplySkillUpdate.Output.ServiceUnavailable.Body + public var body: Operations.StreamVoiceLineEvents.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ApplySkillUpdate.Output.ServiceUnavailable.Body) { + public init(body: Operations.StreamVoiceLineEvents.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/skills/{id}/update/post(applySkillUpdate)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ApplySkillUpdate.Output.ServiceUnavailable) + case serviceUnavailable(Operations.StreamVoiceLineEvents.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.ApplySkillUpdate.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.StreamVoiceLineEvents.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -84116,11 +93170,14 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } @frozen public enum AcceptableContentType: AcceptableProtocol { + case textEventStream case json case plainText case other(Swift.String) public init?(rawValue: Swift.String) { switch rawValue.lowercased() { + case "text/event-stream": + self = .textEventStream case "application/json": self = .json case "text/plain": @@ -84133,6 +93190,8 @@ public enum Operations { switch self { case let .other(string): return string + case .textEventStream: + return "text/event-stream" case .json: return "application/json" case .plainText: @@ -84141,50 +93200,78 @@ public enum Operations { } public static var allCases: [Self] { [ + .textEventStream, .json, .plainText ] } } } - /// The account's vision model, which describes images for bots whose model can't read them, and the models that read images the account's provider keys reach. + /// A spoken message's execution, the bot's reply to it when its status is done, and whether the bot asked to hang up. Stop polling when the status is failed or cancelled: reply stays null. 404 unless the execution is a spoken message to the line's bot or a callee's message on its outside call; 409 for a callee's message whose outside call is not the line's active call. /// - /// - Remark: HTTP `GET /v1/vision-model`. - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)`. - public enum GetVisionModel { - public static let id: Swift.String = "getVisionModel" + /// - Remark: HTTP `GET /v1/voice/lines/{username}/executions/{executionId}`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)`. + public enum GetSpokenExecution { + public static let id: Swift.String = "getSpokenExecution" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/header`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/path`. + public struct Path: Sendable, Hashable { + /// A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404. + /// + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/path/username`. + public var username: Swift.String + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/path/executionId`. + public var executionId: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - username: A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404. + /// - executionId: + public init( + username: Swift.String, + executionId: Swift.String + ) { + self.username = username + self.executionId = executionId + } + } + public var path: Operations.GetSpokenExecution.Input.Path + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.GetVisionModel.Input.Headers + public var headers: Operations.GetSpokenExecution.Input.Headers /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: - public init(headers: Operations.GetVisionModel.Input.Headers = .init()) { + public init( + path: Operations.GetSpokenExecution.Input.Path, + headers: Operations.GetSpokenExecution.Input.Headers = .init() + ) { + self.path = path self.headers = headers } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/200/content/application\/json`. - case json(Components.Schemas.VisionModel) + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.SpokenExecution) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.VisionModel { + public var json: Components.Schemas.SpokenExecution { get throws { switch self { case let .json(body): @@ -84194,26 +93281,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetVisionModel.Output.Ok.Body + public var body: Operations.GetSpokenExecution.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetVisionModel.Output.Ok.Body) { + public init(body: Operations.GetSpokenExecution.Output.Ok.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/200`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.GetVisionModel.Output.Ok) + case ok(Operations.GetSpokenExecution.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.GetVisionModel.Output.Ok { + public var ok: Operations.GetSpokenExecution.Output.Ok { get throws { switch self { case let .ok(response): @@ -84227,9 +93314,9 @@ public enum Operations { } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84245,26 +93332,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetVisionModel.Output.BadRequest.Body + public var body: Operations.GetSpokenExecution.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetVisionModel.Output.BadRequest.Body) { + public init(body: Operations.GetSpokenExecution.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.GetVisionModel.Output.BadRequest) + case badRequest(Operations.GetSpokenExecution.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.GetVisionModel.Output.BadRequest { + public var badRequest: Operations.GetSpokenExecution.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -84278,44 +93365,44 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/401/content/text\/plain`. - case plainText(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.plainText`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/401/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.plainText`. - /// - SeeAlso: `.plainText`. - public var plainText: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { get throws { switch self { - case let .plainText(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.GetVisionModel.Output.Unauthorized.Body + public var body: Operations.GetSpokenExecution.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetVisionModel.Output.Unauthorized.Body) { + public init(body: Operations.GetSpokenExecution.Output.Unauthorized.Body) { self.body = body } } - /// Missing, expired, or invalid account session + /// Missing, revoked, or replaced voice gateway token /// - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.GetVisionModel.Output.Unauthorized) + case unauthorized(Operations.GetSpokenExecution.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.GetVisionModel.Output.Unauthorized { + public var unauthorized: Operations.GetSpokenExecution.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -84329,9 +93416,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84347,26 +93434,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetVisionModel.Output.NotFound.Body + public var body: Operations.GetSpokenExecution.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetVisionModel.Output.NotFound.Body) { + public init(body: Operations.GetSpokenExecution.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.GetVisionModel.Output.NotFound) + case notFound(Operations.GetSpokenExecution.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.GetVisionModel.Output.NotFound { + public var notFound: Operations.GetSpokenExecution.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -84380,9 +93467,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84398,26 +93485,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetVisionModel.Output.MethodNotAllowed.Body + public var body: Operations.GetSpokenExecution.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetVisionModel.Output.MethodNotAllowed.Body) { + public init(body: Operations.GetSpokenExecution.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.GetVisionModel.Output.MethodNotAllowed) + case methodNotAllowed(Operations.GetSpokenExecution.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.GetVisionModel.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.GetSpokenExecution.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -84431,9 +93518,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84449,26 +93536,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetVisionModel.Output.Conflict.Body + public var body: Operations.GetSpokenExecution.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetVisionModel.Output.Conflict.Body) { + public init(body: Operations.GetSpokenExecution.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.GetVisionModel.Output.Conflict) + case conflict(Operations.GetSpokenExecution.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.GetVisionModel.Output.Conflict { + public var conflict: Operations.GetSpokenExecution.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -84482,9 +93569,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -84500,26 +93587,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetVisionModel.Output.ContentTooLarge.Body + public var body: Operations.GetSpokenExecution.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetVisionModel.Output.ContentTooLarge.Body) { + public init(body: Operations.GetSpokenExecution.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.GetVisionModel.Output.ContentTooLarge) + case contentTooLarge(Operations.GetSpokenExecution.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.GetVisionModel.Output.ContentTooLarge { + public var contentTooLarge: Operations.GetSpokenExecution.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -84533,9 +93620,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84551,26 +93638,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetVisionModel.Output.InternalServerError.Body + public var body: Operations.GetSpokenExecution.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetVisionModel.Output.InternalServerError.Body) { + public init(body: Operations.GetSpokenExecution.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.GetVisionModel.Output.InternalServerError) + case internalServerError(Operations.GetSpokenExecution.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.GetVisionModel.Output.InternalServerError { + public var internalServerError: Operations.GetSpokenExecution.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -84584,9 +93671,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/GET/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/executions/{executionId}/GET/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84602,26 +93689,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.GetVisionModel.Output.ServiceUnavailable.Body + public var body: Operations.GetSpokenExecution.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.GetVisionModel.Output.ServiceUnavailable.Body) { + public init(body: Operations.GetSpokenExecution.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/vision-model/get(getVisionModel)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.GetVisionModel.Output.ServiceUnavailable) + case serviceUnavailable(Operations.GetSpokenExecution.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.GetVisionModel.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.GetSpokenExecution.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): @@ -84671,93 +93758,106 @@ public enum Operations { } } } - /// Choose the account's vision model, or turn it off with null. It must be one of the choices `getVisionModel` lists. + /// Sends what the owner said on a call to the line's bot. On the line's active outside call, what the callee said goes to that call's conversation instead, never the bot chat, under requestId outside-call:{callId}:{requestId}. The same IDs with other content answer 409, and so do a callId whose call ended and an outside call's ID that is not the line's active call: hang up. A callId the server doesn't know is accepted. /// - /// - Remark: HTTP `PUT /v1/vision-model`. - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)`. - public enum UpdateVisionModel { - public static let id: Swift.String = "updateVisionModel" + /// - Remark: HTTP `POST /v1/voice/lines/{username}/messages`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)`. + public enum SendSpokenMessage { + public static let id: Swift.String = "sendSpokenMessage" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/header`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/path`. + public struct Path: Sendable, Hashable { + /// A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404. + /// + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/path/username`. + public var username: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - username: A line's SIP username. An unknown line, or one whose bot is deleted or disabled, answers 404. + public init(username: Swift.String) { + self.username = username + } + } + public var path: Operations.SendSpokenMessage.Input.Path + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.UpdateVisionModel.Input.Headers - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody`. + public var headers: Operations.SendSpokenMessage.Input.Headers + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/json/visionModel`. - public struct VisionModelPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/json/visionModel/model`. - public var model: Swift.String - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/json/visionModel/provider`. - public var provider: Swift.String - /// Creates a new `VisionModelPayload`. - /// - /// - Parameters: - /// - model: - /// - provider: - public init( - model: Swift.String, - provider: Swift.String - ) { - self.model = model - self.provider = provider - } - public enum CodingKeys: String, CodingKey { - case model - case provider - } - } - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/json/visionModel`. - public var visionModel: Operations.UpdateVisionModel.Input.Body.JsonPayload.VisionModelPayload? + /// The call the message was spoken on. + /// + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/requestBody/json/callId`. + public var callId: Swift.String + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/requestBody/json/content`. + public var content: Swift.String + /// The message's ID within the call. Retrying with the same IDs and content returns the same execution. + /// + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/requestBody/json/requestId`. + public var requestId: Swift.String /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - visionModel: - public init(visionModel: Operations.UpdateVisionModel.Input.Body.JsonPayload.VisionModelPayload? = nil) { - self.visionModel = visionModel + /// - callId: The call the message was spoken on. + /// - content: + /// - requestId: The message's ID within the call. Retrying with the same IDs and content returns the same execution. + public init( + callId: Swift.String, + content: Swift.String, + requestId: Swift.String + ) { + self.callId = callId + self.content = content + self.requestId = requestId } public enum CodingKeys: String, CodingKey { - case visionModel + case callId + case content + case requestId } } - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/requestBody/content/application\/json`. - case json(Operations.UpdateVisionModel.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/requestBody/content/application\/json`. + case json(Operations.SendSpokenMessage.Input.Body.JsonPayload) } - public var body: Operations.UpdateVisionModel.Input.Body + public var body: Operations.SendSpokenMessage.Input.Body /// Creates a new `Input`. /// /// - Parameters: + /// - path: /// - headers: /// - body: public init( - headers: Operations.UpdateVisionModel.Input.Headers = .init(), - body: Operations.UpdateVisionModel.Input.Body + path: Operations.SendSpokenMessage.Input.Path, + headers: Operations.SendSpokenMessage.Input.Headers = .init(), + body: Operations.SendSpokenMessage.Input.Body ) { + self.path = path self.headers = headers self.body = body } } @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/200/content`. + public struct Accepted: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/202/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.VisionModel) + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/202/content/application\/json`. + case json(Components.Schemas.Execution) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.VisionModel { + public var json: Components.Schemas.Execution { get throws { switch self { case let .json(body): @@ -84767,42 +93867,42 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateVisionModel.Output.Ok.Body - /// Creates a new `Ok`. + public var body: Operations.SendSpokenMessage.Output.Accepted.Body + /// Creates a new `Accepted`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateVisionModel.Output.Ok.Body) { + public init(body: Operations.SendSpokenMessage.Output.Accepted.Body) { self.body = body } } /// Success /// - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/200`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)/responses/202`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.UpdateVisionModel.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `202 accepted`. + case accepted(Operations.SendSpokenMessage.Output.Accepted) + /// The associated value of the enum case if `self` is `.accepted`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.UpdateVisionModel.Output.Ok { + /// - Throws: An error if `self` is not `.accepted`. + /// - SeeAlso: `.accepted`. + public var accepted: Operations.SendSpokenMessage.Output.Accepted { get throws { switch self { - case let .ok(response): + case let .accepted(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "accepted", response: self ) } } } public struct BadRequest: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/400/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/400/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/400/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/400/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84818,26 +93918,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateVisionModel.Output.BadRequest.Body + public var body: Operations.SendSpokenMessage.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateVisionModel.Output.BadRequest.Body) { + public init(body: Operations.SendSpokenMessage.Output.BadRequest.Body) { self.body = body } } /// Invalid request or operation /// - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/400`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)/responses/400`. /// /// HTTP response code: `400 badRequest`. - case badRequest(Operations.UpdateVisionModel.Output.BadRequest) + case badRequest(Operations.SendSpokenMessage.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. - public var badRequest: Operations.UpdateVisionModel.Output.BadRequest { + public var badRequest: Operations.SendSpokenMessage.Output.BadRequest { get throws { switch self { case let .badRequest(response): @@ -84851,44 +93951,44 @@ public enum Operations { } } public struct Unauthorized: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/401/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/401/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/401/content/text\/plain`. - case plainText(OpenAPIRuntime.HTTPBody) - /// The associated value of the enum case if `self` is `.plainText`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/401/content/application\/json`. + case json(Components.Schemas._Error) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Throws: An error if `self` is not `.plainText`. - /// - SeeAlso: `.plainText`. - public var plainText: OpenAPIRuntime.HTTPBody { + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas._Error { get throws { switch self { - case let .plainText(body): + case let .json(body): return body } } } } /// Received HTTP response body - public var body: Operations.UpdateVisionModel.Output.Unauthorized.Body + public var body: Operations.SendSpokenMessage.Output.Unauthorized.Body /// Creates a new `Unauthorized`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateVisionModel.Output.Unauthorized.Body) { + public init(body: Operations.SendSpokenMessage.Output.Unauthorized.Body) { self.body = body } } - /// Missing, expired, or invalid account session + /// Missing, revoked, or replaced voice gateway token /// - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/401`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)/responses/401`. /// /// HTTP response code: `401 unauthorized`. - case unauthorized(Operations.UpdateVisionModel.Output.Unauthorized) + case unauthorized(Operations.SendSpokenMessage.Output.Unauthorized) /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. /// - SeeAlso: `.unauthorized`. - public var unauthorized: Operations.UpdateVisionModel.Output.Unauthorized { + public var unauthorized: Operations.SendSpokenMessage.Output.Unauthorized { get throws { switch self { case let .unauthorized(response): @@ -84902,9 +94002,9 @@ public enum Operations { } } public struct NotFound: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/404/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/404/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/404/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/404/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84920,26 +94020,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateVisionModel.Output.NotFound.Body + public var body: Operations.SendSpokenMessage.Output.NotFound.Body /// Creates a new `NotFound`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateVisionModel.Output.NotFound.Body) { + public init(body: Operations.SendSpokenMessage.Output.NotFound.Body) { self.body = body } } /// Resource not found /// - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/404`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)/responses/404`. /// /// HTTP response code: `404 notFound`. - case notFound(Operations.UpdateVisionModel.Output.NotFound) + case notFound(Operations.SendSpokenMessage.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. - public var notFound: Operations.UpdateVisionModel.Output.NotFound { + public var notFound: Operations.SendSpokenMessage.Output.NotFound { get throws { switch self { case let .notFound(response): @@ -84953,9 +94053,9 @@ public enum Operations { } } public struct MethodNotAllowed: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/405/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/405/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/405/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/405/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -84971,26 +94071,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateVisionModel.Output.MethodNotAllowed.Body + public var body: Operations.SendSpokenMessage.Output.MethodNotAllowed.Body /// Creates a new `MethodNotAllowed`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateVisionModel.Output.MethodNotAllowed.Body) { + public init(body: Operations.SendSpokenMessage.Output.MethodNotAllowed.Body) { self.body = body } } /// Resource is read-only /// - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/405`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)/responses/405`. /// /// HTTP response code: `405 methodNotAllowed`. - case methodNotAllowed(Operations.UpdateVisionModel.Output.MethodNotAllowed) + case methodNotAllowed(Operations.SendSpokenMessage.Output.MethodNotAllowed) /// The associated value of the enum case if `self` is `.methodNotAllowed`. /// /// - Throws: An error if `self` is not `.methodNotAllowed`. /// - SeeAlso: `.methodNotAllowed`. - public var methodNotAllowed: Operations.UpdateVisionModel.Output.MethodNotAllowed { + public var methodNotAllowed: Operations.SendSpokenMessage.Output.MethodNotAllowed { get throws { switch self { case let .methodNotAllowed(response): @@ -85004,9 +94104,9 @@ public enum Operations { } } public struct Conflict: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/409/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/409/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/409/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/409/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -85022,26 +94122,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateVisionModel.Output.Conflict.Body + public var body: Operations.SendSpokenMessage.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateVisionModel.Output.Conflict.Body) { + public init(body: Operations.SendSpokenMessage.Output.Conflict.Body) { self.body = body } } /// Conflicting request /// - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/409`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Operations.UpdateVisionModel.Output.Conflict) + case conflict(Operations.SendSpokenMessage.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Operations.UpdateVisionModel.Output.Conflict { + public var conflict: Operations.SendSpokenMessage.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -85055,9 +94155,9 @@ public enum Operations { } } public struct ContentTooLarge: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/413/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/413/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/413/content/text\/plain`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/413/content/text\/plain`. case plainText(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.plainText`. /// @@ -85073,26 +94173,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateVisionModel.Output.ContentTooLarge.Body + public var body: Operations.SendSpokenMessage.Output.ContentTooLarge.Body /// Creates a new `ContentTooLarge`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateVisionModel.Output.ContentTooLarge.Body) { + public init(body: Operations.SendSpokenMessage.Output.ContentTooLarge.Body) { self.body = body } } /// Request body exceeds the size limit /// - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/413`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)/responses/413`. /// /// HTTP response code: `413 contentTooLarge`. - case contentTooLarge(Operations.UpdateVisionModel.Output.ContentTooLarge) + case contentTooLarge(Operations.SendSpokenMessage.Output.ContentTooLarge) /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. /// - SeeAlso: `.contentTooLarge`. - public var contentTooLarge: Operations.UpdateVisionModel.Output.ContentTooLarge { + public var contentTooLarge: Operations.SendSpokenMessage.Output.ContentTooLarge { get throws { switch self { case let .contentTooLarge(response): @@ -85106,9 +94206,9 @@ public enum Operations { } } public struct InternalServerError: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/500/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/500/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/500/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/500/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -85124,26 +94224,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateVisionModel.Output.InternalServerError.Body + public var body: Operations.SendSpokenMessage.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateVisionModel.Output.InternalServerError.Body) { + public init(body: Operations.SendSpokenMessage.Output.InternalServerError.Body) { self.body = body } } /// Internal server error /// - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/500`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)/responses/500`. /// /// HTTP response code: `500 internalServerError`. - case internalServerError(Operations.UpdateVisionModel.Output.InternalServerError) + case internalServerError(Operations.SendSpokenMessage.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. - public var internalServerError: Operations.UpdateVisionModel.Output.InternalServerError { + public var internalServerError: Operations.SendSpokenMessage.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): @@ -85157,9 +94257,9 @@ public enum Operations { } } public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/503/content`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/503/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/v1/vision-model/PUT/responses/503/content/application\/json`. + /// - Remark: Generated from `#/paths/v1/voice/lines/{username}/messages/POST/responses/503/content/application\/json`. case json(Components.Schemas._Error) /// The associated value of the enum case if `self` is `.json`. /// @@ -85175,26 +94275,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.UpdateVisionModel.Output.ServiceUnavailable.Body + public var body: Operations.SendSpokenMessage.Output.ServiceUnavailable.Body /// Creates a new `ServiceUnavailable`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.UpdateVisionModel.Output.ServiceUnavailable.Body) { + public init(body: Operations.SendSpokenMessage.Output.ServiceUnavailable.Body) { self.body = body } } /// Service unavailable /// - /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)/responses/503`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)/responses/503`. /// /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.UpdateVisionModel.Output.ServiceUnavailable) + case serviceUnavailable(Operations.SendSpokenMessage.Output.ServiceUnavailable) /// The associated value of the enum case if `self` is `.serviceUnavailable`. /// /// - Throws: An error if `self` is not `.serviceUnavailable`. /// - SeeAlso: `.serviceUnavailable`. - public var serviceUnavailable: Operations.UpdateVisionModel.Output.ServiceUnavailable { + public var serviceUnavailable: Operations.SendSpokenMessage.Output.ServiceUnavailable { get throws { switch self { case let .serviceUnavailable(response): diff --git a/apfelkern/Sources/apfelkern/Generated/Types.swift b/apfelkern/Sources/apfelkern/Generated/Types.swift index 022fd64..a018493 100644 --- a/apfelkern/Sources/apfelkern/Generated/Types.swift +++ b/apfelkern/Sources/apfelkern/Generated/Types.swift @@ -8,6 +8,11 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /health`. /// - Remark: Generated from `#/paths//health/get(getHealth)`. func getHealth(_ input: Operations.GetHealth.Input) async throws -> Operations.GetHealth.Output + /// This document, generated by the running server. + /// + /// - Remark: HTTP `GET /openapi.json`. + /// - Remark: Generated from `#/paths//openapi.json/get(getOpenAPI)`. + func getOpenAPI(_ input: Operations.GetOpenAPI.Input) async throws -> Operations.GetOpenAPI.Output /// Bots' tool calls, tool results, MCP calls, and bot messages, and skill and memory changes, newest first. Page with `cursor` set to the previous page's `nextCursor`. A page may hold fewer than `limit` items while `hasMore` is true. /// /// - Remark: HTTP `GET /v1/activity/feed`. @@ -94,6 +99,26 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `POST /v1/agents/{id}/bot-requests/{requestId}/decline`. /// - Remark: Generated from `#/paths//v1/agents/{id}/bot-requests/{requestId}/decline/post(declineBotRequest)`. func declineBotRequest(_ input: Operations.DeclineBotRequest.Input) async throws -> Operations.DeclineBotRequest.Output + /// The bot's call requests, newest first: its proposals to phone someone other than the owner, and how each call went. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/call-requests`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)`. + func listCallRequests(_ input: Operations.ListCallRequests.Input) async throws -> Operations.ListCallRequests.Output + /// Approves a pending call request and dials at once; returns once the voice gateway was asked to call, with the status calling. 409, with the request still pending, when the request is not pending, the number no longer passes the number rules, calls to other people are switched off for the line, no voice gateway that places calls is connected, or the line has a call. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/call-requests/{requestId}/approve`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)`. + func approveCallRequest(_ input: Operations.ApproveCallRequest.Input) async throws -> Operations.ApproveCallRequest.Output + /// Declines a pending call request; the bot gets a notice. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/call-requests/{requestId}/decline`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)`. + func declineCallRequest(_ input: Operations.DeclineCallRequest.Input) async throws -> Operations.DeclineCallRequest.Output + /// The messages of the call's conversation: the callee's words as user messages and the bot's replies. Empty before the call, and when the callee objected to the call. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/call-requests/{requestId}/transcript`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)`. + func getCallRequestTranscript(_ input: Operations.GetCallRequestTranscript.Input) async throws -> Operations.GetCallRequestTranscript.Output /// - Remark: HTTP `GET /v1/agents/{id}/chat`. /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)`. func getChat(_ input: Operations.GetChat.Input) async throws -> Operations.GetChat.Output @@ -602,6 +627,61 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `PUT /v1/vision-model`. /// - Remark: Generated from `#/paths//v1/vision-model/put(updateVisionModel)`. func updateVisionModel(_ input: Operations.UpdateVisionModel.Input) async throws -> Operations.UpdateVisionModel.Output + /// The account's voice gateway: its lines and the owner's numbers, when its token was issued, and the connection status. + /// + /// - Remark: HTTP `GET /v1/voice-gateway`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)`. + func getVoiceGateway(_ input: Operations.GetVoiceGateway.Input) async throws -> Operations.GetVoiceGateway.Output + /// Saves the voice gateway's lines and the owner's numbers. 400 for an unknown bot. + /// + /// - Remark: HTTP `PUT /v1/voice-gateway`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)`. + func updateVoiceGateway(_ input: Operations.UpdateVoiceGateway.Input) async throws -> Operations.UpdateVoiceGateway.Output + /// Issues the voice gateway token, returned only once. An earlier token stops working at once. + /// + /// - Remark: HTTP `POST /v1/voice-gateway/token`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)`. + func issueVoiceGatewayToken(_ input: Operations.IssueVoiceGatewayToken.Input) async throws -> Operations.IssueVoiceGatewayToken.Output + /// Revokes the voice gateway token. 404 when none is issued. + /// + /// - Remark: HTTP `DELETE /v1/voice-gateway/token`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)`. + func revokeVoiceGatewayToken(_ input: Operations.RevokeVoiceGatewayToken.Input) async throws -> Operations.RevokeVoiceGatewayToken.Output + /// Reports a call a bot placed: ringing as soon as dialing starts, then how it settled. A call not acknowledged within 15 seconds, or not settled within 3 minutes 30 seconds of its call event, is cancelled. 404 for a call that is neither waiting to settle nor active: hang up. ended reports that a started call ended, and answers 204 for any callId. + /// + /// - Remark: HTTP `POST /v1/voice/calls/{callId}`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)`. + func reportVoiceCall(_ input: Operations.ReportVoiceCall.Input) async throws -> Operations.ReportVoiceCall.Output + /// Server-sent events for the voice gateway. A config event comes first and after every change to lines, owner numbers, or their bots. With calls=true, call and cancel events ask the gateway to place and hang up calls to the owner. One stream is live per account: a new connection sends replaced to the older one and closes it. Revoking or replacing the token closes the stream. + /// + /// - Remark: HTTP `GET /v1/voice/events`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)`. + func streamVoiceGatewayEvents(_ input: Operations.StreamVoiceGatewayEvents.Input) async throws -> Operations.StreamVoiceGatewayEvents.Output + /// Reports which lines the voice gateway registered with the telephone system. Accepted only while this token's /v1/voice/events stream is live, 409 otherwise; the owner sees the report in settings until that stream closes. + /// + /// - Remark: HTTP `PUT /v1/voice/lines`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)`. + func reportVoiceLines(_ input: Operations.ReportVoiceLines.Input) async throws -> Operations.ReportVoiceLines.Output + /// Reports that a call on the line started, before the greeting is spoken; send it again after every config event while the call runs. For a call a bot placed, it also settles the call as answered. A call nobody confirms within 15 seconds of a new events stream, or 60 seconds without one, ends. 409 when the call ended, another call is active on the line, or the callId is an outside call's that no longer rings: hang up. + /// + /// - Remark: HTTP `PUT /v1/voice/lines/{username}/calls/{callId}`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)`. + func startVoiceCall(_ input: Operations.StartVoiceCall.Input) async throws -> Operations.StartVoiceCall.Output + /// The line's bot chat as server-sent events, the same as /v1/agents/{id}/events. While the line's active call is an outside call, the snapshots are that call's conversation instead. The stream closes when the line gets another bot, is removed, or its bot is deleted or disabled. + /// + /// - Remark: HTTP `GET /v1/voice/lines/{username}/events`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)`. + func streamVoiceLineEvents(_ input: Operations.StreamVoiceLineEvents.Input) async throws -> Operations.StreamVoiceLineEvents.Output + /// A spoken message's execution, the bot's reply to it when its status is done, and whether the bot asked to hang up. Stop polling when the status is failed or cancelled: reply stays null. 404 unless the execution is a spoken message to the line's bot or a callee's message on its outside call; 409 for a callee's message whose outside call is not the line's active call. + /// + /// - Remark: HTTP `GET /v1/voice/lines/{username}/executions/{executionId}`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)`. + func getSpokenExecution(_ input: Operations.GetSpokenExecution.Input) async throws -> Operations.GetSpokenExecution.Output + /// Sends what the owner said on a call to the line's bot. On the line's active outside call, what the callee said goes to that call's conversation instead, never the bot chat, under requestId outside-call:{callId}:{requestId}. The same IDs with other content answer 409, and so do a callId whose call ended and an outside call's ID that is not the line's active call: hang up. A callId the server doesn't know is accepted. + /// + /// - Remark: HTTP `POST /v1/voice/lines/{username}/messages`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)`. + func sendSpokenMessage(_ input: Operations.SendSpokenMessage.Input) async throws -> Operations.SendSpokenMessage.Output /// - Remark: HTTP `GET /v1/web-search`. /// - Remark: Generated from `#/paths//v1/web-search/get(getWebSearch)`. func getWebSearch(_ input: Operations.GetWebSearch.Input) async throws -> Operations.GetWebSearch.Output @@ -617,6 +697,13 @@ extension APIProtocol { public func getHealth(headers: Operations.GetHealth.Input.Headers = .init()) async throws -> Operations.GetHealth.Output { try await getHealth(Operations.GetHealth.Input(headers: headers)) } + /// This document, generated by the running server. + /// + /// - Remark: HTTP `GET /openapi.json`. + /// - Remark: Generated from `#/paths//openapi.json/get(getOpenAPI)`. + public func getOpenAPI(headers: Operations.GetOpenAPI.Input.Headers = .init()) async throws -> Operations.GetOpenAPI.Output { + try await getOpenAPI(Operations.GetOpenAPI.Input(headers: headers)) + } /// Bots' tool calls, tool results, MCP calls, and bot messages, and skill and memory changes, newest first. Page with `cursor` set to the previous page's `nextCursor`. A page may hold fewer than `limit` items while `hasMore` is true. /// /// - Remark: HTTP `GET /v1/activity/feed`. @@ -833,6 +920,60 @@ extension APIProtocol { headers: headers )) } + /// The bot's call requests, newest first: its proposals to phone someone other than the owner, and how each call went. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/call-requests`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/get(listCallRequests)`. + public func listCallRequests( + path: Operations.ListCallRequests.Input.Path, + headers: Operations.ListCallRequests.Input.Headers = .init() + ) async throws -> Operations.ListCallRequests.Output { + try await listCallRequests(Operations.ListCallRequests.Input( + path: path, + headers: headers + )) + } + /// Approves a pending call request and dials at once; returns once the voice gateway was asked to call, with the status calling. 409, with the request still pending, when the request is not pending, the number no longer passes the number rules, calls to other people are switched off for the line, no voice gateway that places calls is connected, or the line has a call. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/call-requests/{requestId}/approve`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/approve/post(approveCallRequest)`. + public func approveCallRequest( + path: Operations.ApproveCallRequest.Input.Path, + headers: Operations.ApproveCallRequest.Input.Headers = .init() + ) async throws -> Operations.ApproveCallRequest.Output { + try await approveCallRequest(Operations.ApproveCallRequest.Input( + path: path, + headers: headers + )) + } + /// Declines a pending call request; the bot gets a notice. + /// + /// - Remark: HTTP `POST /v1/agents/{id}/call-requests/{requestId}/decline`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/decline/post(declineCallRequest)`. + public func declineCallRequest( + path: Operations.DeclineCallRequest.Input.Path, + headers: Operations.DeclineCallRequest.Input.Headers = .init() + ) async throws -> Operations.DeclineCallRequest.Output { + try await declineCallRequest(Operations.DeclineCallRequest.Input( + path: path, + headers: headers + )) + } + /// The messages of the call's conversation: the callee's words as user messages and the bot's replies. Empty before the call, and when the callee objected to the call. + /// + /// - Remark: HTTP `GET /v1/agents/{id}/call-requests/{requestId}/transcript`. + /// - Remark: Generated from `#/paths//v1/agents/{id}/call-requests/{requestId}/transcript/get(getCallRequestTranscript)`. + public func getCallRequestTranscript( + path: Operations.GetCallRequestTranscript.Input.Path, + query: Operations.GetCallRequestTranscript.Input.Query = .init(), + headers: Operations.GetCallRequestTranscript.Input.Headers = .init() + ) async throws -> Operations.GetCallRequestTranscript.Output { + try await getCallRequestTranscript(Operations.GetCallRequestTranscript.Input( + path: path, + query: query, + headers: headers + )) + } /// - Remark: HTTP `GET /v1/agents/{id}/chat`. /// - Remark: Generated from `#/paths//v1/agents/{id}/chat/get(getChat)`. public func getChat( @@ -2331,6 +2472,139 @@ extension APIProtocol { body: body )) } + /// The account's voice gateway: its lines and the owner's numbers, when its token was issued, and the connection status. + /// + /// - Remark: HTTP `GET /v1/voice-gateway`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/get(getVoiceGateway)`. + public func getVoiceGateway(headers: Operations.GetVoiceGateway.Input.Headers = .init()) async throws -> Operations.GetVoiceGateway.Output { + try await getVoiceGateway(Operations.GetVoiceGateway.Input(headers: headers)) + } + /// Saves the voice gateway's lines and the owner's numbers. 400 for an unknown bot. + /// + /// - Remark: HTTP `PUT /v1/voice-gateway`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/put(updateVoiceGateway)`. + public func updateVoiceGateway( + headers: Operations.UpdateVoiceGateway.Input.Headers = .init(), + body: Operations.UpdateVoiceGateway.Input.Body + ) async throws -> Operations.UpdateVoiceGateway.Output { + try await updateVoiceGateway(Operations.UpdateVoiceGateway.Input( + headers: headers, + body: body + )) + } + /// Issues the voice gateway token, returned only once. An earlier token stops working at once. + /// + /// - Remark: HTTP `POST /v1/voice-gateway/token`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/post(issueVoiceGatewayToken)`. + public func issueVoiceGatewayToken(headers: Operations.IssueVoiceGatewayToken.Input.Headers = .init()) async throws -> Operations.IssueVoiceGatewayToken.Output { + try await issueVoiceGatewayToken(Operations.IssueVoiceGatewayToken.Input(headers: headers)) + } + /// Revokes the voice gateway token. 404 when none is issued. + /// + /// - Remark: HTTP `DELETE /v1/voice-gateway/token`. + /// - Remark: Generated from `#/paths//v1/voice-gateway/token/delete(revokeVoiceGatewayToken)`. + public func revokeVoiceGatewayToken(headers: Operations.RevokeVoiceGatewayToken.Input.Headers = .init()) async throws -> Operations.RevokeVoiceGatewayToken.Output { + try await revokeVoiceGatewayToken(Operations.RevokeVoiceGatewayToken.Input(headers: headers)) + } + /// Reports a call a bot placed: ringing as soon as dialing starts, then how it settled. A call not acknowledged within 15 seconds, or not settled within 3 minutes 30 seconds of its call event, is cancelled. 404 for a call that is neither waiting to settle nor active: hang up. ended reports that a started call ended, and answers 204 for any callId. + /// + /// - Remark: HTTP `POST /v1/voice/calls/{callId}`. + /// - Remark: Generated from `#/paths//v1/voice/calls/{callId}/post(reportVoiceCall)`. + public func reportVoiceCall( + path: Operations.ReportVoiceCall.Input.Path, + headers: Operations.ReportVoiceCall.Input.Headers = .init(), + body: Operations.ReportVoiceCall.Input.Body + ) async throws -> Operations.ReportVoiceCall.Output { + try await reportVoiceCall(Operations.ReportVoiceCall.Input( + path: path, + headers: headers, + body: body + )) + } + /// Server-sent events for the voice gateway. A config event comes first and after every change to lines, owner numbers, or their bots. With calls=true, call and cancel events ask the gateway to place and hang up calls to the owner. One stream is live per account: a new connection sends replaced to the older one and closes it. Revoking or replacing the token closes the stream. + /// + /// - Remark: HTTP `GET /v1/voice/events`. + /// - Remark: Generated from `#/paths//v1/voice/events/get(streamVoiceGatewayEvents)`. + public func streamVoiceGatewayEvents( + query: Operations.StreamVoiceGatewayEvents.Input.Query = .init(), + headers: Operations.StreamVoiceGatewayEvents.Input.Headers = .init() + ) async throws -> Operations.StreamVoiceGatewayEvents.Output { + try await streamVoiceGatewayEvents(Operations.StreamVoiceGatewayEvents.Input( + query: query, + headers: headers + )) + } + /// Reports which lines the voice gateway registered with the telephone system. Accepted only while this token's /v1/voice/events stream is live, 409 otherwise; the owner sees the report in settings until that stream closes. + /// + /// - Remark: HTTP `PUT /v1/voice/lines`. + /// - Remark: Generated from `#/paths//v1/voice/lines/put(reportVoiceLines)`. + public func reportVoiceLines( + headers: Operations.ReportVoiceLines.Input.Headers = .init(), + body: Operations.ReportVoiceLines.Input.Body + ) async throws -> Operations.ReportVoiceLines.Output { + try await reportVoiceLines(Operations.ReportVoiceLines.Input( + headers: headers, + body: body + )) + } + /// Reports that a call on the line started, before the greeting is spoken; send it again after every config event while the call runs. For a call a bot placed, it also settles the call as answered. A call nobody confirms within 15 seconds of a new events stream, or 60 seconds without one, ends. 409 when the call ended, another call is active on the line, or the callId is an outside call's that no longer rings: hang up. + /// + /// - Remark: HTTP `PUT /v1/voice/lines/{username}/calls/{callId}`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/calls/{callId}/put(startVoiceCall)`. + public func startVoiceCall( + path: Operations.StartVoiceCall.Input.Path, + headers: Operations.StartVoiceCall.Input.Headers = .init(), + body: Operations.StartVoiceCall.Input.Body + ) async throws -> Operations.StartVoiceCall.Output { + try await startVoiceCall(Operations.StartVoiceCall.Input( + path: path, + headers: headers, + body: body + )) + } + /// The line's bot chat as server-sent events, the same as /v1/agents/{id}/events. While the line's active call is an outside call, the snapshots are that call's conversation instead. The stream closes when the line gets another bot, is removed, or its bot is deleted or disabled. + /// + /// - Remark: HTTP `GET /v1/voice/lines/{username}/events`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/events/get(streamVoiceLineEvents)`. + public func streamVoiceLineEvents( + path: Operations.StreamVoiceLineEvents.Input.Path, + query: Operations.StreamVoiceLineEvents.Input.Query = .init(), + headers: Operations.StreamVoiceLineEvents.Input.Headers = .init() + ) async throws -> Operations.StreamVoiceLineEvents.Output { + try await streamVoiceLineEvents(Operations.StreamVoiceLineEvents.Input( + path: path, + query: query, + headers: headers + )) + } + /// A spoken message's execution, the bot's reply to it when its status is done, and whether the bot asked to hang up. Stop polling when the status is failed or cancelled: reply stays null. 404 unless the execution is a spoken message to the line's bot or a callee's message on its outside call; 409 for a callee's message whose outside call is not the line's active call. + /// + /// - Remark: HTTP `GET /v1/voice/lines/{username}/executions/{executionId}`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/executions/{executionId}/get(getSpokenExecution)`. + public func getSpokenExecution( + path: Operations.GetSpokenExecution.Input.Path, + headers: Operations.GetSpokenExecution.Input.Headers = .init() + ) async throws -> Operations.GetSpokenExecution.Output { + try await getSpokenExecution(Operations.GetSpokenExecution.Input( + path: path, + headers: headers + )) + } + /// Sends what the owner said on a call to the line's bot. On the line's active outside call, what the callee said goes to that call's conversation instead, never the bot chat, under requestId outside-call:{callId}:{requestId}. The same IDs with other content answer 409, and so do a callId whose call ended and an outside call's ID that is not the line's active call: hang up. A callId the server doesn't know is accepted. + /// + /// - Remark: HTTP `POST /v1/voice/lines/{username}/messages`. + /// - Remark: Generated from `#/paths//v1/voice/lines/{username}/messages/post(sendSpokenMessage)`. + public func sendSpokenMessage( + path: Operations.SendSpokenMessage.Input.Path, + headers: Operations.SendSpokenMessage.Input.Headers = .init(), + body: Operations.SendSpokenMessage.Input.Body + ) async throws -> Operations.SendSpokenMessage.Output { + try await sendSpokenMessage(Operations.SendSpokenMessage.Input( + path: path, + headers: headers, + body: body + )) + } /// - Remark: HTTP `GET /v1/web-search`. /// - Remark: Generated from `#/paths//v1/web-search/get(getWebSearch)`. public func getWebSearch(headers: Operations.GetWebSearch.Input.Headers = .init()) async throws -> Operations.GetWebSearch.Output { diff --git a/apfelkern/Tests/apfelkernTests/CallRequestTests.swift b/apfelkern/Tests/apfelkernTests/CallRequestTests.swift new file mode 100644 index 0000000..e5442f2 --- /dev/null +++ b/apfelkern/Tests/apfelkernTests/CallRequestTests.swift @@ -0,0 +1,271 @@ +import Foundation +import Synchronization +import Testing +@testable import apfelkern + +private func saved( + _ status: String, outcome: String? = nil, callID: String? = nil, id: String = "r1" +) -> String { + #"{"id":"\#(id)","agentId":"a1","number":"+4930123456","callee":"Dr. Weber","goal":"Book a visit","# + + #""opening":"Hello, this is Bot.","status":"\#(status)","# + + #""callId":\#(callID.map { "\"\($0)\"" } ?? "null"),"conversationId":null,"# + + #""outcome":\#(outcome.map { "\"\($0)\"" } ?? "null"),"error":null,"# + + #""requestedAt":"2026-11-05T10:00:00Z","decidedAt":null,"endedAt":null}"# +} + +private func toolResult(_ status: String = "pending", isError: Bool? = nil) throws -> Message { + Message( + id: "m1", role: "toolResult", toolName: CallRequest.toolName, isError: isError, + toolDetails: try JSONDecoder().decode(JSONValue.self, from: Data(saved(status).utf8))) +} + +private func list(_ status: String) -> StubResponse { + StubResponse(body: Data(("[" + saved(status) + "]").utf8)) +} + +private func refused(_ status: Int, _ message: String) -> StubResponse { + StubResponse(status: status, body: Data(#"{"error":"\#(message)"}"#.utf8)) +} + +private func request( + _ status: CallRequest.Status = .ended, outcome: CallRequest.Outcome? = nil, id: String = "r1", + callID: String? = nil +) throws -> CallRequest { + var request = try #require(CallRequest(message: try toolResult())) + request.id = id + request.status = status + request.outcome = outcome + request.callID = callID + return request +} + +private func notice(_ requestID: String?, _ content: String, kind: String = "call") -> Message { + Message(id: "n", role: "user", content: .string(content), origin: MessageOrigin(kind: kind), requestId: requestID) +} + +@MainActor +private func wait(_ done: () -> Bool) async throws { + for _ in 0..<400 where !done() { try await Task.sleep(for: .milliseconds(5)) } + #expect(done()) +} + +@MainActor +private func stop(_ board: CallRequestBoard) async throws { + board.reset() + try await Task.sleep(for: .milliseconds(40)) +} + +@MainActor +private func showing(client: APIClient) async throws -> CallRequestBoard { + let board = CallRequestBoard(pollInterval: .milliseconds(5)) + board.select("a1") + board.refreshIfChanged(messages: [try toolResult()], client: client) + try await Task.sleep(for: .milliseconds(30)) + return board +} + +@Test func aCallRequestToolResultCarriesTheRequest() throws { + let request = try #require(CallRequest(message: try toolResult())) + #expect(request.id == "r1") + #expect(request.agentID == "a1") + #expect(request.callee == "Dr. Weber") + #expect(request.number == "+4930123456") + #expect(request.goal == "Book a visit") + #expect(request.opening == "Hello, this is Bot.") + #expect(request.status == .pending) + #expect(request.callID == nil) + #expect(request.outcome == nil) + #expect(shownInChat(try toolResult())) +} + +@Test func onlyASuccessfulCallRequestResultIsACard() throws { + #expect(CallRequest(message: try toolResult(isError: true)) == nil) + var other = try toolResult() + other.toolName = "memory" + #expect(CallRequest(message: other) == nil) + other = try toolResult() + other.toolDetails = .object(["id": .string("r1")]) + #expect(CallRequest(message: other) == nil) +} + +@Test func anUnknownStatusOrOutcomeIsNotACardAndFailsTheReadWithoutCrashing() async throws { + #expect(CallRequest(message: try toolResult("paused")) == nil) + try await withClient(handler: { _ in list("paused") }, test: { client in + await #expect(throws: (any Error).self) { try await client.callRequests("a1") } + }) +} + +@Test func anEndedRequestReadsItsOutcome() async throws { + let body = saved("ended", outcome: "busy", callID: "c1") + try await withClient(handler: { _ in StubResponse(body: Data(("[" + body + "]").utf8)) }, test: { client in + let request = try #require(try await client.callRequests("a1").first) + #expect(request.status == .ended) + #expect(request.outcome == .busy) + #expect(request.callID == "c1") + }) +} + +@Test(arguments: [ + (CallRequest.Status.pending, CallRequest.Outcome?.none, String?.none), + (.declined, nil, "Declined"), + (.calling, nil, "Calling"), + (.ended, .answered, "Answered"), + (.ended, .unanswered, "Not answered"), + (.ended, .busy, "Busy"), + (.ended, .failed, "Failed"), + (.ended, nil, "Ended") +]) +func aRequestNamesItsState(status: CallRequest.Status, outcome: CallRequest.Outcome?, label: String?) throws { + #expect(try request(status, outcome: outcome).stateLabel == label) +} + +@Test func aCallStartedEventForAnOutsideCallIsNotShown() { + func started(callee: String?) -> Message { + Message( + id: "e", role: "event", content: .string("Hello"), kind: CallMarker.startedKind, + call: CallEvent(callId: "c1", direction: .outbound, callee: callee)) + } + #expect(!shownInChat(started(callee: "Dr. Weber"))) + #expect(shownInChat(started(callee: nil))) +} + +@Test func aCalleeSurvivesDecoding() throws { + let json = #"{"callId":"c1","direction":"outbound","callee":"Dr. Weber"}"# + #expect(try JSONDecoder().decode(CallEvent.self, from: Data(json.utf8)).callee == "Dr. Weber") +} + +@Test func anEndNoticeBelongsToTheRequestOfItsCall() throws { + let requests = [try request(id: "r1", callID: "c1"), try request(id: "r2", callID: "c2")] + #expect(callRequest(for: notice("voice-call:c2:ended", "x"), in: requests)?.id == "r2") + #expect(callRequest(for: notice("voice-call:other:ended", "x"), in: requests) == nil) + #expect(callRequest(for: notice("voice-call:c2:started", "x"), in: requests) == nil) +} + +@Test func aSweptNoticeBelongsToItsRequest() throws { + let requests = [try request(id: "r1"), try request(id: "r2")] + #expect(callRequest(for: notice("call-request:r2", "x"), in: requests)?.id == "r2") + #expect(callRequest(for: notice("call-request:r9", "x"), in: requests) == nil) + #expect(callRequest(for: notice(nil, "x"), in: requests) == nil) + #expect(callRequest(for: notice("call-request:r2", "x", kind: "task"), in: requests) == nil) + #expect(callRequest(for: notice("call-request:r2", "x", kind: "call_request"), in: requests)?.id == "r2") +} + +@Test func aNoticeDetailDropsTheLeadingCallTo() throws { + let request = try request() + #expect(callNoticeDetail(notice("call-request:r1", "Call to Dr. Weber ended after 2 minutes."), request: request) + == "ended after 2 minutes.") + #expect(callNoticeDetail(notice("call-request:r1", "Could not reach anyone."), request: request) + == "Could not reach anyone.") +} + +@Test func aCallRequestNoticeIsTitled() { + #expect(noticeTitle(notice("call-request:r1", "x", kind: "call_request")) == "Call request") + #expect(noticeTitle(notice(nil, "x", kind: "bot_request")) == "Bot request") +} + +@Test func theTranscriptKeepsWhatWasSaid() { + let blocks = JSONValue.array([.object(["type": .string("text"), "text": .string("Hi")])]) + let silent = JSONValue.array([.object(["type": .string("toolCall")])]) + let lines = callTranscriptLines([ + Message(id: "1", role: "user", content: .string("Hello?")), + Message(id: "2", role: "assistant", content: .string("Hi"), blocks: blocks), + Message(id: "3", role: "assistant", content: .string(""), blocks: silent), + Message(id: "4", role: "toolResult", content: .string("x")), + Message(id: "5", role: "event", content: .string("x")) + ]) + #expect(lines == [ + CallTranscriptLine(id: "1", speaker: .callee, text: "Hello?"), + CallTranscriptLine(id: "2", speaker: .bot, text: "Hi") + ]) +} + +@Test func theTranscriptComesFromItsEndpoint() async throws { + try await withClient(handler: { request in + #expect(request.url?.path == "/prefix/v1/agents/a1/call-requests/r1/transcript") + return StubResponse(body: Data( + #"{"messages":[{"id":"m1","entryId":"e1","role":"user","content":"Hello?"}],"hasMore":false}"#.utf8)) + }, test: { client in + let page = try await client.callRequestTranscript("a1", id: "r1") + #expect(page.messages?.map(\.id) == ["m1"]) + #expect(page.hasMore == false) + }) +} + +@MainActor @Test func theListReplacesTheSavedCopyAndPollsWhileOpen() async throws { + try await withClient(handler: { _ in list("calling") }, test: { client in + let request = try #require(CallRequest(message: try toolResult())) + let board = CallRequestBoard() + board.select("a1") + #expect(board.current(request).status == .pending) + board.refreshIfChanged(messages: [try toolResult()], client: client) + #expect(board.needsPolling) + try await wait { board.current(request).status == .calling } + #expect(board.needsPolling) + try await stop(board) + }) +} + +@MainActor @Test func aSettledListNeedsNoPolling() async throws { + try await withClient(handler: { _ in list("declined") }, test: { client in + let board = try await showing(client: client) + try await wait { board.requests.first?.status == .declined } + #expect(!board.needsPolling) + try await stop(board) + }) +} + +@MainActor @Test func approvalShowsPendingAtOnceAndSettlesOnlyOnceTheServerConfirms() async throws { + let confirmed = Mutex(false) + try await withClient(handler: { request in + if request.httpMethod == "POST" { + #expect(request.url?.path == "/prefix/v1/agents/a1/call-requests/r1/approve") + confirmed.withLock { $0 = true } + return StubResponse(body: Data(saved("calling").utf8), delay: 0.1) + } + return confirmed.withLock { $0 } ? list("calling") : list("pending") + }, test: { client in + let request = try #require(CallRequest(message: try toolResult())) + let board = try await showing(client: client) + board.approve(request, client: client) + #expect(board.decision(for: "r1").sending) + try await Task.sleep(for: .milliseconds(30)) + #expect(board.current(request).status == .pending) + try await wait { board.current(request).status == .calling } + #expect(!board.decision(for: "r1").sending) + try await stop(board) + }) +} + +@MainActor @Test func aRefusedApprovalRestoresTheRequestWithTheServersText() async throws { + try await withClient(handler: { request in + request.httpMethod == "POST" ? refused(409, "The voice gateway is not set up") : list("pending") + }, test: { client in + let request = try #require(CallRequest(message: try toolResult())) + let board = try await showing(client: client) + board.approve(request, client: client) + try await wait { !board.decision(for: "r1").error.isEmpty } + #expect(board.decision(for: "r1").error == "The voice gateway is not set up") + #expect(!board.decision(for: "r1").sending) + #expect(board.current(request).status == .pending) + #expect(board.needsPolling) + try await stop(board) + }) +} + +@MainActor @Test func decliningACallShowsPendingUntilTheServerConfirms() async throws { + let posted = Mutex(false) + try await withClient(handler: { request in + guard request.httpMethod == "POST" else { return list(posted.withLock { $0 } ? "declined" : "pending") } + #expect(request.url?.path == "/prefix/v1/agents/a1/call-requests/r1/decline") + posted.withLock { $0 = true } + return StubResponse(body: Data(saved("declined").utf8)) + }, test: { client in + let request = try #require(CallRequest(message: try toolResult())) + let board = try await showing(client: client) + board.decline(request, client: client) + #expect(board.decision(for: "r1").sending) + #expect(board.current(request).status == .pending) + try await wait { board.current(request).status == .declined } + try await stop(board) + }) +} diff --git a/apfelkern/scripts/contract.py b/apfelkern/scripts/contract.py index 7972539..a6cf693 100644 --- a/apfelkern/scripts/contract.py +++ b/apfelkern/scripts/contract.py @@ -1,41 +1,23 @@ #!/usr/bin/env python3 -"""Verify the pinned contract and reproduce Apple's generated client.""" +"""Copy the bot contract and reproduce Apple's generated client.""" import argparse -import hashlib import json import pathlib -import re import shutil import subprocess import tempfile -import urllib.request ROOT = pathlib.Path(__file__).resolve().parent.parent TOOLS = json.loads((ROOT / "Generation" / "tools.json").read_text()) VERSION = TOOLS["generator"]["version"] GENERATOR_COMMIT = TOOLS["generator"]["revision"] -ASSETS = {"openapi.json", "chat-snapshot.schema.json", "group-chat-snapshot.schema.json", "activity-event.schema.json", "heartbeat.schema.json", "desktop-control.schema.json", "CHANGELOG.md", "source-commit.txt"} +ASSETS = {"openapi.json", "chat-snapshot.schema.json", "group-chat-snapshot.schema.json", "activity-event.schema.json", "heartbeat.schema.json", "desktop-control.schema.json"} def run(*args, **kwargs): return subprocess.run(args, check=True, **kwargs) -def verify(directory): - checksums = {} - for line in (directory / "SHA256SUMS").read_text().splitlines(): - match = re.fullmatch(r"([a-f0-9]{64}) ([A-Za-z0-9.-]+)", line) - if not match or match[2] in checksums: - raise ValueError("Invalid or duplicate checksum entry") - checksums[match[2]] = match[1] - if set(checksums) != ASSETS: - raise ValueError("Checksum manifest must cover every contract payload exactly once") - for name, expected in checksums.items(): - if hashlib.sha256((directory / name).read_bytes()).hexdigest() != expected: - raise ValueError(f"Checksum mismatch: {name}") - return checksums - - def is_nullable_union(node): return isinstance(node, dict) and {"type": "null"} in node.get("anyOf", []) and len(node["anyOf"]) > 2 @@ -95,49 +77,18 @@ def generate(directory): def main(): parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--update", help="Local export directory or contract-vX.Y.Z release tag") + parser.add_argument("--update", type=pathlib.Path, help="Directory with the contract files, such as bot/openapi") parser.add_argument("--check", action="store_true", help="Reject stale or manually edited output") args = parser.parse_args() if args.update and args.check: parser.error("--update and --check are mutually exclusive") - contract = ROOT / "Contract" if args.update: - with tempfile.TemporaryDirectory() as temporary: - if re.fullmatch(r"contract-v\d+\.\d+\.\d+", args.update): - source = pathlib.Path(temporary) - for name in sorted(ASSETS | {"SHA256SUMS"}): - url = f"https://github.com/crumble-project/bot/releases/download/{args.update}/{name}" - with urllib.request.urlopen(url) as response: - (source / name).write_bytes(response.read()) - provenance = {"kind": "release", "tag": args.update} - else: - source = pathlib.Path(args.update).resolve(strict=True) - provenance = {"kind": "local-export"} - checksums = verify(source) - version = json.loads((source / "openapi.json").read_text())["info"]["version"] - if provenance["kind"] == "release" and args.update != f"contract-v{version}": - raise ValueError("Release tag and contract version differ") - provenance.update(version=version, sourceCommit=(source / "source-commit.txt").read_text().strip(), checksums=checksums) - contract.mkdir(exist_ok=True) - for name in ASSETS | {"SHA256SUMS"}: - shutil.copyfile(source / name, contract / name) - (contract / "pin.json").write_text(json.dumps(provenance, sort_keys=True, indent=2) + "\n") - checksums = verify(contract) + for name in ASSETS: + shutil.copyfile(args.update / name, ROOT / "Contract" / name) package = (ROOT / "Package.swift").read_text() for dependency, version in [("swift-openapi-runtime", TOOLS["runtime"]), ("swift-http-types", TOOLS["httpTypes"])]: if f'.package(url: "https://github.com/apple/{dependency}", exact: "{version}")' not in package: raise ValueError(f"Package.swift does not match the recorded {dependency} version") - pin = json.loads((contract / "pin.json").read_text()) - if pin["checksums"] != checksums or pin["sourceCommit"] != (contract / "source-commit.txt").read_text().strip(): - raise ValueError("Contract pin does not match assets") - if pin["version"] != json.loads((contract / "openapi.json").read_text())["info"]["version"]: - raise ValueError("Contract pin version does not match assets") - if not re.fullmatch(r"[a-f0-9]{40}", pin["sourceCommit"]): - raise ValueError("Contract provenance must contain a full source commit") - if pin["kind"] not in {"release", "local-export"}: - raise ValueError("Unknown contract provenance kind") - if pin["kind"] == "release" and pin["tag"] != f'contract-v{pin["version"]}': - raise ValueError("Pinned release tag does not match contract version") target = ROOT / "Sources" / "apfelkern" / "Generated" with tempfile.TemporaryDirectory() as temporary: output = generate(pathlib.Path(temporary)) @@ -146,7 +97,7 @@ def main(): actual = {path.name: path.read_bytes() for path in target.iterdir()} if target.exists() else {} if expected != actual: raise ValueError("Generated output is stale or manually edited; run python3 scripts/contract.py") - print("Generated output matches the pinned contract byte-for-byte") + print("Generated output matches the contract byte-for-byte") else: if target.exists(): shutil.rmtree(target) diff --git a/apfelkern/scripts/latest-contract.py b/apfelkern/scripts/latest-contract.py deleted file mode 100644 index c6d8a25..0000000 --- a/apfelkern/scripts/latest-contract.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python3 -"""Select the latest published stable bot contract, independently of server releases.""" -import json -import os -import re -import urllib.request - -url = "https://api.github.com/repos/crumble-project/bot/releases?per_page=100" -releases = [] -while url: - headers = {"Accept": "application/vnd.github+json", "X-GitHub-Api-Version": "2022-11-28"} - if os.environ.get("GH_TOKEN"): - headers["Authorization"] = "Bearer " + os.environ["GH_TOKEN"] - with urllib.request.urlopen(urllib.request.Request(url, headers=headers)) as response: - page = json.load(response) - if not isinstance(page, list): - raise ValueError("Expected a release list") - releases.extend(page) - links = response.headers.get("Link", "") - next_page = re.search(r'<([^>]+)>; rel="next"', links) - url = next_page[1] if next_page else None -eligible = [release for release in releases - if not release["draft"] and not release["prerelease"] - and re.fullmatch(r"contract-v\d+\.\d+\.\d+", release["tag_name"])] -tag = max(eligible, key=lambda release: release["published_at"])["tag_name"] if eligible else "" -if not tag: - print("No published stable contract release; retaining the explicit local export pin.") -else: - print(tag) -if os.environ.get("GITHUB_OUTPUT"): - with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output: - output.write(f"tag={tag}\n") diff --git a/ios/CHANGELOG.md b/ios/CHANGELOG.md index 94d6960..60256b9 100644 --- a/ios/CHANGELOG.md +++ b/ios/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- A bot's request to call someone other than you appears in its chat with the callee, the number, the goal, and the opening it will say, and you approve or decline it there. A call that is under way or over shows as a row with its state; tap it to read the goal and the conversation, which updates during the call. +- A chat shows a voice gateway call as centered phone lines, as on the web: **Call started**, or, when the bot placed the call, that it called you over the greeting it spoke, and then how the call ended, with any reaction the bot left on it. A message spoken on a call says **Spoken on a call**. - The conversation list and **Settings** use large titles. A chat's header shows a larger portrait with the name in a glass capsule, as in Messages, and the composer is taller and further from the screen edges. - Sheets close and save with the system's glass X and checkmark buttons instead of **Cancel** and **Save**. Sheets with a specific action, such as **Install** or **Approve**, keep its name. - A bot's details match Android: the portrait, name, and status, then its desktop and its automations, each with an icon. A close button and an edit button sit in the top bar. The **Details** and **Memory** tabs, the model section, and the reasoning picker are gone; reasoning is set in the bot form, and memories are on the **Memory** page. diff --git a/ios/Crumble/Core/AppModel+CallRequests.swift b/ios/Crumble/Core/AppModel+CallRequests.swift new file mode 100644 index 0000000..21c6b17 --- /dev/null +++ b/ios/Crumble/Core/AppModel+CallRequests.swift @@ -0,0 +1,82 @@ +import apfelkern +import Foundation + +/// The call whose conversation the owner is reading. +struct OpenCall: Identifiable, Hashable { + var request: CallRequest + var lines: [CallTranscriptLine] = [] + var loaded = false + var failed = false + var reads = 0 + + var id: String { request.id } +} + +extension AppModel { + func refreshCallRequestsIfChanged() { + guard let client else { return } + callRequestBoard.refreshIfChanged(messages: messages, client: client) + } + + func watchCallRequests() async { + guard let client, callRequestBoard.needsPolling else { return } + await callRequestBoard.watch(client: client) + } + + func approveCallRequest(_ request: CallRequest) { + guard let client else { return } + callRequestBoard.approve(request, client: client) + } + + func declineCallRequest(_ request: CallRequest) { + guard let client else { return } + callRequestBoard.decline(request, client: client) + } + + func openCall(_ request: CallRequest) { + openedCall = OpenCall(request: callRequestBoard.current(request)) + } + + func closeCall() { openedCall = nil } + + func resetCalls() { + callRequestBoard.reset() + openedCall = nil + } + + /// The open call's request as the server last reported it. + var openCallRequest: CallRequest? { + openedCall.map { callRequestBoard.current($0.request) } + } + + /// Loads the open call's transcript, and again every `delay` while the call goes on, and once more after it ends. + func watchOpenCall(every delay: Duration = .seconds(2)) async { + guard let id = openedCall?.id else { return } + while !Task.isCancelled, openedCall?.id == id { + let calling = openCallRequest?.status == .calling + await loadCallTranscript() + guard calling else { return } + try? await Task.sleep(for: delay) + } + } + + func loadCallTranscript() async { + guard let client, let call = openedCall else { return } + let id = call.id + let agentID = call.request.agentID + let connection = generation + openedCall?.reads += 1 + let read = call.reads + 1 + let page = try? await client.callRequestTranscript(agentID, id: id) + guard generation == connection, selectedAgentID == agentID, openedCall?.id == id, + openedCall?.reads == read + else { return } + if let page { + openedCall?.lines = callTranscriptLines(page.messages ?? []) + openedCall?.failed = false + openedCall?.loaded = true + } else { + openedCall?.failed = true + } + } +} diff --git a/ios/Crumble/Core/AppModel+Chat.swift b/ios/Crumble/Core/AppModel+Chat.swift index 3fb7c4c..d6fdaa3 100644 --- a/ios/Crumble/Core/AppModel+Chat.swift +++ b/ios/Crumble/Core/AppModel+Chat.swift @@ -93,6 +93,8 @@ extension AppModel { jobBoard.select(id) heldActionBoard.select(id) botRequestBoard.select(id) + callRequestBoard.select(id) + openedCall = nil botSecretBoard.select(id) draft = composerDrafts[id] ?? "" attachments = [] @@ -129,6 +131,7 @@ extension AppModel { refreshJobsIfChanged() refreshHeldActionsIfChanged() refreshBotRequestsIfChanged() + refreshCallRequestsIfChanged() refreshBotSecretsIfChanged() var snapshot = incoming snapshot.messages = nil @@ -287,6 +290,7 @@ extension AppModel { messages = mergeMessages(messages, page.messages ?? []) refreshHeldActionsIfChanged() refreshBotRequestsIfChanged() + refreshCallRequestsIfChanged() refreshBotSecretsIfChanged() hasMore = page.hasMore ?? false oldestEntryID = page.oldestEntryId ?? "" diff --git a/ios/Crumble/Core/AppModel.swift b/ios/Crumble/Core/AppModel.swift index ce26a5d..a1e35a5 100644 --- a/ios/Crumble/Core/AppModel.swift +++ b/ios/Crumble/Core/AppModel.swift @@ -44,6 +44,8 @@ final class AppModel { let jobBoard = JobBoard() let heldActionBoard = HeldActionBoard() let botRequestBoard = BotRequestBoard() + let callRequestBoard = CallRequestBoard() + var openedCall: OpenCall? let botSecretBoard = BotSecretBoard() let gitHubAccountBoard = GitHubAccountBoard() let gitHubAppBoard = GitHubAppBoard() @@ -236,6 +238,7 @@ final class AppModel { jobBoard.reset() heldActionBoard.reset() botRequestBoard.reset() + resetCalls() botSecretBoard.reset() botSkillBoard.reset() if case .agent = route { @@ -269,6 +272,7 @@ extension AppModel { jobBoard.reset() heldActionBoard.reset() botRequestBoard.reset() + resetCalls() botSecretBoard.reset() gitHubAccountBoard.reset() gitHubAppBoard.reset() diff --git a/ios/Crumble/CrumbleApp.swift b/ios/Crumble/CrumbleApp.swift index 3c2b45c..f4300b6 100644 --- a/ios/Crumble/CrumbleApp.swift +++ b/ios/Crumble/CrumbleApp.swift @@ -200,6 +200,7 @@ struct ContentView: View { .gitHubAppSheets() .skillSheet(active: model.agentDraft == nil) .sheet(item: $model.jobHistory) { JobSheet(job: $0) } + .sheet(item: $model.openedCall) { CallSheet(call: $0) } .sheet(item: $model.groupDraft) { GroupEditorView(draft: sheetBinding($model.groupDraft, for: $0)) } } } diff --git a/ios/Crumble/Views/CallRequestViews.swift b/ios/Crumble/Views/CallRequestViews.swift new file mode 100644 index 0000000..1173dd5 --- /dev/null +++ b/ios/Crumble/Views/CallRequestViews.swift @@ -0,0 +1,213 @@ +import apfelkern +import SwiftUI + +/// A bot's proposal to phone someone other than the owner: the owner approves or declines it here. +struct CallRequestCard: View { + @Environment(AppModel.self) private var model + let request: CallRequest + + var body: some View { + let live = model.callRequestBoard.current(request) + switch live.status { + case .pending: CallRequestPendingView(request: live) + case .declined: CallRequestRow(request: live, detail: nil, opens: false) + case .calling, .ended: CallRequestRow(request: live, detail: failure(live), opens: true) + } + } + + private func failure(_ request: CallRequest) -> String? { + request.outcome == .failed ? request.error?.nilIfEmpty : nil + } +} + +/// A call request that is under way or over, in one line; tapping it opens the call. +struct CallRequestRow: View { + @Environment(AppModel.self) private var model + let request: CallRequest + let detail: String? + let opens: Bool + + var body: some View { + if opens { + Button { + model.openCall(request) + } label: { + content + } + .buttonStyle(.plain) + .accessibilityHint("Opens the call") + } else { + content + } + } + + private var content: some View { + HStack(spacing: 10) { + if request.status == .calling { + ProgressView().controlSize(.small).frame(width: 20) + } else { + Image(systemName: "phone").foregroundStyle(.secondary) + } + VStack(alignment: .leading, spacing: 2) { + Text(request.callee).font(.subheadline.weight(.medium)).lineLimit(1) + if let detail { + Text(detail).font(.caption).foregroundStyle(.secondary).lineLimit(2) + } + } + Spacer(minLength: 12) + if let label = request.stateLabel { + Text(label).font(.caption).foregroundStyle(.secondary) + } + } + .padding(.horizontal, 14) + .padding(.vertical, 10) + .frame(maxWidth: 380, minHeight: 44, alignment: .leading) + .background(Color.primary.opacity(0.07), in: .rect(cornerRadius: 14)) + .contentShape(.rect(cornerRadius: 14)) + .accessibilityElement(children: .combine) + } +} + +private struct CallRequestPendingView: View { + @Environment(AppModel.self) private var model + let request: CallRequest + + private var decision: CallRequestDecision { model.callRequestBoard.decision(for: request.id) } + + var body: some View { + VStack(alignment: .leading, spacing: 10) { + HStack(alignment: .top, spacing: 10) { + Image(systemName: "phone").foregroundStyle(.secondary) + VStack(alignment: .leading, spacing: 2) { + Text("Wants to call for you").font(.caption).foregroundStyle(.secondary) + Text(request.callee).font(.subheadline.weight(.medium)).textSelection(.enabled) + Text(request.number).font(.caption.monospaced()).foregroundStyle(.secondary).textSelection(.enabled) + } + } + Text(request.goal).font(.callout).textSelection(.enabled) + Text( + "Check that the opening says it's an AI assistant, whom it calls for, " + + "that the call is transcribed, and why it calls." + ) + .font(.caption) + .foregroundStyle(.secondary) + CallQuote(text: request.opening) + if !decision.error.isEmpty { + Text(decision.error).font(.caption).foregroundStyle(.red).textSelection(.enabled) + } + HStack(spacing: 8) { + Spacer(minLength: 0) + if decision.sending { ProgressView().controlSize(.small) } + Button("Decline") { model.declineCallRequest(request) } + Button("Approve") { model.approveCallRequest(request) } + .buttonStyle(.borderedProminent) + } + .disabled(decision.sending) + } + .padding(12) + .frame(maxWidth: 380, alignment: .leading) + .background(Color.primary.opacity(0.07), in: .rect(cornerRadius: 14)) + } +} + +private struct CallQuote: View { + let text: String + + var body: some View { + HStack(spacing: 8) { + Capsule().fill(.quaternary).frame(width: 2) + Text(text).font(.callout).foregroundStyle(.secondary).textSelection(.enabled) + } + .fixedSize(horizontal: false, vertical: true) + } +} + +/// One outside call: its goal and the conversation, which grows while the call goes on. +struct CallSheet: View { + @Environment(AppModel.self) private var model + let call: OpenCall + + private var request: CallRequest { model.callRequestBoard.current(call.request) } + private var calling: Bool { request.status == .calling } + + var body: some View { + NavigationStack { + ScrollView { content } + .defaultScrollAnchor(.bottom) + .navigationBarTitleDisplayMode(.inline) + .toolbar { + ToolbarItem(placement: .cancellationAction) { + Button(role: .close) { model.closeCall() } + } + ToolbarItem(placement: .principal) { title } + } + } + .task(id: call.id) { await model.watchOpenCall() } + } + + private var title: some View { + VStack(spacing: 2) { + Text(request.callee).font(.headline).lineLimit(1) + HStack(spacing: 6) { + Text(request.number).monospaced() + if let label = request.stateLabel { Text(label) } + } + .font(.caption) + .foregroundStyle(.secondary) + .lineLimit(1) + .minimumScaleFactor(0.75) + } + .accessibilityElement(children: .combine) + } + + private var content: some View { + VStack(alignment: .leading, spacing: 12) { + VStack(alignment: .leading, spacing: 4) { + Text("Goal").font(.caption).foregroundStyle(.secondary) + Text(request.goal).textSelection(.enabled) + } + if request.outcome == .failed, let error = request.error?.nilIfEmpty { + Text(error).font(.caption).foregroundStyle(.red).textSelection(.enabled) + } + line(speaker: botName, text: request.opening, bot: true) + ForEach(call.lines) { item in + line(speaker: item.speaker == .bot ? botName : request.callee, text: item.text, bot: item.speaker == .bot) + } + status + } + .padding(16) + .frame(maxWidth: .infinity, alignment: .leading) + } + + private var botName: String { + model.agents.first { $0.id == request.agentID }?.name ?? "Bot" + } + + @ViewBuilder private var status: some View { + if call.failed { + Text("Couldn't load the transcript.").font(.caption).foregroundStyle(.red) + } else if !call.loaded { + ProgressView().controlSize(.small).frame(maxWidth: .infinity) + } else if calling { + HStack(spacing: 6) { + ProgressView().controlSize(.small) + Text("On the call…").foregroundStyle(.secondary) + } + .accessibilityElement(children: .combine) + } else if call.lines.isEmpty { + Text("No transcript.").foregroundStyle(.secondary) + } + } + + private func line(speaker: String, text: String, bot: Bool) -> some View { + VStack(alignment: bot ? .trailing : .leading, spacing: 4) { + Text(speaker).font(.caption).foregroundStyle(.secondary).padding(.horizontal, 6) + Text(text) + .textSelection(.enabled) + .bubble(owner: bot) + .frame(maxWidth: 520, alignment: bot ? .trailing : .leading) + } + .frame(maxWidth: .infinity, alignment: bot ? .trailing : .leading) + .accessibilityElement(children: .combine) + } +} diff --git a/ios/Crumble/Views/ChatView.swift b/ios/Crumble/Views/ChatView.swift index a049d0e..e429751 100644 --- a/ios/Crumble/Views/ChatView.swift +++ b/ios/Crumble/Views/ChatView.swift @@ -89,6 +89,7 @@ struct ChatView: View { .task(id: model.jobPollDelay) { await model.watchJobs() } .task(id: model.heldActionBoard.needsPolling) { await model.watchHeldActions() } .task(id: model.botRequestBoard.needsPolling) { await model.watchBotRequests() } + .task(id: model.callRequestBoard.needsPolling) { await model.watchCallRequests() } .task(id: model.botSecretBoard.needsPolling) { await model.watchBotSecrets() } .safeAreaInset(edge: .bottom) { if model.snapshot != nil { Composer(target: .chat(agent, model: model)) } @@ -211,7 +212,7 @@ struct ChatRowView: View { case .time(_, let label): ChatTimeLabel(text: label) case .message(let message, let reactions): - MessageView(message: message, reactions: reactions, place: place) + MessageView(message: message, reactions: reactions, place: place, botName: agent.name) case .partial(let text): HStack { MarkdownText(text: text).bubble(owner: false) diff --git a/ios/Crumble/Views/MessageView.swift b/ios/Crumble/Views/MessageView.swift index 2c548e9..9de5ce9 100644 --- a/ios/Crumble/Views/MessageView.swift +++ b/ios/Crumble/Views/MessageView.swift @@ -8,10 +8,20 @@ struct MessageView: View { let message: Message var reactions: [String] = [] var place = BubblePlace() + var botName = "" private var replyable: Bool { !(message.entryId ?? "").isEmpty && (message.role == "user" || message.role == "assistant") } + private var outsideCall: CallRequest? { + callRequest(for: message, in: model.callRequestBoard.requests).flatMap { + $0.status == .declined ? nil : $0 + } + } + private func noticeDetail(_ request: CallRequest) -> String { + let detail = callNoticeDetail(message, request: request) + return detail.prefix(1).uppercased() + detail.dropFirst() + } private var owner: Bool { message.origin == nil || message.origin?.kind == "owner" } var body: some View { @@ -34,6 +44,8 @@ struct MessageView: View { JobFailureCard(failure: failure) { model.openJob(failure.kind, failure.name) } Spacer(minLength: 24) } + } else if let call = CallMarker(message: message) { + CallMarkerView(marker: call, botName: botName) } else { EventView(message: message) } @@ -55,6 +67,11 @@ struct MessageView: View { BotRequestCard(request: request) Spacer(minLength: 24) } + } else if let request = CallRequest(message: message) { + HStack { + CallRequestCard(request: request) + Spacer(minLength: 24) + } } else if let ask = BotSecretAsk(message: message) { HStack { BotSecretRequestCard(ask: ask) @@ -62,7 +79,14 @@ struct MessageView: View { } } case "user": - if let notice = noticeTitle(message) { + if let request = outsideCall { + HStack { + CallRequestRow(request: request, detail: noticeDetail(request), opens: true) + Spacer(minLength: 24) + } + } else if let call = CallMarker(message: message) { + CallMarkerView(marker: call, botName: botName, reactions: reactions) + } else if let notice = noticeTitle(message) { EventView(message: message, title: notice) } else { HStack(spacing: 0) { diff --git a/ios/CrumbleTests/CallRequestTests.swift b/ios/CrumbleTests/CallRequestTests.swift new file mode 100644 index 0000000..d5a2214 --- /dev/null +++ b/ios/CrumbleTests/CallRequestTests.swift @@ -0,0 +1,121 @@ +import apfelkern +import Foundation +import Synchronization +import Testing + +@testable import Crumble + +extension APIClientTests { + private static func saved(_ id: String, _ status: String) -> String { + #"{"id":"\#(id)","agentId":"a1","number":"+4930123456","callee":"Dr. Weber","goal":"Book a visit","# + + #""opening":"Hello, this is Bot.","status":"\#(status)","callId":"c1","conversationId":"v1","# + + #""outcome":null,"error":null,"requestedAt":"2026-11-05T10:00:00Z","decidedAt":null,"endedAt":null}"# + } + + private static let spoken = + #"{"messages":[{"id":"1","entryId":"e1","role":"user","content":"Hello?"},"# + + #"{"id":"2","entryId":"e2","role":"assistant","content":"Good day.","# + + #""blocks":[{"type":"text","text":"Good day."}]}],"# + + #""hasMore":false,"oldestEntryId":null}"# + + private static func callRequest(_ id: String, _ status: String = "calling") throws -> CallRequest { + let details = try JSONDecoder().decode(JSONValue.self, from: Data(saved(id, status).utf8)) + let message = Message( + id: "m-\(id)", role: "toolResult", toolName: CallRequest.toolName, toolDetails: details) + return try #require(CallRequest(message: message)) + } + + @MainActor private func waitForCall(_ condition: () -> Bool) async { + for _ in 0..<300 where !condition() { try? await Task.sleep(for: .milliseconds(10)) } + } + + @MainActor private func callModel( + _ handler: @escaping @Sendable (URLRequest) -> (Int, String) + ) -> AppModel { + let model = AppModel(client: StubProtocol.client(handler)) + model.updateSelectedAgent("a1") + model.callRequestBoard.select("a1") + return model + } + + @MainActor @Test func openingACallLoadsItsTranscript() async throws { + let model = callModel { request in + request.url?.path == "/v1/agents/a1/call-requests/r1/transcript" ? (200, Self.spoken) : (404, "") + } + model.openCall(try Self.callRequest("r1", "ended")) + await model.watchOpenCall() + #expect(model.openedCall?.loaded == true) + #expect(model.openedCall?.lines.map(\.text) == ["Hello?", "Good day."]) + #expect(model.openedCall?.lines.map(\.speaker) == [.callee, .bot]) + } + + @MainActor @Test func aFailedTranscriptLoadIsMarkedAndKeepsWhatWasLoaded() async throws { + let fail = Atomic(false) + let model = callModel { _ in fail.load(ordering: .acquiring) ? (500, "") : (200, Self.spoken) } + model.openCall(try Self.callRequest("r1", "ended")) + await model.loadCallTranscript() + fail.store(true, ordering: .releasing) + await model.loadCallTranscript() + #expect(model.openedCall?.failed == true) + #expect(model.openedCall?.lines.count == 2) + } + + @MainActor @Test func theTranscriptReloadsWhileCallingAndStopsAfterItEnds() async throws { + let ended = Atomic(false) + let loads = Atomic(0) + let model = callModel { request in + if request.url?.path == "/v1/agents/a1/call-requests" { + return (200, "[" + Self.saved("r1", ended.load(ordering: .acquiring) ? "ended" : "calling") + "]") + } + loads.add(1, ordering: .relaxed) + return (200, Self.spoken) + } + let client = try #require(model.client) + model.callRequestBoard.refresh(client: client) + await waitForCall { model.callRequestBoard.requests.first?.status == .calling } + model.openCall(try Self.callRequest("r1", "calling")) + let watching = Task { await model.watchOpenCall(every: .milliseconds(10)) } + await waitForCall { loads.load(ordering: .relaxed) >= 3 } + #expect(loads.load(ordering: .relaxed) >= 3) + ended.store(true, ordering: .releasing) + model.callRequestBoard.refresh(client: client) + await watching.value + let final = loads.load(ordering: .relaxed) + try? await Task.sleep(for: .milliseconds(100)) + #expect(loads.load(ordering: .relaxed) == final) + #expect(model.openCallRequest?.status == .ended) + } + + @MainActor @Test func aLateTranscriptForAnotherCallIsDropped() async throws { + let model = callModel { request in + if request.url?.path == "/v1/agents/a1/call-requests/r1/transcript" { + Thread.sleep(forTimeInterval: 0.2) + return (200, Self.spoken) + } + return (200, #"{"messages":[],"hasMore":false,"oldestEntryId":null}"#) + } + model.openCall(try Self.callRequest("r1")) + let late = Task { await model.loadCallTranscript() } + try? await Task.sleep(for: .milliseconds(30)) + model.openCall(try Self.callRequest("r2")) + await model.loadCallTranscript() + await late.value + #expect(model.openedCall?.id == "r2") + #expect(model.openedCall?.lines.isEmpty == true) + #expect(model.openedCall?.loaded == true) + } + + @MainActor @Test func aTranscriptForABotThatWasLeftIsDropped() async throws { + let model = callModel { _ in + Thread.sleep(forTimeInterval: 0.1) + return (200, Self.spoken) + } + model.openCall(try Self.callRequest("r1")) + let late = Task { await model.loadCallTranscript() } + try? await Task.sleep(for: .milliseconds(20)) + model.updateSelectedAgent("a2") + await late.value + #expect(model.openedCall?.loaded == false) + #expect(model.openedCall?.lines.isEmpty == true) + } +} diff --git a/macos/CHANGELOG.md b/macos/CHANGELOG.md index 650ea56..00e40ad 100644 --- a/macos/CHANGELOG.md +++ b/macos/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- A bot can ask to call someone other than you. Its **call request** in the chat shows the callee, number, goal, and opening, with **Decline** and **Approve**. Once placed, the call is a row with its state, and clicking it opens the call beside the chat with the goal and the transcript, live while the call goes on. A call's end notice becomes the same row. +- A chat shows a voice gateway call as centered phone lines, as on the web: **Call started**, or, when the bot placed the call, that it called you over the greeting it spoke, and then how the call ended, with any reaction the bot left on it. A message spoken on a call says **Spoken on a call**. - The bot form shows the portrait with a pencil, and the avatar editor opens in a popover instead of filling the form, as on the web. - The column beside a chat matches the web: a fixed width with the bot's portrait, its desktop, and its automations. The toolbar has **Bot Settings** in place of **Bot Desktop**, and its Details button opens and closes the column. Details and Memory tabs and the Model section are gone, and memories stay on the **Memory** page. An opened job takes the column's place. - Unsent text stays with its chat, including across launches. diff --git a/macos/Sources/Crumble/AppModel+CallRequests.swift b/macos/Sources/Crumble/AppModel+CallRequests.swift new file mode 100644 index 0000000..725c990 --- /dev/null +++ b/macos/Sources/Crumble/AppModel+CallRequests.swift @@ -0,0 +1,71 @@ +import apfelkern + +/// The call open beside the chat and what its transcript showed last. +struct OpenCall: Equatable { + var request: CallRequest + /// Tells this opening from an earlier one of the same call. + var opening: Int + var lines: [CallTranscriptLine] = [] + var loaded = false + var failed = false +} + +extension AppModel { + func refreshCallRequestsIfChanged() { + guard let client else { return } + callRequestBoard.refreshIfChanged(messages: messages, client: client) + } + + func watchCallRequests() async { + guard let client, callRequestBoard.needsPolling else { return } + await callRequestBoard.watch(client: client) + } + + func approveCallRequest(_ request: CallRequest) { + guard let client else { return } + callRequestBoard.approve(request, client: client) + } + + func declineCallRequest(_ request: CallRequest) { + guard let client else { return } + callRequestBoard.decline(request, client: client) + } + + /// Selecting the open call's card again closes it. + func openCall(_ request: CallRequest) { + if openCall?.request.id == request.id { return closeCall() } + callOpenings += 1 + jobBoard.close() + openCall = OpenCall(request: request, opening: callOpenings) + } + + func closeCall() { openCall = nil } + + /// Loads the open call's transcript, then again every two seconds while it is going on, and once + /// more after it ends. Runs until cancelled. + func watchCallTranscript() async { + guard let opening = openCall?.opening else { return } + while !Task.isCancelled { + guard let open = openCall, open.opening == opening else { return } + let calling = callRequestBoard.current(open.request).status == .calling + await loadCallTranscript(opening: opening) + guard calling else { return } + try? await Task.sleep(for: callPollInterval) + } + } + + private func loadCallTranscript(opening: Int) async { + guard let client, let open = openCall, open.opening == opening else { return } + do { + let page = try await client.callRequestTranscript( + open.request.agentID, id: open.request.id, before: "", limit: 200) + guard openCall?.opening == opening else { return } + openCall?.lines = callTranscriptLines(page.messages ?? []) + openCall?.loaded = true + openCall?.failed = false + } catch { + guard openCall?.opening == opening else { return } + openCall?.failed = true + } + } +} diff --git a/macos/Sources/Crumble/AppModel+Chat.swift b/macos/Sources/Crumble/AppModel+Chat.swift index be192fe..e0f3e4f 100644 --- a/macos/Sources/Crumble/AppModel+Chat.swift +++ b/macos/Sources/Crumble/AppModel+Chat.swift @@ -62,6 +62,8 @@ extension AppModel { jobBoard.select(id) heldActionBoard.select(id) botRequestBoard.select(id) + callRequestBoard.select(id) + openCall = nil botSecretBoard.select(id) draft = composerDrafts[id] ?? "" attachments = [] @@ -124,6 +126,7 @@ extension AppModel { refreshJobsIfChanged() refreshHeldActionsIfChanged() refreshBotRequestsIfChanged() + refreshCallRequestsIfChanged() refreshBotSecretsIfChanged() var snapshot = incoming snapshot.messages = nil @@ -271,6 +274,7 @@ extension AppModel { messages = mergeMessages(messages, page.messages ?? []) refreshHeldActionsIfChanged() refreshBotRequestsIfChanged() + refreshCallRequestsIfChanged() refreshBotSecretsIfChanged() hasMore = page.hasMore ?? false oldestEntryID = page.oldestEntryId ?? "" diff --git a/macos/Sources/Crumble/AppModel+Jobs.swift b/macos/Sources/Crumble/AppModel+Jobs.swift index 0c1a02a..96c0fa3 100644 --- a/macos/Sources/Crumble/AppModel+Jobs.swift +++ b/macos/Sources/Crumble/AppModel+Jobs.swift @@ -54,8 +54,11 @@ extension AppModel { func job(_ recorded: Job) -> Job { jobBoard.job(recorded) } + /// Selecting the open job's card again closes it. func openJob(_ kind: JobKind, _ name: String) { guard let client else { return } + if let open = jobBoard.history, open.kind == kind, open.name == name { return closeJob() } + openCall = nil jobBoard.open(kind, name, agentID: selectedAgentID, client: client) } diff --git a/macos/Sources/Crumble/AppModel.swift b/macos/Sources/Crumble/AppModel.swift index 88467c9..ff15c27 100644 --- a/macos/Sources/Crumble/AppModel.swift +++ b/macos/Sources/Crumble/AppModel.swift @@ -45,6 +45,10 @@ final class AppModel { let jobBoard = JobBoard() let heldActionBoard = HeldActionBoard() let botRequestBoard = BotRequestBoard() + let callRequestBoard = CallRequestBoard() + var openCall: OpenCall? + @ObservationIgnored var callOpenings = 0 + @ObservationIgnored var callPollInterval = Duration.seconds(2) let botSecretBoard = BotSecretBoard() let gitHubAccountBoard = GitHubAccountBoard() let gitHubAppBoard = GitHubAppBoard() @@ -316,6 +320,8 @@ extension AppModel { jobBoard.reset() heldActionBoard.reset() botRequestBoard.reset() + callRequestBoard.reset() + openCall = nil botSecretBoard.reset() gitHubAccountBoard.reset() gitHubAppBoard.reset() diff --git a/macos/Sources/Crumble/CallRequestViews.swift b/macos/Sources/Crumble/CallRequestViews.swift new file mode 100644 index 0000000..0d50391 --- /dev/null +++ b/macos/Sources/Crumble/CallRequestViews.swift @@ -0,0 +1,237 @@ +import apfelkern +import SwiftUI + +/// A bot's proposal to phone someone other than the owner: the owner approves or declines it here. +struct CallRequestCard: View { + @Environment(AppModel.self) private var model + let request: CallRequest + + var body: some View { + let live = model.callRequestBoard.current(request) + switch live.status { + case .pending: CallRequestPendingView(request: live) + case .declined: CallRequestRow(request: live) + case .calling, .ended: CallRequestRow(request: live, detail: failure(of: live)) + } + } + + private func failure(of request: CallRequest) -> String? { + request.outcome == .failed ? request.error : nil + } +} + +/// A call request or outside call that has settled, as one line; once placed, it opens the call. +struct CallRequestRow: View { + @Environment(AppModel.self) private var model + let request: CallRequest + var detail: String? + + var body: some View { + if request.status == .declined { + content + } else { + Button { + model.openCall(request) + } label: { + content.contentShape(.rect(cornerRadius: 14)) + } + .buttonStyle(.plain) + .help("Open call") + .accessibilityHint("Opens the call") + } + } + + private var content: some View { + HStack(spacing: 10) { + if request.status == .calling { + ProgressView().controlSize(.small).frame(width: 16) + } else { + Image(systemName: "phone").font(.system(size: 13)).foregroundStyle(.secondary).frame(width: 16) + } + VStack(alignment: .leading, spacing: 2) { + Text(request.callee).font(.system(size: 14, weight: .medium)).lineLimit(1) + if let detail = detail?.nilIfEmpty { + Text(detail).font(.system(size: 12)).foregroundStyle(.secondary).lineLimit(2) + } + } + Spacer(minLength: 16) + if let label = request.stateLabel { + Text(label).font(.system(size: 12)).foregroundStyle(.secondary) + } + } + .padding(.horizontal, 14) + .padding(.vertical, 10) + .frame(maxWidth: 380, alignment: .leading) + .background(Palette.bubble, in: .rect(cornerRadius: 14)) + .accessibilityElement(children: .combine) + } +} + +/// An outside call's end notice, drawn as its call request's row. +struct CallNoticeRow: View { + let request: CallRequest + let message: Message + + var body: some View { + let detail = callNoticeDetail(message, request: request) + HStack { + CallRequestRow(request: request, detail: detail.prefix(1).uppercased() + detail.dropFirst()) + Spacer(minLength: 56) + } + } +} + +private struct CallRequestPendingView: View { + @Environment(AppModel.self) private var model + let request: CallRequest + + private var decision: CallRequestDecision { model.callRequestBoard.decision(for: request.id) } + + var body: some View { + VStack(alignment: .leading, spacing: 10) { + header + Text(request.goal).font(.system(size: 13)).textSelection(.enabled) + VStack(alignment: .leading, spacing: 6) { + Text( + "Check that the opening says it's an AI assistant, whom it calls for, " + + "that the call is transcribed, and why it calls." + ) + .font(.system(size: 12)) + .foregroundStyle(.secondary) + Text(request.opening) + .font(.system(size: 13)) + .foregroundStyle(.secondary) + .textSelection(.enabled) + .padding(.leading, 10) + .overlay(alignment: .leading) { + Capsule().fill(.quaternary).frame(width: 3) + } + } + if !decision.error.isEmpty { + Text(decision.error).font(.system(size: 12)).foregroundStyle(.red).textSelection(.enabled) + } + buttons + } + .padding(12) + .frame(maxWidth: 380, alignment: .leading) + .background(Palette.bubble, in: .rect(cornerRadius: 14)) + } + + private var header: some View { + HStack(alignment: .top, spacing: 10) { + Image(systemName: "phone").font(.system(size: 13)).foregroundStyle(.secondary).frame(width: 16) + VStack(alignment: .leading, spacing: 2) { + Text("Wants to call for you").font(.system(size: 12)).foregroundStyle(.secondary) + Text(request.callee).font(.system(size: 14, weight: .medium)).lineLimit(1) + Text(request.number).font(.system(size: 12, design: .monospaced)).foregroundStyle(.secondary) + } + } + } + + private var buttons: some View { + HStack(spacing: 8) { + Spacer(minLength: 0) + if decision.sending { ProgressView().controlSize(.small) } + Button("Decline") { model.declineCallRequest(request) } + Button("Approve") { model.approveCallRequest(request) } + .buttonStyle(.borderedProminent) + } + .disabled(decision.sending) + } +} + +/// An outside call beside the chat: its goal, then what was said, live while it goes on. +struct CallSheet: View { + @Environment(AppModel.self) private var model + let call: OpenCall + let botName: String + + private var request: CallRequest { model.callRequestBoard.current(call.request) } + + var body: some View { + VStack(spacing: 0) { + header + Divider() + ScrollView { + VStack(alignment: .leading, spacing: 16) { + VStack(alignment: .leading, spacing: 4) { + Text("Goal").font(.system(size: 12)).foregroundStyle(.secondary) + Text(request.goal).font(.system(size: 14)).textSelection(.enabled) + } + if request.outcome == .failed, let error = request.error?.nilIfEmpty { + Text(error).font(.system(size: 13)).foregroundStyle(.red).textSelection(.enabled) + } + conversation + } + .padding(20) + .frame(maxWidth: .infinity, alignment: .leading) + } + } + .task(id: call.opening) { await model.watchCallTranscript() } + } + + private var header: some View { + HStack(spacing: 10) { + Image(systemName: "phone").foregroundStyle(.secondary) + VStack(alignment: .leading, spacing: 1) { + Text(request.callee).font(.subheadline.weight(.semibold)).lineLimit(1) + Text(request.number).font(.system(.caption, design: .monospaced)).foregroundStyle(.secondary) + } + Spacer(minLength: 8) + if let label = request.stateLabel { + Text(label).font(.caption).foregroundStyle(.secondary) + } + Button { + model.closeCall() + } label: { + Image(systemName: "xmark").frame(width: 24, height: 24).contentShape(Rectangle()) + } + .buttonStyle(.plain) + .foregroundStyle(.secondary) + .accessibilityLabel("Close") + .help("Close") + } + .padding(.horizontal, 16) + .frame(height: 56) + } + + private var conversation: some View { + VStack(alignment: .leading, spacing: 12) { + line(speaker: botName, text: request.opening, mine: true) + ForEach(call.lines) { item in + line( + speaker: item.speaker == .bot ? botName : request.callee, text: item.text, + mine: item.speaker == .bot) + } + if call.failed { + Text("Couldn’t load the transcript.").font(.system(size: 13)).foregroundStyle(.secondary) + } else if !call.loaded { + ProgressView().controlSize(.small).frame(maxWidth: .infinity) + } else if call.lines.isEmpty && request.status != .calling { + Text("No transcript.").font(.system(size: 13)).foregroundStyle(.secondary) + } + if request.status == .calling { + Text("On the call…").font(.system(size: 13)).foregroundStyle(.secondary) + } + } + } + + private func line(speaker: String, text: String, mine: Bool) -> some View { + VStack(alignment: mine ? .trailing : .leading, spacing: 3) { + Text(speaker).font(.system(size: 12)).foregroundStyle(.secondary) + Text(text) + .font(Palette.messageFont) + .textSelection(.enabled) + .padding(.horizontal, 12) + .padding(.vertical, 8) + .background( + mine ? AnyShapeStyle(Color.primary.opacity(0.07)) : AnyShapeStyle(Color.clear), + in: .rect(cornerRadius: 14) + ) + .overlay { + if !mine { RoundedRectangle(cornerRadius: 14).strokeBorder(.quaternary) } + } + } + .frame(maxWidth: .infinity, alignment: mine ? .trailing : .leading) + } +} diff --git a/macos/Sources/Crumble/ChatMessages.swift b/macos/Sources/Crumble/ChatMessages.swift index 081e1a3..fb8ca6d 100644 --- a/macos/Sources/Crumble/ChatMessages.swift +++ b/macos/Sources/Crumble/ChatMessages.swift @@ -7,11 +7,15 @@ struct MessageView: View { @Environment(AppModel.self) private var model let message: Message var reactions: [String] = [] + var botName = "" @State private var hovered = false private var replyable: Bool { !(message.entryId ?? "").isEmpty && (message.role == "user" || message.role == "assistant") } + private func placedCall(for message: Message) -> CallRequest? { + callRequest(for: message, in: model.callRequestBoard.requests).flatMap { $0.status == .declined ? nil : $0 } + } private var owner: Bool { message.origin == nil || message.origin?.kind == "owner" } var body: some View { switch message.role { @@ -33,11 +37,21 @@ struct MessageView: View { JobFailureCard(failure: failure) { model.openJob(failure.kind, failure.name) } Spacer(minLength: 56) } + } else if let call = CallMarker(message: message) { + if let request = placedCall(for: message) { + CallNoticeRow(request: request, message: message) + } else { + CallMarkerView(marker: call, botName: botName) + } } else { EventView(message: message) } case "user": - if let notice = noticeTitle(message) { + if let request = placedCall(for: message) { + CallNoticeRow(request: request, message: message) + } else if let call = CallMarker(message: message) { + CallMarkerView(marker: call, botName: botName, reactions: reactions) + } else if let notice = noticeTitle(message) { EventView(message: message, title: notice) } else { // Without a width cap, bubbles hug their text and the actions sit right beside them; the @@ -70,6 +84,11 @@ struct MessageView: View { BotRequestCard(request: request) Spacer(minLength: 56) } + } else if let request = CallRequest(message: message) { + HStack { + CallRequestCard(request: request) + Spacer(minLength: 56) + } } else if let ask = BotSecretAsk(message: message) { HStack { BotSecretRequestCard(ask: ask) diff --git a/macos/Sources/Crumble/ChatView.swift b/macos/Sources/Crumble/ChatView.swift index 96df7b7..635474b 100644 --- a/macos/Sources/Crumble/ChatView.swift +++ b/macos/Sources/Crumble/ChatView.swift @@ -90,6 +90,7 @@ struct ChatView: View { .task(id: model.jobPollDelay) { await model.watchJobs() } .task(id: model.heldActionBoard.needsPolling) { await model.watchHeldActions() } .task(id: model.botRequestBoard.needsPolling) { await model.watchBotRequests() } + .task(id: model.callRequestBoard.needsPolling) { await model.watchCallRequests() } .task(id: model.botSecretBoard.needsPolling) { await model.watchBotSecrets() } .background(alignment: .top) { DitherGlow(color: agent.color).frame(height: 150).ignoresSafeArea(edges: .top) @@ -117,7 +118,9 @@ struct ChatView: View { } label: { Label("Details", systemImage: "sidebar.trailing") } - .help(showsDetails && model.jobHistory == nil ? "Hide Details" : "Show Details") + .help( + showsDetails && model.jobHistory == nil && model.openCall == nil + ? "Hide Details" : "Show Details") } } .safeAreaInset(edge: .trailing, spacing: 0) { rightPanel } @@ -130,6 +133,8 @@ extension ChatView { @ViewBuilder fileprivate var rightPanel: some View { if let job = model.jobHistory { panelColumn(width: min(JobSheet.panelWidth, width / 2)) { JobSheet(job: job, inPanel: true) } + } else if let call = model.openCall { + panelColumn(width: min(JobSheet.panelWidth, width / 2)) { CallSheet(call: call, botName: agent.name) } } else if showsDetails { panelColumn(width: DetailsPanel.width) { DetailsPanel(agent: agent) @@ -148,8 +153,9 @@ extension ChatView { } fileprivate func showDetails() { - guard model.jobHistory == nil else { + guard model.jobHistory == nil, model.openCall == nil else { model.closeJob() + model.closeCall() showsDetails = true return } @@ -201,7 +207,7 @@ struct ChatRowView: View { case .time(_, let label): Text(label).font(.system(size: 12)).foregroundStyle(.secondary).frame(maxWidth: .infinity) case .message(let message, let reactions): - MessageView(message: message, reactions: reactions) + MessageView(message: message, reactions: reactions, botName: agent.name) case .thinking: let label = Working(snapshot: model.snapshot, messages: model.messages).label + "…" HStack(spacing: 10) { diff --git a/macos/Tests/CrumbleTests/CallRequestTests.swift b/macos/Tests/CrumbleTests/CallRequestTests.swift new file mode 100644 index 0000000..031052d --- /dev/null +++ b/macos/Tests/CrumbleTests/CallRequestTests.swift @@ -0,0 +1,109 @@ +import apfelkern +import Foundation +import Testing + +@testable import Crumble + +extension APIClientTests { + @MainActor private func waitForCalls(_ condition: () -> Bool) async { + for _ in 0..<200 { + if condition() { return } + try? await Task.sleep(for: .milliseconds(10)) + } + } + + private func savedCall(_ id: String, status: String) -> String { + #"{"id":"\#(id)","agentId":"a1","number":"+4930123456","callee":"Dr. Weber","goal":"Book a visit","# + + #""opening":"Hello, this is Bot.","status":"\#(status)","callId":"c1","conversationId":"v1","# + + #""outcome":null,"error":null,"requestedAt":"2026-11-05T10:00:00Z","decidedAt":null,"endedAt":null}"# + } + + @MainActor private func callModel( + status: @escaping @Sendable () -> String, saved savedStatus: String = "ended", + transcript: @escaping @Sendable (String) -> (Int, String) + ) throws -> (AppModel, CallRequest) { + let saved = savedCall("r1", status: savedStatus) + let message = Message( + id: "m1", role: "toolResult", toolName: CallRequest.toolName, + toolDetails: try JSONDecoder().decode(JSONValue.self, from: Data(saved.utf8))) + let request = try #require(CallRequest(message: message)) + let model = AppModel(client: StubProtocol.client { stubbed in + let path = stubbed.url?.path ?? "" + if path.hasSuffix("/transcript") { return transcript(path) } + if path.hasSuffix("/call-requests") { return (200, "[" + self.savedCall("r1", status: status()) + "]") } + return (404, "") + }) + model.selectedAgentID = "a1" + model.callPollInterval = .milliseconds(20) + return (model, request) + } + + private static let page = #"{"messages":[{"id":"t1","entryId":"e:1","role":"user","content":"Hello?"},"# + + #"{"id":"t2","entryId":"e:2","role":"assistant","content":"Hi, this is Bot.","# + + #""blocks":[{"type":"text","text":"Hi, this is Bot."}]}],"hasMore":false,"oldestEntryId":null}"# + + @MainActor @Test func openingACallLoadsItsTranscript() async throws { + let (model, request) = try callModel(status: { "ended" }, transcript: { _ in (200, Self.page) }) + model.openCall(request) + await model.watchCallTranscript() + #expect(model.openCall?.loaded == true) + #expect(model.openCall?.lines.map(\.text) == ["Hello?", "Hi, this is Bot."]) + #expect(model.openCall?.lines.map(\.speaker) == [.callee, .bot]) + } + + @MainActor @Test func aFailedTranscriptLoadIsMarked() async throws { + let (model, request) = try callModel(status: { "ended" }, transcript: { _ in (500, "") }) + model.openCall(request) + await model.watchCallTranscript() + #expect(model.openCall?.failed == true) + #expect(model.openCall?.loaded == false) + } + + @MainActor @Test func theTranscriptReloadsWhileCallingAndOnceAfterItEnds() async throws { + nonisolated(unsafe) var status = "calling" + let (model, request) = try callModel( + status: { status }, saved: "calling", transcript: { _ in (200, Self.page) }) + model.callRequestBoard.select("a1") + model.openCall(request) + let watching = Task { await model.watchCallTranscript() } + await waitForCalls { StubProtocol.requests.filter { $0.url?.path.hasSuffix("/transcript") == true }.count >= 3 } + #expect(StubProtocol.requests.filter { $0.url?.path.hasSuffix("/transcript") == true }.count >= 3) + + status = "ended" + model.callRequestBoard.refresh(client: try #require(model.client)) + await waitForCalls { model.callRequestBoard.current(request).status == .ended } + await watching.value + let settled = StubProtocol.requests.filter { $0.url?.path.hasSuffix("/transcript") == true }.count + try await Task.sleep(for: .milliseconds(100)) + #expect(StubProtocol.requests.filter { $0.url?.path.hasSuffix("/transcript") == true }.count == settled) + } + + @MainActor @Test func aLateTranscriptForAnotherCallIsDropped() async throws { + nonisolated(unsafe) var other = false + let (model, request) = try callModel( + status: { "ended" }, + transcript: { _ in + if !other { Thread.sleep(forTimeInterval: 0.15) } + return (200, Self.page) + }) + model.openCall(request) + let first = Task { await model.watchCallTranscript() } + try await Task.sleep(for: .milliseconds(30)) + var second = request + second.id = "r2" + other = true + model.openCall(second) + await first.value + #expect(model.openCall?.request.id == "r2") + #expect(model.openCall?.loaded == false) + #expect(model.openCall?.lines.isEmpty == true) + + other = false + model.openCall(request) + let third = Task { await model.watchCallTranscript() } + try await Task.sleep(for: .milliseconds(30)) + model.closeCall() + await third.value + #expect(model.openCall == nil) + } +}