openapi: 3.1.0
info:
  title: Phones
  version: v1
servers:
  - url: https://api.mobilerun.ai
    description: Droidrun Cloud API
security:
  - bearerAuth: []
paths:
  /devices:
    get:
      description: Returns a paginated list of the user's devices along with pagination metadata.
      operationId: list-devices
      parameters:
        - explode: false
          in: query
          name: state
          schema:
            default:
              - ready
            items:
              enum:
                - creating
                - assigned
                - ready
                - rebooting
                - migrating
                - resetting
                - terminated
                - maintenance
                - unknown
              type: string
            type:
              - array
              - "null"
        - explode: false
          in: query
          name: type
          schema:
            enum:
              - dedicated_physical_device
              - dedicated_premium_device
              - dedicated_ios_device
              - dedicated_emulated_device
              - ios_simulator
            type: string
        - explode: false
          in: query
          name: country
          schema:
            type: string
        - explode: false
          in: query
          name: name
          schema:
            type: string
        - explode: false
          in: query
          name: providerId
          schema:
            type: string
        - explode: false
          in: query
          name: page
          schema:
            default: 1
            format: int64
            type: integer
        - explode: false
          in: query
          name: pageSize
          schema:
            default: 20
            format: int64
            type: integer
        - explode: false
          in: query
          name: orderBy
          schema:
            default: createdAt
            enum:
              - id
              - createdAt
              - updatedAt
              - assignedAt
            type: string
        - explode: false
          in: query
          name: orderByDirection
          schema:
            default: desc
            enum:
              - asc
              - desc
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResponseDeviceInfo"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: List devices
      tags:
        - Devices
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const devices = await client.devices.list();

            console.log(devices.items);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            devices = client.devices.list()
            print(devices.items)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	devices, err := client.Devices.List(context.TODO(), mobileruncloud.DeviceListParams{})
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", devices.Items)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud devices list \
              --api-key 'My API Key'
    post:
      description: Requests a new device for the authenticated user from the device spec in the request body. Optional query parameters select the device type, target country, billing mode, and a profile to use as the base spec; the response returns the device and its stream token.
      operationId: create-device
      parameters:
        - explode: false
          in: query
          name: deviceType
          schema:
            enum:
              - dedicated_physical_device
              - dedicated_premium_device
              - dedicated_ios_device
              - dedicated_emulated_device
              - ios_simulator
            type: string
        - description: ISO 3166-1 alpha-2 country code. If omitted the system picks the country with the most availability.
          explode: false
          in: query
          name: country
          schema:
            description: ISO 3166-1 alpha-2 country code. If omitted the system picks the country with the most availability.
            type: string
        - description: Profile ID to use as device spec
          explode: false
          in: query
          name: profileId
          schema:
            description: Profile ID to use as device spec
            type: string
        - description: Billing mode. 'auto' uses a subscription slot when available and otherwise bills per minute; 'subscription' requires an available subscription slot; 'minute' bills per minute. Only cloud phone and cloud emulator devices support per-minute billing.
          explode: false
          in: query
          name: billing
          schema:
            default: auto
            description: Billing mode. 'auto' uses a subscription slot when available and otherwise bills per minute; 'subscription' requires an available subscription slot; 'minute' bills per minute. Only cloud phone and cloud emulator devices support per-minute billing.
            enum:
              - auto
              - subscription
              - minute
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeviceSpec"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceInfo"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: Provision a new device
      tags:
        - Devices
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const device = await client.devices.create();

            console.log(device.id);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            device = client.devices.create()
            print(device.id)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            	"github.com/stainless-sdks/droidrun-cloud-go/shared"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	device, err := client.Devices.New(context.TODO(), mobileruncloud.DeviceNewParams{
            		DeviceSpec: shared.DeviceSpecParam{},
            	})
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", device.ID)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud devices create \
              --api-key 'My API Key'
  /devices/count:
    get:
      description: Returns the number of claimed devices for the user, broken down by device type.
      operationId: count-devices
      responses:
        "200":
          content:
            application/json:
              schema:
                additionalProperties:
                  format: int64
                  type: integer
                type: object
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: Count claimed devices
      tags:
        - Devices
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.devices.count();

            console.log(response);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.devices.count()
            print(response)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	response, err := client.Devices.Count(context.TODO())
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", response)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud devices count \
              --api-key 'My API Key'
  /devices/{deviceId}:
    delete:
      description: Terminates the device and releases its resources. Termination can be scheduled for a future time or chained from a previous device via the request body, in which case a service key is required.
      operationId: terminate-device
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: Authorization
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TerminateInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: Terminate a device
      tags:
        - Devices
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.terminate('deviceId');
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.terminate(
                device_id="deviceId",
            )
        - lang: Go
          source: |
            package main

            import (
            	"context"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	err := client.Devices.Terminate(
            		context.TODO(),
            		"deviceId",
            		mobileruncloud.DeviceTerminateParams{},
            	)
            	if err != nil {
            		panic(err.Error())
            	}
            }
        - lang: CLI
          source: |-
            mobilerun-cloud devices terminate \
              --api-key 'My API Key' \
              --device-id deviceId
    get:
      description: Returns the current state and metadata for a single device, including its lifecycle state, type, stream URL, billing strategy, and timestamps. A stream token is included while the device is active.
      operationId: get-device
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceInfo"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: Get device info
      tags:
        - Devices
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const device = await client.devices.retrieve('deviceId');

            console.log(device.id);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            device = client.devices.retrieve(
                "deviceId",
            )
            print(device.id)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	device, err := client.Devices.Get(context.TODO(), "deviceId")
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", device.ID)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud devices retrieve \
              --api-key 'My API Key' \
              --device-id deviceId
  /devices/{deviceId}/capabilities:
    get:
      description: Returns the set of capabilities supported by the live device instance, reflected from the running device rather than its static type. Used to determine which tools and features are available for the device.
      operationId: get-device-capabilities
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CapabilityInfo"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: Get capabilities for a specific device
      tags:
        - Devices
  /devices/{deviceId}/name:
    put:
      description: Sets the display name for a device from the name in the request body and returns the updated device.
      operationId: update-device-name
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateNameInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceInfo"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: Update device name
      tags:
        - Devices
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const device = await client.devices.setName('deviceId', { name: 'x' });

            console.log(device.id);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            device = client.devices.set_name(
                device_id="deviceId",
                name="x",
            )
            print(device.id)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	device, err := client.Devices.SetName(
            		context.TODO(),
            		"deviceId",
            		mobileruncloud.DeviceSetNameParams{
            			Name: "x",
            		},
            	)
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", device.ID)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud devices set-name \
              --api-key 'My API Key' \
              --device-id deviceId \
              --name x
  /devices/{deviceId}/reboot:
    post:
      description: Triggers a reboot of the device. The device transitions through its reboot lifecycle and becomes ready again once the restart completes.
      operationId: reboot-device
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: Reboot a device
      tags:
        - Devices
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.reboot('deviceId');
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.reboot(
                "deviceId",
            )
        - lang: Go
          source: |
            package main

            import (
            	"context"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	err := client.Devices.Reboot(context.TODO(), "deviceId")
            	if err != nil {
            		panic(err.Error())
            	}
            }
        - lang: CLI
          source: |-
            mobilerun-cloud devices reboot \
              --api-key 'My API Key' \
              --device-id deviceId
  /devices/{deviceId}/reset:
    post:
      description: Resets the device back to a clean state, clearing installed apps and user data accumulated during the session. The device transitions through its reset lifecycle before becoming ready again.
      operationId: reset-device
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: Reset a device to a fresh state
      tags:
        - Devices
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.reset('deviceId');
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.reset(
                "deviceId",
            )
        - lang: Go
          source: |
            package main

            import (
            	"context"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	err := client.Devices.Reset(context.TODO(), "deviceId")
            	if err != nil {
            		panic(err.Error())
            	}
            }
        - lang: CLI
          source: |-
            mobilerun-cloud devices reset \
              --api-key 'My API Key' \
              --device-id deviceId
  /devices/{deviceId}/tasks:
    get:
      description: Returns a paginated list of tasks that have run on the device, along with pagination metadata.
      operationId: list-device-tasks
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - explode: false
          in: query
          name: page
          schema:
            default: 1
            format: int64
            type: integer
        - explode: false
          in: query
          name: pageSize
          schema:
            default: 20
            format: int64
            type: integer
        - explode: false
          in: query
          name: orderBy
          schema:
            default: createdAt
            enum:
              - id
              - createdAt
              - updatedAt
              - assignedAt
            type: string
        - explode: false
          in: query
          name: orderByDirection
          schema:
            default: desc
            enum:
              - asc
              - desc
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResponseTask"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: List tasks for a device
      tags:
        - Devices
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const tasks = await client.devices.tasks.list('deviceId');

            console.log(tasks.items);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            tasks = client.devices.tasks.list(
                device_id="deviceId",
            )
            print(tasks.items)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	tasks, err := client.Devices.Tasks.List(
            		context.TODO(),
            		"deviceId",
            		mobileruncloud.DeviceTaskListParams{},
            	)
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", tasks.Items)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud devices:tasks list \
              --api-key 'My API Key' \
              --device-id deviceId
  /devices/{deviceId}/wait:
    get:
      description: Blocks until the device reaches the ready state, then returns the same payload as Get device info. The call returns early with an error if the wait is cancelled or times out.
      operationId: wait-for-device-ready
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceInfo"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - bearerAuth: []
      summary: Wait for device to be ready
      tags:
        - Devices
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const device = await client.devices.waitReady('deviceId');

            console.log(device.id);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            device = client.devices.wait_ready(
                "deviceId",
            )
            print(device.id)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	device, err := client.Devices.WaitReady(context.TODO(), "deviceId")
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", device.ID)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud devices wait-ready \
              --api-key 'My API Key' \
              --device-id deviceId
  /apps:
    get:
      tags:
        - Apps Cloud Storage
      summary: List apps
      operationId: listApps
      description: Retrieves a paginated list of apps with filtering and search capabilities
      parameters:
        - schema:
            type: integer
            minimum: 1
            default: 1
          required: false
          name: page
          in: query
        - schema:
            type: integer
            minimum: 1
            default: 10
          required: false
          name: pageSize
          in: query
        - schema:
            type: string
            enum:
              - all
              - queued
              - available
              - failed
            default: all
          required: false
          name: status
          in: query
        - schema:
            type: string
            enum:
              - all
              - android
              - ios
            default: all
          required: false
          name: platform
          in: query
        - schema:
            type: string
          required: false
          name: query
          in: query
        - schema:
            type: string
            enum:
              - createdAt
              - name
            default: createdAt
          required: false
          name: sortBy
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          required: false
          name: order
          in: query
      responses:
        "200":
          description: Apps retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/PublicAppWithVersion"
                  pagination:
                    $ref: "#/components/schemas/Pagination"
                  count:
                    type: object
                    properties:
                      availableCount:
                        type: number
                      queuedCount:
                        type: number
                      failedCount:
                        type: number
                      totalCount:
                        type: number
                    required:
                      - availableCount
                      - queuedCount
                      - failedCount
                      - totalCount
                required:
                  - items
                  - pagination
                  - count
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const apps = await client.apps.list();

            console.log(apps.count);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            apps = client.apps.list()
            print(apps.count)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	apps, err := client.Apps.List(context.TODO(), mobileruncloud.AppListParams{})
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", apps.Count)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud apps list \
              --api-key 'My API Key'
  /apps/create-signed-upload-url:
    post:
      tags:
        - Apps Cloud Storage
      summary: Create a signed R2 upload URL for an app
      operationId: createSignedUploadUrlPublic
      description: Creates or updates an app and returns pre-signed Cloudflare R2 upload URLs for each file
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                bundleId:
                  type: string
                  minLength: 1
                  maxLength: 255
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_-]*)+$
                platform:
                  type: string
                  enum:
                    - android
                    - ios
                  default: android
                displayName:
                  type: string
                  minLength: 1
                versionCode:
                  type: number
                versionName:
                  type: string
                  minLength: 1
                country:
                  type: string
                  default: US
                  description: Country code for Search Results
                  example: US
                description:
                  type: string
                iconURL:
                  anyOf:
                    - type: string
                    - type: string
                      format: uri
                    - type: string
                targetSdk:
                  type: number
                developerName:
                  type: string
                files:
                  type: array
                  items:
                    type: object
                    properties:
                      fileName:
                        type: string
                        minLength: 1
                        pattern: ^[^/\\]+\.(apk|xapk|apks|ipa)$/i
                      contentType:
                        type: string
                        enum:
                          - application/vnd.android.package-archive
                          - application/octet-stream
                          - application/zip
                      sha256:
                        type: string
                        pattern: ^[a-f0-9]{64}$/i
                    required:
                      - fileName
                      - contentType
                  minItems: 1
              required:
                - bundleId
                - displayName
                - versionCode
                - versionName
                - files
      responses:
        "200":
          description: Signed upload URL created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  versionId:
                    type: string
                    format: uuid
                    description: App version ID in the database
                  appId:
                    type: string
                    format: uuid
                    description: App ID in the database
                  r2UploadUrls:
                    type: array
                    items:
                      type: object
                      properties:
                        fileName:
                          type: string
                        r2UploadUrl:
                          type: string
                          format: uri
                      required:
                        - fileName
                        - r2UploadUrl
                    description: Pre-signed Cloudflare R2 URLs for uploading app files
                required:
                  - versionId
                  - appId
                  - r2UploadUrls
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.apps.createSignedUploadURL({
              bundleId: 'NX0.JB-_-.m-u--_-p.Z1-u_2I.D--_T-_.dzZ-.Wx.L_a8--_.w_D_',
              displayName: 'x',
              files: [
                { contentType: 'application/vnd.android.package-archive', fileName: 'J!Q0Ok0bzJb7.apk/i' },
              ],
              versionCode: 0,
              versionName: 'x',
            });

            console.log(response.appId);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.apps.create_signed_upload_url(
                bundle_id="NX0.JB-_-.m-u--_-p.Z1-u_2I.D--_T-_.dzZ-.Wx.L_a8--_.w_D_",
                display_name="x",
                files=[{
                    "content_type": "application/vnd.android.package-archive",
                    "file_name": "J!Q0Ok0bzJb7.apk/i",
                }],
                version_code=0,
                version_name="x",
            )
            print(response.app_id)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	response, err := client.Apps.NewSignedUploadURL(context.TODO(), mobileruncloud.AppNewSignedUploadURLParams{
            		BundleID:    "NX0.JB-_-.m-u--_-p.Z1-u_2I.D--_T-_.dzZ-.Wx.L_a8--_.w_D_",
            		DisplayName: "x",
            		Files: []mobileruncloud.AppNewSignedUploadURLParamsFile{{
            			ContentType: "application/vnd.android.package-archive",
            			FileName:    "J!Q0Ok0bzJb7.apk/i",
            		}},
            		VersionCode: 0,
            		VersionName: "x",
            	})
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", response.AppID)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud apps create-signed-upload-url \
              --api-key 'My API Key' \
              --bundle-id NX0.JB-_-.m-u--_-p.Z1-u_2I.D--_T-_.dzZ-.Wx.L_a8--_.w_D_ \
              --display-name x \
              --file '{contentType: application/vnd.android.package-archive, fileName: J!Q0Ok0bzJb7.apk/i}' \
              --version-code 0 \
              --version-name x
  /apps/{id}/confirm-upload:
    post:
      tags:
        - Apps Cloud Storage
      summary: Confirm successful app upload
      operationId: confirmUploadPublic
      description: Verifies the APK file exists in R2 and sets the app status to available.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      responses:
        "200":
          description: Upload confirmed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
                required:
                  - success
                  - message
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.apps.confirmUpload('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

            console.log(response.message);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.apps.confirm_upload(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.message)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	response, err := client.Apps.ConfirmUpload(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", response.Message)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud apps confirm-upload \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
  /apps/{id}/mark-failed:
    post:
      tags:
        - Apps Cloud Storage
      summary: Mark app upload as failed
      operationId: markUploadFailedPublic
      description: Sets the app status to failed.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      responses:
        "200":
          description: App marked as failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
                required:
                  - success
                  - message
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.apps.markFailed('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

            console.log(response.message);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.apps.mark_failed(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.message)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	response, err := client.Apps.MarkFailed(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", response.Message)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud apps mark-failed \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
  /apps/storage-usage:
    get:
      tags:
        - Apps Cloud Storage
      summary: Get the user’s storage usage
      operationId: getStorageUsage
      description: Returns the user’s total storage quota, bytes used, and remaining bytes — the reliable maximum size for the next upload.
      responses:
        "200":
          description: Storage usage retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/StorageUsage"
                required:
                  - data
        "401":
          description: Unauthorized
        "500":
          description: Internal Server Error
  /apps/{id}:
    get:
      tags:
        - Apps Cloud Storage
      summary: Get app by ID
      operationId: getAppByIdPublic
      description: Retrieves an app by its ID
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      responses:
        "200":
          description: App retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/App"
                required:
                  - data
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const app = await client.apps.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

            console.log(app.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            app = client.apps.retrieve(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(app.data)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	app, err := client.Apps.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", app.Data)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud apps retrieve \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
    delete:
      tags:
        - Apps Cloud Storage
      summary: Delete uploaded app
      operationId: deleteAppPublic
      description: Deletes an uploaded app by ID. Removes files from R2 storage and the database entry.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      responses:
        "200":
          description: App deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
                required:
                  - success
                  - message
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const app = await client.apps.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

            console.log(app.message);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            app = client.apps.delete(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(app.message)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	app, err := client.Apps.Delete(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", app.Message)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud apps delete \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
  /apps/{id}/versions:
    get:
      tags:
        - Apps Cloud Storage
      summary: List versions for an app
      operationId: listAppVersions
      description: Retrieves all versions of an app visible to the user (own uploads + system versions)
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      responses:
        "200":
          description: Versions retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/PublicAppVersion"
                required:
                  - data
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.apps.listVersions('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.apps.list_versions(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.data)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	response, err := client.Apps.ListVersions(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", response.Data)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud apps list-versions \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
  /credentials:
    get:
      summary: List credentials
      description: Returns a paginated list of all credentials belonging to the authenticated user across every package. Accepts standard pagination query parameters and responds with the credential items plus pagination metadata.
      operationId: listAllUserCredentials
      tags:
        - App Credentials
      parameters:
        - schema:
            type: integer
            exclusiveMinimum: 0
            default: 1
          required: false
          name: page
          in: query
        - schema:
            type: integer
            exclusiveMinimum: 0
            default: 10
          required: false
          name: pageSize
          in: query
      responses:
        "200":
          description: Credentials retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CredentialList"
        "401":
          description: Unauthorized
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const credentials = await client.credentials.list();

            console.log(credentials.items);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            credentials = client.credentials.list()
            print(credentials.items)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	credentials, err := client.Credentials.List(context.TODO(), mobileruncloud.CredentialListParams{})
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", credentials.Items)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud credentials list \
              --api-key 'My API Key'
  /credentials/packages:
    get:
      summary: List packages
      description: Returns the names of all packages (apps) the authenticated owner has credentials grouped under. Use this to discover which `packageName` values are valid for the per-package credential routes.
      operationId: listPackages
      tags:
        - App Credentials
      responses:
        "200":
          description: Packages fetched successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/PackageSchema"
                required:
                  - data
        "401":
          description: Unauthorized
        "500":
          description: Internal Server Error
    post:
      summary: Initialize a new package/app
      description: Creates a new package (identified by `packageName`) under which credentials can be grouped. Returns a conflict if a package with the same name already exists for the user.
      operationId: initializePackage
      tags:
        - App Credentials
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PackageSchema"
      responses:
        "200":
          description: Package initialized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
                  data:
                    $ref: "#/components/schemas/PackageSchema"
                required:
                  - success
                  - message
                  - data
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "409":
          description: Conflict
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const _package = await client.credentials.packages.create({ packageName: 'x' });

            console.log(_package.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            package = client.credentials.packages.create(
                package_name="x",
            )
            print(package.data)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	package_, err := client.Credentials.Packages.New(context.TODO(), mobileruncloud.CredentialPackageNewParams{
            		PackageName: "x",
            	})
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", package_.Data)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud credentials:packages create \
              --api-key 'My API Key' \
              --package-name x
  /credentials/packages/{packageName}:
    get:
      summary: List credentials for a specific package
      description: Returns all credentials stored under the given `packageName`. Each credential includes its name, secret path, and the list of fields it holds.
      operationId: listPackageCredentials
      tags:
        - App Credentials
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
          required: true
          name: packageName
          in: path
      responses:
        "200":
          description: Package credentials fetched successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Credential"
                required:
                  - data
        "401":
          description: Unauthorized
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const packages = await client.credentials.packages.list('x');

            console.log(packages.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            packages = client.credentials.packages.list(
                "x",
            )
            print(packages.data)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	packages, err := client.Credentials.Packages.List(context.TODO(), "x")
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", packages.Data)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud credentials:packages list \
              --api-key 'My API Key' \
              --package-name x
    post:
      summary: Create a credential
      description: Creates a credential under the given package with a `credentialName` and at least one field. Each field has a `fieldType` (email, username, password, api_token, phone_number, two_factor_secret, or backup_codes) and a value.
      operationId: createCredentialWithFields
      tags:
        - App Credentials
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
          required: true
          name: packageName
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                credentialName:
                  type: string
                  minLength: 3
                  maxLength: 50
                  pattern: ^[a-z0-9_-]+$
                fields:
                  type: array
                  items:
                    type: object
                    properties:
                      fieldType:
                        type: string
                        enum:
                          - email
                          - username
                          - password
                          - api_token
                          - phone_number
                          - two_factor_secret
                          - backup_codes
                      value:
                        type: string
                        minLength: 1
                    required:
                      - fieldType
                      - value
                  minItems: 1
              required:
                - credentialName
                - fields
      responses:
        "200":
          description: Credential created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
                  data:
                    $ref: "#/components/schemas/Credential"
                required:
                  - success
                  - message
                  - data
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "409":
          description: Conflict
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const credential = await client.credentials.packages.credentials.create('x', {
              credentialName: '26f1kl_-n-71',
              fields: [{ fieldType: 'email', value: 'x' }],
            });

            console.log(credential.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            credential = client.credentials.packages.credentials.create(
                package_name="x",
                credential_name="26f1kl_-n-71",
                fields=[{
                    "field_type": "email",
                    "value": "x",
                }],
            )
            print(credential.data)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	credential, err := client.Credentials.Packages.Credentials.New(
            		context.TODO(),
            		"x",
            		mobileruncloud.CredentialPackageCredentialNewParams{
            			CredentialName: "26f1kl_-n-71",
            			Fields: []mobileruncloud.CredentialPackageCredentialNewParamsField{{
            				FieldType: "email",
            				Value:     "x",
            			}},
            		},
            	)
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", credential.Data)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud credentials:packages:credentials create \
              --api-key 'My API Key' \
              --package-name x \
              --credential-name 26f1kl_-n-71 \
              --field '{fieldType: email, value: x}'
  /credentials/packages/{packageName}/credentials/{credentialName}:
    get:
      summary: Get a credential
      description: Fetches a single credential by `packageName` and `credentialName`, including all of its stored fields. Returns not found if no matching credential exists.
      operationId: getCredential
      tags:
        - App Credentials
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
          required: true
          name: packageName
          in: path
        - schema:
            type: string
            minLength: 3
            maxLength: 50
            pattern: ^[a-z0-9_-]+$
          required: true
          name: credentialName
          in: path
      responses:
        "200":
          description: Credential fetched successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/Credential"
                required:
                  - data
        "401":
          description: Unauthorized
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const credential = await client.credentials.packages.credentials.retrieve('26f1kl_-n-71', {
              packageName: 'x',
            });

            console.log(credential.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            credential = client.credentials.packages.credentials.retrieve(
                credential_name="26f1kl_-n-71",
                package_name="x",
            )
            print(credential.data)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	credential, err := client.Credentials.Packages.Credentials.Get(
            		context.TODO(),
            		"26f1kl_-n-71",
            		mobileruncloud.CredentialPackageCredentialGetParams{
            			PackageName: "x",
            		},
            	)
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", credential.Data)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud credentials:packages:credentials retrieve \
              --api-key 'My API Key' \
              --package-name x \
              --credential-name 26f1kl_-n-71
    delete:
      summary: Delete a credential and all its fields
      description: Permanently deletes the credential identified by `packageName` and `credentialName`, removing all of its fields. Returns the deleted credential.
      operationId: deleteCredential
      tags:
        - App Credentials
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
          required: true
          name: packageName
          in: path
        - schema:
            type: string
            minLength: 3
            maxLength: 50
            pattern: ^[a-z0-9_-]+$
          required: true
          name: credentialName
          in: path
      responses:
        "200":
          description: Credential deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
                  data:
                    $ref: "#/components/schemas/Credential"
                required:
                  - success
                  - message
                  - data
        "401":
          description: Unauthorized
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const credential = await client.credentials.packages.credentials.delete('26f1kl_-n-71', {
              packageName: 'x',
            });

            console.log(credential.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            credential = client.credentials.packages.credentials.delete(
                credential_name="26f1kl_-n-71",
                package_name="x",
            )
            print(credential.data)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	credential, err := client.Credentials.Packages.Credentials.Delete(
            		context.TODO(),
            		"26f1kl_-n-71",
            		mobileruncloud.CredentialPackageCredentialDeleteParams{
            			PackageName: "x",
            		},
            	)
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", credential.Data)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud credentials:packages:credentials delete \
              --api-key 'My API Key' \
              --package-name x \
              --credential-name 26f1kl_-n-71
  /credentials/packages/{packageName}/credentials/{credentialName}/fields/{fieldType}:
    delete:
      summary: Delete a field from a credential
      description: Removes a single field of the given `fieldType` from the specified credential while leaving the credential itself intact. Returns the updated credential.
      operationId: deleteCredentialField
      tags:
        - App Credentials
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
          required: true
          name: packageName
          in: path
        - schema:
            type: string
            minLength: 3
            maxLength: 50
            pattern: ^[a-z0-9_-]+$
          required: true
          name: credentialName
          in: path
        - schema:
            type: string
            enum:
              - email
              - username
              - password
              - api_token
              - phone_number
              - two_factor_secret
              - backup_codes
          required: true
          name: fieldType
          in: path
      responses:
        "200":
          description: Field deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
                  data:
                    $ref: "#/components/schemas/Credential"
                required:
                  - success
                  - message
                  - data
        "401":
          description: Unauthorized
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const field = await client.credentials.packages.credentials.fields.delete('email', {
              packageName: 'x',
              credentialName: '26f1kl_-n-71',
            });

            console.log(field.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            field = client.credentials.packages.credentials.fields.delete(
                field_type="email",
                package_name="x",
                credential_name="26f1kl_-n-71",
            )
            print(field.data)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	field, err := client.Credentials.Packages.Credentials.Fields.Delete(
            		context.TODO(),
            		mobileruncloud.CredentialPackageCredentialFieldDeleteParamsFieldTypeEmail,
            		mobileruncloud.CredentialPackageCredentialFieldDeleteParams{
            			PackageName:    "x",
            			CredentialName: "26f1kl_-n-71",
            		},
            	)
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", field.Data)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud credentials:packages:credentials:fields delete \
              --api-key 'My API Key' \
              --package-name x \
              --credential-name 26f1kl_-n-71 \
              --field-type email
    patch:
      summary: Update the value of a credential field
      description: Updates the value of an existing field on a credential, identified by `packageName`, `credentialName`, and `fieldType` in the path. The body carries the new value and returns the updated credential.
      operationId: updateCredentialFieldValue
      tags:
        - App Credentials
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
          required: true
          name: packageName
          in: path
        - schema:
            type: string
            minLength: 3
            maxLength: 50
            pattern: ^[a-z0-9_-]+$
          required: true
          name: credentialName
          in: path
        - schema:
            type: string
            enum:
              - email
              - username
              - password
              - api_token
              - phone_number
              - two_factor_secret
              - backup_codes
          required: true
          name: fieldType
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateCredentialFieldBody"
      responses:
        "200":
          description: Field value updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
                  data:
                    $ref: "#/components/schemas/Credential"
                required:
                  - success
                  - message
                  - data
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const field = await client.credentials.packages.credentials.fields.update('email', {
              packageName: 'x',
              credentialName: '26f1kl_-n-71',
              value: 'x',
            });

            console.log(field.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            field = client.credentials.packages.credentials.fields.update(
                field_type="email",
                package_name="x",
                credential_name="26f1kl_-n-71",
                value="x",
            )
            print(field.data)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	field, err := client.Credentials.Packages.Credentials.Fields.Update(
            		context.TODO(),
            		mobileruncloud.CredentialPackageCredentialFieldUpdateParamsFieldTypeEmail,
            		mobileruncloud.CredentialPackageCredentialFieldUpdateParams{
            			PackageName:    "x",
            			CredentialName: "26f1kl_-n-71",
            			Value:          "x",
            		},
            	)
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", field.Data)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud credentials:packages:credentials:fields update \
              --api-key 'My API Key' \
              --package-name x \
              --credential-name 26f1kl_-n-71 \
              --field-type email \
              --value x
  /credentials/packages/{packageName}/credentials/{credentialName}/fields:
    post:
      summary: Add a credential field
      description: Adds a single field to an existing credential. The body specifies a `fieldType` (one of the supported field types) and its value. Returns a conflict if a field of that type already exists on the credential.
      operationId: addCredentialField
      tags:
        - App Credentials
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
          required: true
          name: packageName
          in: path
        - schema:
            type: string
            minLength: 3
            maxLength: 50
            pattern: ^[a-z0-9_-]+$
          required: true
          name: credentialName
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCredentialFieldBody"
      responses:
        "200":
          description: Field added
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
                  data:
                    $ref: "#/components/schemas/Credential"
                required:
                  - success
                  - message
                  - data
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const field = await client.credentials.packages.credentials.fields.create('26f1kl_-n-71', {
              packageName: 'x',
              fieldType: 'email',
              value: 'x',
            });

            console.log(field.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            field = client.credentials.packages.credentials.fields.create(
                credential_name="26f1kl_-n-71",
                package_name="x",
                field_type="email",
                value="x",
            )
            print(field.data)
        - lang: Go
          source: |
            package main

            import (
            	"context"
            	"fmt"

            	"github.com/stainless-sdks/droidrun-cloud-go"
            	"github.com/stainless-sdks/droidrun-cloud-go/option"
            )

            func main() {
            	client := mobileruncloud.NewClient(
            		option.WithAPIKey("My API Key"),
            	)
            	field, err := client.Credentials.Packages.Credentials.Fields.New(
            		context.TODO(),
            		"26f1kl_-n-71",
            		mobileruncloud.CredentialPackageCredentialFieldNewParams{
            			PackageName: "x",
            			FieldType:   mobileruncloud.CredentialPackageCredentialFieldNewParamsFieldTypeEmail,
            			Value:       "x",
            		},
            	)
            	if err != nil {
            		panic(err.Error())
            	}
            	fmt.Printf("%+v\n", field.Data)
            }
        - lang: CLI
          source: |-
            mobilerun-cloud credentials:packages:credentials:fields create \
              --api-key 'My API Key' \
              --package-name x \
              --credential-name 26f1kl_-n-71 \
              --field-type email \
              --value x
components:
  schemas:
    ResponseDeviceInfo:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ResponseDeviceInfo.json
          format: uri
          readOnly: true
          type: string
        items:
          items:
            $ref: "#/components/schemas/DeviceInfo"
          type:
            - array
            - "null"
        pagination:
          $ref: "#/components/schemas/Meta"
      required:
        - items
        - pagination
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ErrorModel.json
          format: uri
          readOnly: true
          type: string
        detail:
          description: A human-readable explanation specific to this occurrence of the problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: "#/components/schemas/ErrorDetail"
          type:
            - array
            - "null"
        instance:
          description: A URI reference that identifies the specific occurrence of the problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    DeviceSpec:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/DeviceSpec.json
          format: uri
          readOnly: true
          type: string
        androidVersion:
          format: int64
          type: integer
        apps:
          items:
            type: string
          type:
            - array
            - "null"
        carrier:
          $ref: "#/components/schemas/DeviceCarrier"
        country:
          type: string
        files:
          items:
            type: string
          type:
            - array
            - "null"
        identifiers:
          $ref: "#/components/schemas/DeviceIdentifiers"
        locale:
          type: string
        location:
          $ref: "#/components/schemas/Location"
        name:
          type: string
        proxy:
          $ref: "#/components/schemas/ProxyConfig1"
        timezone:
          type: string
      type: object
    DeviceInfo:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/DeviceInfo.json
          format: uri
          readOnly: true
          type: string
        activeTaskId:
          type: string
        assignedAt:
          format: date-time
          type:
            - string
            - "null"
        billingStrategy:
          type: string
        createdAt:
          format: date-time
          type: string
        createdBy:
          type: string
        id:
          type: string
        name:
          type: string
        ownerId:
          type: string
        providerId:
          type: string
        state:
          type: string
        stateMessage:
          type: string
        streamToken:
          type: string
        streamUrl:
          type: string
        taskCount:
          format: int64
          type: integer
        terminatesAt:
          format: date-time
          type:
            - string
            - "null"
        type:
          type: string
        updatedAt:
          format: date-time
          type: string
        userId:
          deprecated: true
          description: "Deprecated: use ownerId/createdBy."
          type: string
      required:
        - id
        - name
        - state
        - stateMessage
        - streamUrl
        - type
        - createdAt
        - updatedAt
        - assignedAt
        - terminatesAt
        - taskCount
        - activeTaskId
      type: object
    TerminateInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/TerminateInputBody.json
          format: uri
          readOnly: true
          type: string
        previousDeviceId:
          type: string
        terminateAt:
          format: date-time
          type: string
      type: object
    CapabilityInfo:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CapabilityInfo.json
          format: uri
          readOnly: true
          type: string
        capabilities:
          $ref: "#/components/schemas/Capabilities"
        deviceType:
          type: string
      required:
        - deviceType
        - capabilities
      type: object
    UpdateNameInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateNameInputBody.json
          format: uri
          readOnly: true
          type: string
        name:
          maxLength: 255
          minLength: 1
          type: string
      required:
        - name
      type: object
    ResponseTask:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ResponseTask.json
          format: uri
          readOnly: true
          type: string
        items:
          items:
            $ref: "#/components/schemas/Task"
          type:
            - array
            - "null"
        pagination:
          $ref: "#/components/schemas/Meta"
      required:
        - items
        - pagination
      type: object
    PublicAppWithVersion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        bundleId:
          type: string
        platform:
          type: string
          enum:
            - android
            - ios
        displayName:
          type: string
        description:
          type:
            - string
            - "null"
        iconURL:
          type: string
        developerName:
          type:
            - string
            - "null"
        createdAt:
          type:
            - string
            - "null"
          format: date-time
        updatedAt:
          type:
            - string
            - "null"
          format: date-time
        version:
          $ref: "#/components/schemas/PublicAppVersion"
      required:
        - id
        - bundleId
        - platform
        - displayName
        - description
        - iconURL
        - developerName
        - createdAt
        - updatedAt
        - version
    Pagination:
      type: object
      properties:
        hasNext:
          type: boolean
        hasPrev:
          type: boolean
        page:
          type: integer
          minimum: 1
        pageSize:
          type: integer
          minimum: 1
        pages:
          type: integer
          minimum: 0
        total:
          type: integer
          minimum: 0
      required:
        - hasNext
        - hasPrev
        - page
        - pageSize
        - pages
        - total
    StorageUsage:
      type: object
      properties:
        quotaBytes:
          type: number
          description: Total storage allowance for the user, in bytes
        usedBytes:
          type: number
          description: Bytes currently consumed across all of the user’s app versions
        availableBytes:
          type: number
          description: "Remaining bytes — the reliable maximum size for the next upload. Advisory snapshot: the quota is enforced under a lock at confirm, so concurrent uploads may reduce actual headroom."
      required:
        - quotaBytes
        - usedBytes
        - availableBytes
    App:
      type: object
      properties:
        id:
          type: string
          format: uuid
        bundleId:
          type: string
        platform:
          type: string
          enum:
            - android
            - ios
        displayName:
          type: string
        description:
          type:
            - string
            - "null"
        iconURL:
          type: string
        developerName:
          type:
            - string
            - "null"
        createdAt:
          type:
            - string
            - "null"
          format: date-time
        updatedAt:
          type:
            - string
            - "null"
          format: date-time
      required:
        - id
        - bundleId
        - platform
        - displayName
        - description
        - iconURL
        - developerName
        - createdAt
        - updatedAt
    PublicAppVersion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        appId:
          type: string
          format: uuid
        versionCode:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        versionName:
          type: string
        country:
          type: string
          enum:
            - AF
            - AL
            - DZ
            - AS
            - AD
            - AO
            - AI
            - AQ
            - AG
            - AR
            - AM
            - AW
            - AP
            - AU
            - AT
            - AZ
            - BS
            - BH
            - BD
            - BB
            - BY
            - BE
            - BZ
            - BJ
            - BM
            - BT
            - BO
            - BQ
            - BA
            - BW
            - BV
            - BR
            - IO
            - BN
            - BG
            - BF
            - BI
            - KH
            - CM
            - CA
            - CV
            - KY
            - CF
            - TD
            - CL
            - CN
            - CX
            - CC
            - CO
            - KM
            - CG
            - CD
            - CK
            - CR
            - HR
            - CU
            - CW
            - CY
            - CZ
            - CI
            - DK
            - DJ
            - DM
            - DO
            - EC
            - EG
            - SV
            - GQ
            - ER
            - EE
            - ET
            - FK
            - FO
            - FJ
            - FI
            - FR
            - GF
            - PF
            - TF
            - GA
            - GM
            - GE
            - DE
            - GH
            - GI
            - GR
            - GL
            - GD
            - GP
            - GU
            - GT
            - GG
            - GN
            - GW
            - GY
            - HT
            - HM
            - VA
            - HN
            - HK
            - HU
            - IS
            - IN
            - ID
            - IR
            - IQ
            - IE
            - IM
            - IL
            - IT
            - JM
            - JP
            - JE
            - JO
            - KZ
            - KE
            - KI
            - KR
            - KW
            - KG
            - LA
            - LV
            - LB
            - LS
            - LR
            - LY
            - LI
            - LT
            - LU
            - MO
            - MG
            - MW
            - MY
            - MV
            - ML
            - MT
            - MH
            - MQ
            - MR
            - MU
            - YT
            - MX
            - FM
            - MD
            - MC
            - MN
            - ME
            - MS
            - MA
            - MZ
            - MM
            - NA
            - NR
            - NP
            - NL
            - AN
            - NC
            - NZ
            - NI
            - NE
            - NG
            - NU
            - NF
            - KP
            - MK
            - MP
            - NO
            - OM
            - PK
            - PW
            - PS
            - PA
            - PG
            - PY
            - PE
            - PH
            - PN
            - PL
            - PT
            - PR
            - QA
            - RE
            - RO
            - RU
            - RW
            - BL
            - SH
            - KN
            - LC
            - MF
            - PM
            - VC
            - WS
            - SM
            - ST
            - SA
            - SN
            - RS
            - CS
            - SC
            - SL
            - SG
            - SX
            - SK
            - SI
            - SB
            - SO
            - ZA
            - GS
            - SS
            - ES
            - LK
            - SD
            - SR
            - SJ
            - SZ
            - SE
            - CH
            - SY
            - TW
            - TJ
            - TZ
            - TH
            - TL
            - TG
            - TK
            - TO
            - TT
            - TN
            - TR
            - TM
            - TC
            - TV
            - UG
            - UA
            - AE
            - GB
            - US
            - UM
            - UY
            - UZ
            - VU
            - VE
            - VN
            - VG
            - VI
            - WF
            - EH
            - YE
            - ZM
            - ZW
            - AX
        status:
          type: string
          enum:
            - queued
            - available
            - failed
        source:
          type: string
          enum:
            - user
            - system
            - portal
        userId:
          type:
            - string
            - "null"
          deprecated: true
          description: "Deprecated: use ownerId (tenancy) / createdBy (actor)."
        ownerId:
          type:
            - string
            - "null"
        createdBy:
          type:
            - string
            - "null"
        targetSdk:
          type:
            - integer
            - "null"
          minimum: -9007199254740991
          maximum: 9007199254740991
        sizeBytes:
          type:
            - integer
            - "null"
          minimum: -9007199254740991
          maximum: 9007199254740991
        queuedAt:
          type:
            - string
            - "null"
          format: date-time
        createdAt:
          type:
            - string
            - "null"
          format: date-time
        updatedAt:
          type:
            - string
            - "null"
          format: date-time
      required:
        - id
        - appId
        - versionCode
        - versionName
        - country
        - status
        - source
        - userId
        - ownerId
        - createdBy
        - targetSdk
        - sizeBytes
        - queuedAt
        - createdAt
        - updatedAt
    CredentialList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/Credential"
        pagination:
          $ref: "#/components/schemas/Pagination"
      required:
        - items
        - pagination
    PackageSchema:
      type: object
      properties:
        packageName:
          type: string
          minLength: 1
          maxLength: 200
      required:
        - packageName
    Credential:
      type: object
      properties:
        ownerId:
          type: string
        createdBy:
          type:
            - string
            - "null"
        userId:
          type:
            - string
            - "null"
          deprecated: true
          description: "Deprecated: use createdBy (same value — the creating actor). Null for credentials created before rollout."
        packageName:
          type: string
        secretPath:
          type: string
        credentialName:
          type: string
        fields:
          type: array
          items:
            type: object
            properties:
              fieldType:
                type: string
                enum:
                  - email
                  - username
                  - password
                  - api_token
                  - phone_number
                  - two_factor_secret
                  - backup_codes
              value:
                type: string
                minLength: 1
            required:
              - fieldType
              - value
      required:
        - ownerId
        - createdBy
        - userId
        - packageName
        - secretPath
        - credentialName
        - fields
    UpdateCredentialFieldBody:
      type: object
      properties:
        value:
          type: string
          minLength: 1
      required:
        - value
    CreateCredentialFieldBody:
      type: object
      properties:
        fieldType:
          type: string
          enum:
            - email
            - username
            - password
            - api_token
            - phone_number
            - two_factor_secret
            - backup_codes
        value:
          type: string
          minLength: 1
      required:
        - fieldType
        - value
    Meta:
      additionalProperties: false
      properties:
        hasNext:
          type: boolean
        hasPrev:
          type: boolean
        page:
          format: int64
          type: integer
        pageSize:
          format: int64
          type: integer
        pages:
          format: int64
          type: integer
        total:
          format: int64
          type: integer
      required:
        - hasNext
        - hasPrev
        - page
        - pageSize
        - total
        - pages
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    DeviceCarrier:
      additionalProperties: false
      properties:
        GsmOperatorAlpha:
          type: string
        GsmOperatorNumeric:
          format: int64
          type: integer
        GsmSimOperatorAlpha:
          type: string
        GsmSimOperatorIsoCountry:
          type: string
        GsmSimOperatorNumeric:
          format: int64
          type: integer
        PersistSysTimezone:
          type: string
      required:
        - GsmOperatorAlpha
        - GsmOperatorNumeric
        - GsmSimOperatorAlpha
        - GsmSimOperatorNumeric
        - GsmSimOperatorIsoCountry
        - PersistSysTimezone
      type: object
    DeviceIdentifiers:
      additionalProperties: false
      properties:
        BootloaderSerialNumber:
          type: string
        IdentifierAndroidID:
          type: string
        IdentifierAppSetID:
          type: string
        IdentifierBluetoothMAC:
          type: string
        IdentifierGAID:
          type: string
        IdentifierGSFID:
          type: string
        IdentifierICCID:
          type: string
        IdentifierIMEI:
          type: string
        IdentifierIMSI:
          type: string
        IdentifierMEID:
          type: string
        IdentifierMediaDRMID:
          type: string
        IdentifierPhoneNumber:
          type: string
        IdentifierSerial:
          type: string
        IdentifierWifiMAC:
          type: string
        SerialNumber:
          type: string
      required:
        - IdentifierSerial
        - IdentifierAndroidID
        - IdentifierIMEI
        - IdentifierMEID
        - IdentifierIMSI
        - IdentifierICCID
        - IdentifierPhoneNumber
        - IdentifierGAID
        - IdentifierGSFID
        - IdentifierAppSetID
        - IdentifierMediaDRMID
        - IdentifierWifiMAC
        - IdentifierBluetoothMAC
        - SerialNumber
        - BootloaderSerialNumber
      type: object
    Location:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/Location.json
          format: uri
          readOnly: true
          type: string
        latitude:
          format: double
          type: number
        longitude:
          format: double
          type: number
      required:
        - latitude
        - longitude
      type: object
    ProxyConfig1:
      additionalProperties: false
      properties:
        name:
          type: string
        smartIp:
          type: boolean
        socks5:
          $ref: "#/components/schemas/SOCKS5"
      type: object
    Capabilities:
      additionalProperties: false
      properties:
        accessibility:
          type: boolean
        agent:
          type: boolean
        apps:
          type: boolean
        browser:
          type: boolean
        esim:
          type: boolean
        files:
          type: boolean
        fingerprint:
          type: boolean
        geo:
          type: boolean
        humanTouch:
          type: boolean
        language:
          type: boolean
        logcat:
          type: boolean
        proxy:
          type: boolean
        reset:
          type: boolean
        shell:
          type: boolean
        spoofing:
          type: boolean
        stream:
          type: boolean
        time:
          type: boolean
      required:
        - agent
        - accessibility
        - apps
        - files
        - proxy
        - geo
        - time
        - language
        - stream
        - fingerprint
        - spoofing
        - esim
        - logcat
        - humanTouch
        - reset
        - shell
        - browser
      type: object
    Task:
      additionalProperties: false
      properties:
        createdAt:
          format: date-time
          type: string
        taskId:
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - taskId
        - createdAt
        - updatedAt
      type: object
    SOCKS5:
      additionalProperties: false
      properties:
        host:
          type: string
        password:
          type: string
        port:
          format: int64
          type: integer
        user:
          type: string
      required:
        - host
        - port
        - user
        - password
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: Bearer token via Authorization header
