repull 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/repull/api/ai_api.rb +1 -1
- data/lib/repull/api/airbnb_api.rb +271 -16
- data/lib/repull/api/atlas_api.rb +1 -1
- data/lib/repull/api/availability_api.rb +1 -1
- data/lib/repull/api/billing_api.rb +1 -1
- data/lib/repull/api/booking_com_api.rb +133 -1
- data/lib/repull/api/connect_api.rb +3 -3
- data/lib/repull/api/conversations_api.rb +27 -5
- data/lib/repull/api/guests_api.rb +14 -3
- data/lib/repull/api/kv_api.rb +361 -0
- data/lib/repull/api/listings_api.rb +26 -9
- data/lib/repull/api/markets_api.rb +14 -3
- data/lib/repull/api/plumguide_api.rb +1 -1
- data/lib/repull/api/pricing_api.rb +14 -3
- data/lib/repull/api/properties_api.rb +32 -8
- data/lib/repull/api/reservations_api.rb +34 -5
- data/lib/repull/api/reviews_api.rb +14 -3
- data/lib/repull/api/schema_api.rb +1 -1
- data/lib/repull/api/studio_api.rb +1094 -0
- data/lib/repull/api/system_api.rb +1 -1
- data/lib/repull/api/vrbo_api.rb +31 -3
- data/lib/repull/api/webhooks_api.rb +16 -5
- data/lib/repull/api_client.rb +1 -1
- data/lib/repull/api_error.rb +1 -1
- data/lib/repull/api_model_base.rb +1 -1
- data/lib/repull/configuration.rb +1 -1
- data/lib/repull/models/account_created_event.rb +217 -0
- data/lib/repull/models/account_created_payload.rb +185 -0
- data/lib/repull/models/account_disconnected_event.rb +217 -0
- data/lib/repull/models/account_disconnected_payload.rb +196 -0
- data/lib/repull/models/ai_operation.rb +1 -1
- data/lib/repull/models/ai_operation_completed_event.rb +217 -0
- data/lib/repull/models/ai_operation_completed_payload.rb +197 -0
- data/lib/repull/models/ai_operation_failed_event.rb +217 -0
- data/lib/repull/models/ai_operation_failed_payload.rb +175 -0
- data/lib/repull/models/ai_operation_failed_payload_error.rb +156 -0
- data/lib/repull/models/airbnb_connection.rb +242 -0
- data/lib/repull/models/airbnb_connection_accessibility_amenities_inner.rb +167 -0
- data/lib/repull/models/airbnb_connection_amenities_inner.rb +168 -0
- data/lib/repull/models/airbnb_connection_host.rb +244 -0
- data/lib/repull/models/airbnb_connection_response.rb +164 -0
- data/lib/repull/models/airbnb_connection_summary.rb +231 -0
- data/lib/repull/models/airbnb_data_freshness.rb +201 -0
- data/lib/repull/models/airbnb_listing.rb +25 -74
- data/lib/repull/models/airbnb_listing_list_response.rb +65 -5
- data/lib/repull/models/airbnb_reservation.rb +1 -1
- data/lib/repull/models/airbnb_reservation_list_response.rb +2 -1
- data/lib/repull/models/airbnb_review.rb +1 -1
- data/lib/repull/models/airbnb_review_list_response.rb +1 -1
- data/lib/repull/models/airbnb_thread.rb +1 -1
- data/lib/repull/models/airbnb_thread_list_response.rb +1 -1
- data/lib/repull/models/booking_connect_listing_option.rb +1 -1
- data/lib/repull/models/booking_connect_room.rb +1 -1
- data/lib/repull/models/booking_connect_rooms_response.rb +1 -1
- data/lib/repull/models/booking_conversation.rb +1 -1
- data/lib/repull/models/booking_conversation_list_response.rb +1 -1
- data/lib/repull/models/booking_pricing_rate_update.rb +1 -1
- data/lib/repull/models/booking_pricing_rate_update_date_range.rb +1 -1
- data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +1 -1
- data/lib/repull/models/booking_pricing_response.rb +1 -1
- data/lib/repull/models/booking_pricing_update_request.rb +1 -1
- data/lib/repull/models/booking_pricing_update_response.rb +1 -1
- data/lib/repull/models/booking_property.rb +1 -1
- data/lib/repull/models/booking_property_list_response.rb +1 -1
- data/lib/repull/models/booking_room_mapping.rb +1 -1
- data/lib/repull/models/booking_verify_hotel_request.rb +1 -1
- data/lib/repull/models/booking_verify_hotel_response.rb +1 -1
- data/lib/repull/models/bulk_pricing_failure.rb +1 -1
- data/lib/repull/models/bulk_pricing_item.rb +1 -1
- data/lib/repull/models/bulk_pricing_request.rb +1 -1
- data/lib/repull/models/bulk_pricing_response.rb +1 -1
- data/lib/repull/models/calendar_day.rb +1 -1
- data/lib/repull/models/calendar_response.rb +1 -1
- data/lib/repull/models/calendar_updated_event.rb +217 -0
- data/lib/repull/models/calendar_updated_payload.rb +184 -0
- data/lib/repull/models/calendar_updated_payload_range.rb +156 -0
- data/lib/repull/models/clear_kv200_response.rb +147 -0
- data/lib/repull/models/connect_host.rb +1 -1
- data/lib/repull/models/connect_provider.rb +1 -1
- data/lib/repull/models/connect_provider_list_response.rb +1 -1
- data/lib/repull/models/connect_session.rb +1 -1
- data/lib/repull/models/connect_status.rb +1 -1
- data/lib/repull/models/connection.rb +1 -1
- data/lib/repull/models/connection_list_response.rb +1 -1
- data/lib/repull/models/conversation.rb +1 -1
- data/lib/repull/models/conversation_detail.rb +1 -1
- data/lib/repull/models/conversation_guest.rb +1 -1
- data/lib/repull/models/conversation_guest_contact.rb +1 -1
- data/lib/repull/models/conversation_host.rb +1 -1
- data/lib/repull/models/conversation_list_response.rb +1 -1
- data/lib/repull/models/conversation_message_attachment.rb +1 -1
- data/lib/repull/models/create_ai_operation200_response.rb +1 -1
- data/lib/repull/models/create_billing_checkout_request.rb +1 -1
- data/lib/repull/models/create_connect_session_request.rb +1 -1
- data/lib/repull/models/create_connection_request.rb +1 -1
- data/lib/repull/models/create_reservation_request.rb +1 -1
- data/lib/repull/models/create_studio_deployment201_response.rb +147 -0
- data/lib/repull/models/create_studio_deployment201_response_data.rb +199 -0
- data/lib/repull/models/create_studio_deployment_request.rb +165 -0
- data/lib/repull/models/create_studio_project201_response.rb +147 -0
- data/lib/repull/models/create_studio_project201_response_data.rb +199 -0
- data/lib/repull/models/create_studio_project_generation201_response.rb +147 -0
- data/lib/repull/models/create_studio_project_generation201_response_data.rb +165 -0
- data/lib/repull/models/create_studio_project_generation_request.rb +165 -0
- data/lib/repull/models/create_studio_project_request.rb +203 -0
- data/lib/repull/models/create_webhook_request.rb +2 -2
- data/lib/repull/models/custom_schema.rb +1 -1
- data/lib/repull/models/custom_schema_create.rb +1 -1
- data/lib/repull/models/custom_schema_create_response.rb +1 -1
- data/lib/repull/models/custom_schema_delete_response.rb +1 -1
- data/lib/repull/models/custom_schema_list_response.rb +1 -1
- data/lib/repull/models/custom_schema_summary.rb +1 -1
- data/lib/repull/models/custom_schema_update.rb +1 -1
- data/lib/repull/models/delete_kv200_response.rb +147 -0
- data/lib/repull/models/delete_studio_deployment200_response.rb +147 -0
- data/lib/repull/models/delete_studio_deployment200_response_data.rb +156 -0
- data/lib/repull/models/delete_studio_project200_response.rb +147 -0
- data/lib/repull/models/delete_studio_project200_response_data.rb +156 -0
- data/lib/repull/models/delete_studio_project_file200_response.rb +147 -0
- data/lib/repull/models/delete_studio_project_file200_response_data.rb +156 -0
- data/lib/repull/models/error.rb +1 -1
- data/lib/repull/models/error_error.rb +1 -1
- data/lib/repull/models/error_error_support.rb +1 -1
- data/lib/repull/models/generate_studio_completion200_response.rb +147 -0
- data/lib/repull/models/generate_studio_completion200_response_data.rb +224 -0
- data/lib/repull/models/generate_studio_completion_request.rb +305 -0
- data/lib/repull/models/generate_studio_completion_request_project_id.rb +105 -0
- data/lib/repull/models/get_health200_response.rb +1 -1
- data/lib/repull/models/get_studio_deployment200_response.rb +147 -0
- data/lib/repull/models/get_studio_project200_response.rb +147 -0
- data/lib/repull/models/guest.rb +1 -1
- data/lib/repull/models/guest_contact.rb +1 -1
- data/lib/repull/models/guest_flag.rb +1 -1
- data/lib/repull/models/guest_list_response.rb +1 -1
- data/lib/repull/models/guest_note.rb +1 -1
- data/lib/repull/models/guest_profile.rb +1 -1
- data/lib/repull/models/guest_reservations_summary.rb +1 -1
- data/lib/repull/models/list_kv200_response.rb +158 -0
- data/lib/repull/models/list_kv200_response_data_inner.rb +176 -0
- data/lib/repull/models/list_kv200_response_pagination.rb +156 -0
- data/lib/repull/models/list_studio_deployments200_response.rb +158 -0
- data/lib/repull/models/list_studio_project_files200_response.rb +149 -0
- data/lib/repull/models/list_studio_projects200_response.rb +149 -0
- data/lib/repull/models/listing.rb +36 -2
- data/lib/repull/models/listing_address.rb +1 -1
- data/lib/repull/models/listing_amenity.rb +215 -0
- data/lib/repull/models/listing_channel.rb +1 -1
- data/lib/repull/models/listing_comp.rb +1 -1
- data/lib/repull/models/listing_comp_nightly.rb +1 -1
- data/lib/repull/models/listing_comp_ratings.rb +1 -1
- data/lib/repull/models/listing_comps_response.rb +1 -1
- data/lib/repull/models/listing_content.rb +54 -13
- data/lib/repull/models/listing_create_request.rb +1 -1
- data/lib/repull/models/listing_create_response.rb +1 -1
- data/lib/repull/models/listing_created_event.rb +217 -0
- data/lib/repull/models/listing_created_payload.rb +202 -0
- data/lib/repull/models/listing_created_payload_address.rb +165 -0
- data/lib/repull/models/listing_deleted_event.rb +217 -0
- data/lib/repull/models/listing_deleted_payload.rb +167 -0
- data/lib/repull/models/listing_details.rb +374 -0
- data/lib/repull/models/listing_generate_content_request.rb +2 -2
- data/lib/repull/models/listing_generate_content_response.rb +1 -1
- data/lib/repull/models/listing_list_response.rb +1 -1
- data/lib/repull/models/listing_pricing_apply_request.rb +1 -1
- data/lib/repull/models/listing_pricing_apply_response.rb +1 -1
- data/lib/repull/models/listing_pricing_history_entry.rb +1 -1
- data/lib/repull/models/listing_pricing_history_response.rb +1 -1
- data/lib/repull/models/listing_pricing_recommendation.rb +1 -1
- data/lib/repull/models/listing_pricing_response.rb +1 -1
- data/lib/repull/models/listing_pricing_response_comp_summary.rb +1 -1
- data/lib/repull/models/listing_pricing_response_date_range.rb +1 -1
- data/lib/repull/models/listing_pricing_response_listing.rb +1 -1
- data/lib/repull/models/listing_pricing_strategy.rb +1 -1
- data/lib/repull/models/listing_pricing_strategy_input.rb +1 -1
- data/lib/repull/models/listing_publish_airbnb_request.rb +1 -1
- data/lib/repull/models/listing_publish_response.rb +1 -1
- data/lib/repull/models/listing_publish_status_channel.rb +1 -1
- data/lib/repull/models/listing_publish_status_connection.rb +180 -0
- data/lib/repull/models/listing_publish_status_response.rb +18 -5
- data/lib/repull/models/listing_quality_tier.rb +1 -1
- data/lib/repull/models/listing_segment.rb +1 -1
- data/lib/repull/models/listing_segment_recommendation.rb +1 -1
- data/lib/repull/models/listing_segments_response.rb +1 -1
- data/lib/repull/models/listing_segments_response_scope.rb +1 -1
- data/lib/repull/models/listing_updated_event.rb +217 -0
- data/lib/repull/models/listing_updated_payload.rb +169 -0
- data/lib/repull/models/map_connect_booking_rooms_request.rb +1 -1
- data/lib/repull/models/map_connect_booking_rooms_response.rb +1 -1
- data/lib/repull/models/market_browse_category.rb +1 -1
- data/lib/repull/models/market_browse_entry.rb +1 -1
- data/lib/repull/models/market_browse_featured.rb +1 -1
- data/lib/repull/models/market_browse_response.rb +1 -1
- data/lib/repull/models/market_calendar_day.rb +1 -1
- data/lib/repull/models/market_calendar_day_events_inner.rb +1 -1
- data/lib/repull/models/market_calendar_response.rb +1 -1
- data/lib/repull/models/market_detail_response.rb +1 -1
- data/lib/repull/models/market_detail_response_price_distribution_inner.rb +1 -1
- data/lib/repull/models/market_detail_response_property_type_mix_inner.rb +1 -1
- data/lib/repull/models/market_detail_response_supply_trend_inner.rb +1 -1
- data/lib/repull/models/market_detail_response_top_comps.rb +1 -1
- data/lib/repull/models/market_event.rb +1 -1
- data/lib/repull/models/market_my_listing.rb +1 -1
- data/lib/repull/models/market_summary.rb +1 -1
- data/lib/repull/models/market_top_comp.rb +1 -1
- data/lib/repull/models/markets_overview_response.rb +2 -2
- data/lib/repull/models/markets_overview_response_browse.rb +1 -1
- data/lib/repull/models/markets_overview_response_subscriptions.rb +1 -1
- data/lib/repull/models/markets_overview_response_totals.rb +1 -1
- data/lib/repull/models/message.rb +1 -1
- data/lib/repull/models/message_list_response.rb +1 -1
- data/lib/repull/models/pagination.rb +1 -1
- data/lib/repull/models/payment_completed_event.rb +217 -0
- data/lib/repull/models/payment_completed_payload.rb +193 -0
- data/lib/repull/models/payment_refunded_event.rb +217 -0
- data/lib/repull/models/payment_refunded_payload.rb +193 -0
- data/lib/repull/models/plumguide_listing.rb +1 -1
- data/lib/repull/models/plumguide_listing_list_response.rb +1 -1
- data/lib/repull/models/property.rb +17 -5
- data/lib/repull/models/property_list_response.rb +1 -1
- data/lib/repull/models/reply_booking_review200_response.rb +147 -0
- data/lib/repull/models/reply_booking_review_request.rb +219 -0
- data/lib/repull/models/repull_ping_event.rb +217 -0
- data/lib/repull/models/repull_ping_payload.rb +148 -0
- data/lib/repull/models/reservation.rb +74 -89
- data/lib/repull/models/reservation_cancelled_event.rb +217 -0
- data/lib/repull/models/reservation_cancelled_payload.rb +196 -0
- data/lib/repull/models/reservation_created_event.rb +218 -0
- data/lib/repull/models/reservation_created_payload.rb +165 -0
- data/lib/repull/models/reservation_financials.rb +172 -0
- data/lib/repull/models/reservation_list_response.rb +1 -1
- data/lib/repull/models/reservation_message_received_event.rb +217 -0
- data/lib/repull/models/reservation_message_received_payload.rb +184 -0
- data/lib/repull/models/reservation_message_received_payload_from.rb +157 -0
- data/lib/repull/models/reservation_occupancy.rb +190 -0
- data/lib/repull/models/reservation_primary_guest.rb +202 -0
- data/lib/repull/models/reservation_updated_event.rb +217 -0
- data/lib/repull/models/reservation_updated_payload.rb +177 -0
- data/lib/repull/models/reservation_webhook_object.rb +355 -0
- data/lib/repull/models/respond_airbnb_review_request.rb +174 -0
- data/lib/repull/models/review.rb +1 -1
- data/lib/repull/models/review_category.rb +1 -1
- data/lib/repull/models/review_list_response.rb +1 -1
- data/lib/repull/models/review_response.rb +1 -1
- data/lib/repull/models/rotate_webhook_secret200_response.rb +1 -1
- data/lib/repull/models/select_connect_provider_request.rb +1 -1
- data/lib/repull/models/select_provider_response.rb +1 -1
- data/lib/repull/models/set_kv_request.rb +180 -0
- data/lib/repull/models/studio_deployment.rb +207 -0
- data/lib/repull/models/studio_error.rb +148 -0
- data/lib/repull/models/studio_error_error.rb +212 -0
- data/lib/repull/models/studio_file.rb +188 -0
- data/lib/repull/models/studio_generation.rb +215 -0
- data/lib/repull/models/studio_project.rb +241 -0
- data/lib/repull/models/test_webhook_request.rb +24 -2
- data/lib/repull/models/update_availability_request.rb +1 -1
- data/lib/repull/models/update_listing_pricing_strategy200_response.rb +1 -1
- data/lib/repull/models/update_reservation_request.rb +1 -1
- data/lib/repull/models/update_studio_project_request.rb +190 -0
- data/lib/repull/models/update_webhook_request.rb +2 -2
- data/lib/repull/models/upsert_studio_project_file200_response.rb +147 -0
- data/lib/repull/models/upsert_studio_project_file200_response_data.rb +147 -0
- data/lib/repull/models/upsert_studio_project_file_request.rb +165 -0
- data/lib/repull/models/vrbo_listing.rb +1 -1
- data/lib/repull/models/vrbo_listing_list_response.rb +1 -1
- data/lib/repull/models/vrbo_reservation.rb +1 -1
- data/lib/repull/models/vrbo_reservation_list_response.rb +1 -1
- data/lib/repull/models/webhook_delivery.rb +25 -2
- data/lib/repull/models/webhook_delivery_detail.rb +26 -3
- data/lib/repull/models/webhook_delivery_list_response.rb +1 -1
- data/lib/repull/models/webhook_event.rb +82 -0
- data/lib/repull/models/webhook_event_catalog.rb +18 -5
- data/lib/repull/models/webhook_event_catalog_domains_inner.rb +2 -2
- data/lib/repull/models/{webhook_event_catalog_domains_inner_events_inner.rb → webhook_event_catalog_entry.rb} +28 -5
- data/lib/repull/models/webhook_event_type.rb +53 -0
- data/lib/repull/models/webhook_list_response.rb +1 -1
- data/lib/repull/models/webhook_subscription.rb +2 -2
- data/lib/repull/version.rb +2 -2
- data/lib/repull.rb +97 -2
- data/openapi/v1.json +8717 -4724
- data/scripts/regen.sh +1 -1
- metadata +99 -4
|
@@ -0,0 +1,1094 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: ivan@vanio.ai
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Repull
|
|
16
|
+
class StudioApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Trigger a Studio deployment
|
|
23
|
+
# Kicks off a new deployment for a project — Repull provisions a Fly.io machine, writes the subdomain DNS record, and builds the project. The response returns immediately with `provisioning` status; poll `GET /api/studio/deployments/{id}` until `live`.
|
|
24
|
+
# @param create_studio_deployment_request [CreateStudioDeploymentRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [CreateStudioDeployment201Response]
|
|
27
|
+
def create_studio_deployment(create_studio_deployment_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_studio_deployment_with_http_info(create_studio_deployment_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Trigger a Studio deployment
|
|
33
|
+
# Kicks off a new deployment for a project — Repull provisions a Fly.io machine, writes the subdomain DNS record, and builds the project. The response returns immediately with `provisioning` status; poll `GET /api/studio/deployments/{id}` until `live`.
|
|
34
|
+
# @param create_studio_deployment_request [CreateStudioDeploymentRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(CreateStudioDeployment201Response, Integer, Hash)>] CreateStudioDeployment201Response data, response status code and response headers
|
|
37
|
+
def create_studio_deployment_with_http_info(create_studio_deployment_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.create_studio_deployment ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'create_studio_deployment_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_studio_deployment_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_studio_deployment_request' when calling StudioApi.create_studio_deployment"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/api/studio/deployments'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_studio_deployment_request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'CreateStudioDeployment201Response'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"StudioApi.create_studio_deployment",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: StudioApi#create_studio_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Create a Studio project
|
|
91
|
+
# Spins up a new Studio project from a name + prompt. Repull AI uses the prompt to materialize the initial template; the returned project starts in `draft` status.
|
|
92
|
+
# @param create_studio_project_request [CreateStudioProjectRequest]
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [CreateStudioProject201Response]
|
|
95
|
+
def create_studio_project(create_studio_project_request, opts = {})
|
|
96
|
+
data, _status_code, _headers = create_studio_project_with_http_info(create_studio_project_request, opts)
|
|
97
|
+
data
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Create a Studio project
|
|
101
|
+
# Spins up a new Studio project from a name + prompt. Repull AI uses the prompt to materialize the initial template; the returned project starts in `draft` status.
|
|
102
|
+
# @param create_studio_project_request [CreateStudioProjectRequest]
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(CreateStudioProject201Response, Integer, Hash)>] CreateStudioProject201Response data, response status code and response headers
|
|
105
|
+
def create_studio_project_with_http_info(create_studio_project_request, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.create_studio_project ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'create_studio_project_request' is set
|
|
110
|
+
if @api_client.config.client_side_validation && create_studio_project_request.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'create_studio_project_request' when calling StudioApi.create_studio_project"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/api/studio/projects'
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
# HTTP header 'Accept' (if needed)
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
123
|
+
# HTTP header 'Content-Type'
|
|
124
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
125
|
+
if !content_type.nil?
|
|
126
|
+
header_params['Content-Type'] = content_type
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# form parameters
|
|
130
|
+
form_params = opts[:form_params] || {}
|
|
131
|
+
|
|
132
|
+
# http body (model)
|
|
133
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_studio_project_request)
|
|
134
|
+
|
|
135
|
+
# return_type
|
|
136
|
+
return_type = opts[:debug_return_type] || 'CreateStudioProject201Response'
|
|
137
|
+
|
|
138
|
+
# auth_names
|
|
139
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
140
|
+
|
|
141
|
+
new_options = opts.merge(
|
|
142
|
+
:operation => :"StudioApi.create_studio_project",
|
|
143
|
+
:header_params => header_params,
|
|
144
|
+
:query_params => query_params,
|
|
145
|
+
:form_params => form_params,
|
|
146
|
+
:body => post_body,
|
|
147
|
+
:auth_names => auth_names,
|
|
148
|
+
:return_type => return_type
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: StudioApi#create_studio_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Run a Studio generation
|
|
159
|
+
# Records a generation run scoped to a single project — Repull AI takes the prompt, generates the response, and stores it on the project timeline. Use this when you want generation history; for one-shot completions without persistence use `POST /api/studio/generate`.
|
|
160
|
+
# @param id [String]
|
|
161
|
+
# @param create_studio_project_generation_request [CreateStudioProjectGenerationRequest]
|
|
162
|
+
# @param [Hash] opts the optional parameters
|
|
163
|
+
# @return [CreateStudioProjectGeneration201Response]
|
|
164
|
+
def create_studio_project_generation(id, create_studio_project_generation_request, opts = {})
|
|
165
|
+
data, _status_code, _headers = create_studio_project_generation_with_http_info(id, create_studio_project_generation_request, opts)
|
|
166
|
+
data
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Run a Studio generation
|
|
170
|
+
# Records a generation run scoped to a single project — Repull AI takes the prompt, generates the response, and stores it on the project timeline. Use this when you want generation history; for one-shot completions without persistence use `POST /api/studio/generate`.
|
|
171
|
+
# @param id [String]
|
|
172
|
+
# @param create_studio_project_generation_request [CreateStudioProjectGenerationRequest]
|
|
173
|
+
# @param [Hash] opts the optional parameters
|
|
174
|
+
# @return [Array<(CreateStudioProjectGeneration201Response, Integer, Hash)>] CreateStudioProjectGeneration201Response data, response status code and response headers
|
|
175
|
+
def create_studio_project_generation_with_http_info(id, create_studio_project_generation_request, opts = {})
|
|
176
|
+
if @api_client.config.debugging
|
|
177
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.create_studio_project_generation ...'
|
|
178
|
+
end
|
|
179
|
+
# verify the required parameter 'id' is set
|
|
180
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
181
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.create_studio_project_generation"
|
|
182
|
+
end
|
|
183
|
+
# verify the required parameter 'create_studio_project_generation_request' is set
|
|
184
|
+
if @api_client.config.client_side_validation && create_studio_project_generation_request.nil?
|
|
185
|
+
fail ArgumentError, "Missing the required parameter 'create_studio_project_generation_request' when calling StudioApi.create_studio_project_generation"
|
|
186
|
+
end
|
|
187
|
+
# resource path
|
|
188
|
+
local_var_path = '/api/studio/projects/{id}/generations'.sub('{id}', CGI.escape(id.to_s))
|
|
189
|
+
|
|
190
|
+
# query parameters
|
|
191
|
+
query_params = opts[:query_params] || {}
|
|
192
|
+
|
|
193
|
+
# header parameters
|
|
194
|
+
header_params = opts[:header_params] || {}
|
|
195
|
+
# HTTP header 'Accept' (if needed)
|
|
196
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
197
|
+
# HTTP header 'Content-Type'
|
|
198
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
199
|
+
if !content_type.nil?
|
|
200
|
+
header_params['Content-Type'] = content_type
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# form parameters
|
|
204
|
+
form_params = opts[:form_params] || {}
|
|
205
|
+
|
|
206
|
+
# http body (model)
|
|
207
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_studio_project_generation_request)
|
|
208
|
+
|
|
209
|
+
# return_type
|
|
210
|
+
return_type = opts[:debug_return_type] || 'CreateStudioProjectGeneration201Response'
|
|
211
|
+
|
|
212
|
+
# auth_names
|
|
213
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
214
|
+
|
|
215
|
+
new_options = opts.merge(
|
|
216
|
+
:operation => :"StudioApi.create_studio_project_generation",
|
|
217
|
+
:header_params => header_params,
|
|
218
|
+
:query_params => query_params,
|
|
219
|
+
:form_params => form_params,
|
|
220
|
+
:body => post_body,
|
|
221
|
+
:auth_names => auth_names,
|
|
222
|
+
:return_type => return_type
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
226
|
+
if @api_client.config.debugging
|
|
227
|
+
@api_client.config.logger.debug "API called: StudioApi#create_studio_project_generation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
228
|
+
end
|
|
229
|
+
return data, status_code, headers
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Delete a Studio deployment
|
|
233
|
+
# Tears down a deployment — releases the Fly.io machine, removes the DNS record, and marks the deployment as deleted. The underlying project is unaffected.
|
|
234
|
+
# @param id [String]
|
|
235
|
+
# @param [Hash] opts the optional parameters
|
|
236
|
+
# @return [DeleteStudioDeployment200Response]
|
|
237
|
+
def delete_studio_deployment(id, opts = {})
|
|
238
|
+
data, _status_code, _headers = delete_studio_deployment_with_http_info(id, opts)
|
|
239
|
+
data
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Delete a Studio deployment
|
|
243
|
+
# Tears down a deployment — releases the Fly.io machine, removes the DNS record, and marks the deployment as deleted. The underlying project is unaffected.
|
|
244
|
+
# @param id [String]
|
|
245
|
+
# @param [Hash] opts the optional parameters
|
|
246
|
+
# @return [Array<(DeleteStudioDeployment200Response, Integer, Hash)>] DeleteStudioDeployment200Response data, response status code and response headers
|
|
247
|
+
def delete_studio_deployment_with_http_info(id, opts = {})
|
|
248
|
+
if @api_client.config.debugging
|
|
249
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.delete_studio_deployment ...'
|
|
250
|
+
end
|
|
251
|
+
# verify the required parameter 'id' is set
|
|
252
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
253
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.delete_studio_deployment"
|
|
254
|
+
end
|
|
255
|
+
# resource path
|
|
256
|
+
local_var_path = '/api/studio/deployments/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
257
|
+
|
|
258
|
+
# query parameters
|
|
259
|
+
query_params = opts[:query_params] || {}
|
|
260
|
+
|
|
261
|
+
# header parameters
|
|
262
|
+
header_params = opts[:header_params] || {}
|
|
263
|
+
# HTTP header 'Accept' (if needed)
|
|
264
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
265
|
+
|
|
266
|
+
# form parameters
|
|
267
|
+
form_params = opts[:form_params] || {}
|
|
268
|
+
|
|
269
|
+
# http body (model)
|
|
270
|
+
post_body = opts[:debug_body]
|
|
271
|
+
|
|
272
|
+
# return_type
|
|
273
|
+
return_type = opts[:debug_return_type] || 'DeleteStudioDeployment200Response'
|
|
274
|
+
|
|
275
|
+
# auth_names
|
|
276
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
277
|
+
|
|
278
|
+
new_options = opts.merge(
|
|
279
|
+
:operation => :"StudioApi.delete_studio_deployment",
|
|
280
|
+
:header_params => header_params,
|
|
281
|
+
:query_params => query_params,
|
|
282
|
+
:form_params => form_params,
|
|
283
|
+
:body => post_body,
|
|
284
|
+
:auth_names => auth_names,
|
|
285
|
+
:return_type => return_type
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
289
|
+
if @api_client.config.debugging
|
|
290
|
+
@api_client.config.logger.debug "API called: StudioApi#delete_studio_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
291
|
+
end
|
|
292
|
+
return data, status_code, headers
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Delete a Studio project
|
|
296
|
+
# Soft-deletes a project. The project is archived and removed from the listing endpoint, but its files and deployments are retained for recovery.
|
|
297
|
+
# @param id [String]
|
|
298
|
+
# @param [Hash] opts the optional parameters
|
|
299
|
+
# @return [DeleteStudioProject200Response]
|
|
300
|
+
def delete_studio_project(id, opts = {})
|
|
301
|
+
data, _status_code, _headers = delete_studio_project_with_http_info(id, opts)
|
|
302
|
+
data
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Delete a Studio project
|
|
306
|
+
# Soft-deletes a project. The project is archived and removed from the listing endpoint, but its files and deployments are retained for recovery.
|
|
307
|
+
# @param id [String]
|
|
308
|
+
# @param [Hash] opts the optional parameters
|
|
309
|
+
# @return [Array<(DeleteStudioProject200Response, Integer, Hash)>] DeleteStudioProject200Response data, response status code and response headers
|
|
310
|
+
def delete_studio_project_with_http_info(id, opts = {})
|
|
311
|
+
if @api_client.config.debugging
|
|
312
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.delete_studio_project ...'
|
|
313
|
+
end
|
|
314
|
+
# verify the required parameter 'id' is set
|
|
315
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
316
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.delete_studio_project"
|
|
317
|
+
end
|
|
318
|
+
# resource path
|
|
319
|
+
local_var_path = '/api/studio/projects/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
320
|
+
|
|
321
|
+
# query parameters
|
|
322
|
+
query_params = opts[:query_params] || {}
|
|
323
|
+
|
|
324
|
+
# header parameters
|
|
325
|
+
header_params = opts[:header_params] || {}
|
|
326
|
+
# HTTP header 'Accept' (if needed)
|
|
327
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
328
|
+
|
|
329
|
+
# form parameters
|
|
330
|
+
form_params = opts[:form_params] || {}
|
|
331
|
+
|
|
332
|
+
# http body (model)
|
|
333
|
+
post_body = opts[:debug_body]
|
|
334
|
+
|
|
335
|
+
# return_type
|
|
336
|
+
return_type = opts[:debug_return_type] || 'DeleteStudioProject200Response'
|
|
337
|
+
|
|
338
|
+
# auth_names
|
|
339
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
340
|
+
|
|
341
|
+
new_options = opts.merge(
|
|
342
|
+
:operation => :"StudioApi.delete_studio_project",
|
|
343
|
+
:header_params => header_params,
|
|
344
|
+
:query_params => query_params,
|
|
345
|
+
:form_params => form_params,
|
|
346
|
+
:body => post_body,
|
|
347
|
+
:auth_names => auth_names,
|
|
348
|
+
:return_type => return_type
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
352
|
+
if @api_client.config.debugging
|
|
353
|
+
@api_client.config.logger.debug "API called: StudioApi#delete_studio_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
354
|
+
end
|
|
355
|
+
return data, status_code, headers
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Delete a Studio project file
|
|
359
|
+
# Removes a single file from the project tree. The deployment is not redeployed automatically — trigger a new deployment to apply the change.
|
|
360
|
+
# @param id [String]
|
|
361
|
+
# @param path [String] URL-encoded project-relative path.
|
|
362
|
+
# @param [Hash] opts the optional parameters
|
|
363
|
+
# @return [DeleteStudioProjectFile200Response]
|
|
364
|
+
def delete_studio_project_file(id, path, opts = {})
|
|
365
|
+
data, _status_code, _headers = delete_studio_project_file_with_http_info(id, path, opts)
|
|
366
|
+
data
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# Delete a Studio project file
|
|
370
|
+
# Removes a single file from the project tree. The deployment is not redeployed automatically — trigger a new deployment to apply the change.
|
|
371
|
+
# @param id [String]
|
|
372
|
+
# @param path [String] URL-encoded project-relative path.
|
|
373
|
+
# @param [Hash] opts the optional parameters
|
|
374
|
+
# @return [Array<(DeleteStudioProjectFile200Response, Integer, Hash)>] DeleteStudioProjectFile200Response data, response status code and response headers
|
|
375
|
+
def delete_studio_project_file_with_http_info(id, path, opts = {})
|
|
376
|
+
if @api_client.config.debugging
|
|
377
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.delete_studio_project_file ...'
|
|
378
|
+
end
|
|
379
|
+
# verify the required parameter 'id' is set
|
|
380
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
381
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.delete_studio_project_file"
|
|
382
|
+
end
|
|
383
|
+
# verify the required parameter 'path' is set
|
|
384
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
385
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling StudioApi.delete_studio_project_file"
|
|
386
|
+
end
|
|
387
|
+
# resource path
|
|
388
|
+
local_var_path = '/api/studio/projects/{id}/files/{path}'.sub('{id}', CGI.escape(id.to_s)).sub('{path}', CGI.escape(path.to_s))
|
|
389
|
+
|
|
390
|
+
# query parameters
|
|
391
|
+
query_params = opts[:query_params] || {}
|
|
392
|
+
|
|
393
|
+
# header parameters
|
|
394
|
+
header_params = opts[:header_params] || {}
|
|
395
|
+
# HTTP header 'Accept' (if needed)
|
|
396
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
397
|
+
|
|
398
|
+
# form parameters
|
|
399
|
+
form_params = opts[:form_params] || {}
|
|
400
|
+
|
|
401
|
+
# http body (model)
|
|
402
|
+
post_body = opts[:debug_body]
|
|
403
|
+
|
|
404
|
+
# return_type
|
|
405
|
+
return_type = opts[:debug_return_type] || 'DeleteStudioProjectFile200Response'
|
|
406
|
+
|
|
407
|
+
# auth_names
|
|
408
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
409
|
+
|
|
410
|
+
new_options = opts.merge(
|
|
411
|
+
:operation => :"StudioApi.delete_studio_project_file",
|
|
412
|
+
:header_params => header_params,
|
|
413
|
+
:query_params => query_params,
|
|
414
|
+
:form_params => form_params,
|
|
415
|
+
:body => post_body,
|
|
416
|
+
:auth_names => auth_names,
|
|
417
|
+
:return_type => return_type
|
|
418
|
+
)
|
|
419
|
+
|
|
420
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
421
|
+
if @api_client.config.debugging
|
|
422
|
+
@api_client.config.logger.debug "API called: StudioApi#delete_studio_project_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
423
|
+
end
|
|
424
|
+
return data, status_code, headers
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
# Generate text with Repull AI
|
|
428
|
+
# Sends a prompt to Repull AI and returns the completion synchronously. This is the single LLM endpoint used by the Studio UI; programmatic clients can use it to drive their own vibe-coding flows. Responses include token accounting, cost-in-micros, and cache/fallback flags. 429s include a `Retry-After` header.
|
|
429
|
+
# @param generate_studio_completion_request [GenerateStudioCompletionRequest]
|
|
430
|
+
# @param [Hash] opts the optional parameters
|
|
431
|
+
# @return [GenerateStudioCompletion200Response]
|
|
432
|
+
def generate_studio_completion(generate_studio_completion_request, opts = {})
|
|
433
|
+
data, _status_code, _headers = generate_studio_completion_with_http_info(generate_studio_completion_request, opts)
|
|
434
|
+
data
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
# Generate text with Repull AI
|
|
438
|
+
# Sends a prompt to Repull AI and returns the completion synchronously. This is the single LLM endpoint used by the Studio UI; programmatic clients can use it to drive their own vibe-coding flows. Responses include token accounting, cost-in-micros, and cache/fallback flags. 429s include a `Retry-After` header.
|
|
439
|
+
# @param generate_studio_completion_request [GenerateStudioCompletionRequest]
|
|
440
|
+
# @param [Hash] opts the optional parameters
|
|
441
|
+
# @return [Array<(GenerateStudioCompletion200Response, Integer, Hash)>] GenerateStudioCompletion200Response data, response status code and response headers
|
|
442
|
+
def generate_studio_completion_with_http_info(generate_studio_completion_request, opts = {})
|
|
443
|
+
if @api_client.config.debugging
|
|
444
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.generate_studio_completion ...'
|
|
445
|
+
end
|
|
446
|
+
# verify the required parameter 'generate_studio_completion_request' is set
|
|
447
|
+
if @api_client.config.client_side_validation && generate_studio_completion_request.nil?
|
|
448
|
+
fail ArgumentError, "Missing the required parameter 'generate_studio_completion_request' when calling StudioApi.generate_studio_completion"
|
|
449
|
+
end
|
|
450
|
+
# resource path
|
|
451
|
+
local_var_path = '/api/studio/generate'
|
|
452
|
+
|
|
453
|
+
# query parameters
|
|
454
|
+
query_params = opts[:query_params] || {}
|
|
455
|
+
|
|
456
|
+
# header parameters
|
|
457
|
+
header_params = opts[:header_params] || {}
|
|
458
|
+
# HTTP header 'Accept' (if needed)
|
|
459
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
460
|
+
# HTTP header 'Content-Type'
|
|
461
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
462
|
+
if !content_type.nil?
|
|
463
|
+
header_params['Content-Type'] = content_type
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# form parameters
|
|
467
|
+
form_params = opts[:form_params] || {}
|
|
468
|
+
|
|
469
|
+
# http body (model)
|
|
470
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_studio_completion_request)
|
|
471
|
+
|
|
472
|
+
# return_type
|
|
473
|
+
return_type = opts[:debug_return_type] || 'GenerateStudioCompletion200Response'
|
|
474
|
+
|
|
475
|
+
# auth_names
|
|
476
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
477
|
+
|
|
478
|
+
new_options = opts.merge(
|
|
479
|
+
:operation => :"StudioApi.generate_studio_completion",
|
|
480
|
+
:header_params => header_params,
|
|
481
|
+
:query_params => query_params,
|
|
482
|
+
:form_params => form_params,
|
|
483
|
+
:body => post_body,
|
|
484
|
+
:auth_names => auth_names,
|
|
485
|
+
:return_type => return_type
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
489
|
+
if @api_client.config.debugging
|
|
490
|
+
@api_client.config.logger.debug "API called: StudioApi#generate_studio_completion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
491
|
+
end
|
|
492
|
+
return data, status_code, headers
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
# Get a Studio deployment
|
|
496
|
+
# Fetches a single deployment, including its current status and live URL. Poll this endpoint after `POST /api/studio/deployments` until `status` is `live`.
|
|
497
|
+
# @param id [String]
|
|
498
|
+
# @param [Hash] opts the optional parameters
|
|
499
|
+
# @return [GetStudioDeployment200Response]
|
|
500
|
+
def get_studio_deployment(id, opts = {})
|
|
501
|
+
data, _status_code, _headers = get_studio_deployment_with_http_info(id, opts)
|
|
502
|
+
data
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
# Get a Studio deployment
|
|
506
|
+
# Fetches a single deployment, including its current status and live URL. Poll this endpoint after `POST /api/studio/deployments` until `status` is `live`.
|
|
507
|
+
# @param id [String]
|
|
508
|
+
# @param [Hash] opts the optional parameters
|
|
509
|
+
# @return [Array<(GetStudioDeployment200Response, Integer, Hash)>] GetStudioDeployment200Response data, response status code and response headers
|
|
510
|
+
def get_studio_deployment_with_http_info(id, opts = {})
|
|
511
|
+
if @api_client.config.debugging
|
|
512
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.get_studio_deployment ...'
|
|
513
|
+
end
|
|
514
|
+
# verify the required parameter 'id' is set
|
|
515
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
516
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.get_studio_deployment"
|
|
517
|
+
end
|
|
518
|
+
# resource path
|
|
519
|
+
local_var_path = '/api/studio/deployments/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
520
|
+
|
|
521
|
+
# query parameters
|
|
522
|
+
query_params = opts[:query_params] || {}
|
|
523
|
+
|
|
524
|
+
# header parameters
|
|
525
|
+
header_params = opts[:header_params] || {}
|
|
526
|
+
# HTTP header 'Accept' (if needed)
|
|
527
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
528
|
+
|
|
529
|
+
# form parameters
|
|
530
|
+
form_params = opts[:form_params] || {}
|
|
531
|
+
|
|
532
|
+
# http body (model)
|
|
533
|
+
post_body = opts[:debug_body]
|
|
534
|
+
|
|
535
|
+
# return_type
|
|
536
|
+
return_type = opts[:debug_return_type] || 'GetStudioDeployment200Response'
|
|
537
|
+
|
|
538
|
+
# auth_names
|
|
539
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
540
|
+
|
|
541
|
+
new_options = opts.merge(
|
|
542
|
+
:operation => :"StudioApi.get_studio_deployment",
|
|
543
|
+
:header_params => header_params,
|
|
544
|
+
:query_params => query_params,
|
|
545
|
+
:form_params => form_params,
|
|
546
|
+
:body => post_body,
|
|
547
|
+
:auth_names => auth_names,
|
|
548
|
+
:return_type => return_type
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
552
|
+
if @api_client.config.debugging
|
|
553
|
+
@api_client.config.logger.debug "API called: StudioApi#get_studio_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
554
|
+
end
|
|
555
|
+
return data, status_code, headers
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
# Get a Studio project
|
|
559
|
+
# Fetches a single Studio project by ID, including its current status and timestamps.
|
|
560
|
+
# @param id [String] Project UUID.
|
|
561
|
+
# @param [Hash] opts the optional parameters
|
|
562
|
+
# @return [GetStudioProject200Response]
|
|
563
|
+
def get_studio_project(id, opts = {})
|
|
564
|
+
data, _status_code, _headers = get_studio_project_with_http_info(id, opts)
|
|
565
|
+
data
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
# Get a Studio project
|
|
569
|
+
# Fetches a single Studio project by ID, including its current status and timestamps.
|
|
570
|
+
# @param id [String] Project UUID.
|
|
571
|
+
# @param [Hash] opts the optional parameters
|
|
572
|
+
# @return [Array<(GetStudioProject200Response, Integer, Hash)>] GetStudioProject200Response data, response status code and response headers
|
|
573
|
+
def get_studio_project_with_http_info(id, opts = {})
|
|
574
|
+
if @api_client.config.debugging
|
|
575
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.get_studio_project ...'
|
|
576
|
+
end
|
|
577
|
+
# verify the required parameter 'id' is set
|
|
578
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
579
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.get_studio_project"
|
|
580
|
+
end
|
|
581
|
+
# resource path
|
|
582
|
+
local_var_path = '/api/studio/projects/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
583
|
+
|
|
584
|
+
# query parameters
|
|
585
|
+
query_params = opts[:query_params] || {}
|
|
586
|
+
|
|
587
|
+
# header parameters
|
|
588
|
+
header_params = opts[:header_params] || {}
|
|
589
|
+
# HTTP header 'Accept' (if needed)
|
|
590
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
591
|
+
|
|
592
|
+
# form parameters
|
|
593
|
+
form_params = opts[:form_params] || {}
|
|
594
|
+
|
|
595
|
+
# http body (model)
|
|
596
|
+
post_body = opts[:debug_body]
|
|
597
|
+
|
|
598
|
+
# return_type
|
|
599
|
+
return_type = opts[:debug_return_type] || 'GetStudioProject200Response'
|
|
600
|
+
|
|
601
|
+
# auth_names
|
|
602
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
603
|
+
|
|
604
|
+
new_options = opts.merge(
|
|
605
|
+
:operation => :"StudioApi.get_studio_project",
|
|
606
|
+
:header_params => header_params,
|
|
607
|
+
:query_params => query_params,
|
|
608
|
+
:form_params => form_params,
|
|
609
|
+
:body => post_body,
|
|
610
|
+
:auth_names => auth_names,
|
|
611
|
+
:return_type => return_type
|
|
612
|
+
)
|
|
613
|
+
|
|
614
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
615
|
+
if @api_client.config.debugging
|
|
616
|
+
@api_client.config.logger.debug "API called: StudioApi#get_studio_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
617
|
+
end
|
|
618
|
+
return data, status_code, headers
|
|
619
|
+
end
|
|
620
|
+
|
|
621
|
+
# List Studio deployments
|
|
622
|
+
# Returns every deployment across all projects in your account, newest first. Filter by project with `project_id`.
|
|
623
|
+
# @param [Hash] opts the optional parameters
|
|
624
|
+
# @option opts [String] :project_id Optional — restrict the list to a single project.
|
|
625
|
+
# @option opts [String] :status
|
|
626
|
+
# @option opts [Integer] :limit (default to 50)
|
|
627
|
+
# @option opts [Integer] :offset (default to 0)
|
|
628
|
+
# @return [ListStudioDeployments200Response]
|
|
629
|
+
def list_studio_deployments(opts = {})
|
|
630
|
+
data, _status_code, _headers = list_studio_deployments_with_http_info(opts)
|
|
631
|
+
data
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
# List Studio deployments
|
|
635
|
+
# Returns every deployment across all projects in your account, newest first. Filter by project with `project_id`.
|
|
636
|
+
# @param [Hash] opts the optional parameters
|
|
637
|
+
# @option opts [String] :project_id Optional — restrict the list to a single project.
|
|
638
|
+
# @option opts [String] :status
|
|
639
|
+
# @option opts [Integer] :limit (default to 50)
|
|
640
|
+
# @option opts [Integer] :offset (default to 0)
|
|
641
|
+
# @return [Array<(ListStudioDeployments200Response, Integer, Hash)>] ListStudioDeployments200Response data, response status code and response headers
|
|
642
|
+
def list_studio_deployments_with_http_info(opts = {})
|
|
643
|
+
if @api_client.config.debugging
|
|
644
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.list_studio_deployments ...'
|
|
645
|
+
end
|
|
646
|
+
allowable_values = ["provisioning", "building", "live", "suspended", "failed"]
|
|
647
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
648
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
649
|
+
end
|
|
650
|
+
# resource path
|
|
651
|
+
local_var_path = '/api/studio/deployments'
|
|
652
|
+
|
|
653
|
+
# query parameters
|
|
654
|
+
query_params = opts[:query_params] || {}
|
|
655
|
+
query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil?
|
|
656
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
657
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
658
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
659
|
+
|
|
660
|
+
# header parameters
|
|
661
|
+
header_params = opts[:header_params] || {}
|
|
662
|
+
# HTTP header 'Accept' (if needed)
|
|
663
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
664
|
+
|
|
665
|
+
# form parameters
|
|
666
|
+
form_params = opts[:form_params] || {}
|
|
667
|
+
|
|
668
|
+
# http body (model)
|
|
669
|
+
post_body = opts[:debug_body]
|
|
670
|
+
|
|
671
|
+
# return_type
|
|
672
|
+
return_type = opts[:debug_return_type] || 'ListStudioDeployments200Response'
|
|
673
|
+
|
|
674
|
+
# auth_names
|
|
675
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
676
|
+
|
|
677
|
+
new_options = opts.merge(
|
|
678
|
+
:operation => :"StudioApi.list_studio_deployments",
|
|
679
|
+
:header_params => header_params,
|
|
680
|
+
:query_params => query_params,
|
|
681
|
+
:form_params => form_params,
|
|
682
|
+
:body => post_body,
|
|
683
|
+
:auth_names => auth_names,
|
|
684
|
+
:return_type => return_type
|
|
685
|
+
)
|
|
686
|
+
|
|
687
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
688
|
+
if @api_client.config.debugging
|
|
689
|
+
@api_client.config.logger.debug "API called: StudioApi#list_studio_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
690
|
+
end
|
|
691
|
+
return data, status_code, headers
|
|
692
|
+
end
|
|
693
|
+
|
|
694
|
+
# List Studio project files
|
|
695
|
+
# Returns every file in the project tree with its content, sha256, and size. Use the digests to detect drift before writing.
|
|
696
|
+
# @param id [String]
|
|
697
|
+
# @param [Hash] opts the optional parameters
|
|
698
|
+
# @return [ListStudioProjectFiles200Response]
|
|
699
|
+
def list_studio_project_files(id, opts = {})
|
|
700
|
+
data, _status_code, _headers = list_studio_project_files_with_http_info(id, opts)
|
|
701
|
+
data
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
# List Studio project files
|
|
705
|
+
# Returns every file in the project tree with its content, sha256, and size. Use the digests to detect drift before writing.
|
|
706
|
+
# @param id [String]
|
|
707
|
+
# @param [Hash] opts the optional parameters
|
|
708
|
+
# @return [Array<(ListStudioProjectFiles200Response, Integer, Hash)>] ListStudioProjectFiles200Response data, response status code and response headers
|
|
709
|
+
def list_studio_project_files_with_http_info(id, opts = {})
|
|
710
|
+
if @api_client.config.debugging
|
|
711
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.list_studio_project_files ...'
|
|
712
|
+
end
|
|
713
|
+
# verify the required parameter 'id' is set
|
|
714
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
715
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.list_studio_project_files"
|
|
716
|
+
end
|
|
717
|
+
# resource path
|
|
718
|
+
local_var_path = '/api/studio/projects/{id}/files'.sub('{id}', CGI.escape(id.to_s))
|
|
719
|
+
|
|
720
|
+
# query parameters
|
|
721
|
+
query_params = opts[:query_params] || {}
|
|
722
|
+
|
|
723
|
+
# header parameters
|
|
724
|
+
header_params = opts[:header_params] || {}
|
|
725
|
+
# HTTP header 'Accept' (if needed)
|
|
726
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
727
|
+
|
|
728
|
+
# form parameters
|
|
729
|
+
form_params = opts[:form_params] || {}
|
|
730
|
+
|
|
731
|
+
# http body (model)
|
|
732
|
+
post_body = opts[:debug_body]
|
|
733
|
+
|
|
734
|
+
# return_type
|
|
735
|
+
return_type = opts[:debug_return_type] || 'ListStudioProjectFiles200Response'
|
|
736
|
+
|
|
737
|
+
# auth_names
|
|
738
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
739
|
+
|
|
740
|
+
new_options = opts.merge(
|
|
741
|
+
:operation => :"StudioApi.list_studio_project_files",
|
|
742
|
+
:header_params => header_params,
|
|
743
|
+
:query_params => query_params,
|
|
744
|
+
:form_params => form_params,
|
|
745
|
+
:body => post_body,
|
|
746
|
+
:auth_names => auth_names,
|
|
747
|
+
:return_type => return_type
|
|
748
|
+
)
|
|
749
|
+
|
|
750
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
751
|
+
if @api_client.config.debugging
|
|
752
|
+
@api_client.config.logger.debug "API called: StudioApi#list_studio_project_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
753
|
+
end
|
|
754
|
+
return data, status_code, headers
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
# List Studio projects
|
|
758
|
+
# Returns every Studio project owned by the authenticated account, excluding soft-deleted ones. Use this to populate a project picker or dashboard.
|
|
759
|
+
# @param [Hash] opts the optional parameters
|
|
760
|
+
# @return [ListStudioProjects200Response]
|
|
761
|
+
def list_studio_projects(opts = {})
|
|
762
|
+
data, _status_code, _headers = list_studio_projects_with_http_info(opts)
|
|
763
|
+
data
|
|
764
|
+
end
|
|
765
|
+
|
|
766
|
+
# List Studio projects
|
|
767
|
+
# Returns every Studio project owned by the authenticated account, excluding soft-deleted ones. Use this to populate a project picker or dashboard.
|
|
768
|
+
# @param [Hash] opts the optional parameters
|
|
769
|
+
# @return [Array<(ListStudioProjects200Response, Integer, Hash)>] ListStudioProjects200Response data, response status code and response headers
|
|
770
|
+
def list_studio_projects_with_http_info(opts = {})
|
|
771
|
+
if @api_client.config.debugging
|
|
772
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.list_studio_projects ...'
|
|
773
|
+
end
|
|
774
|
+
# resource path
|
|
775
|
+
local_var_path = '/api/studio/projects'
|
|
776
|
+
|
|
777
|
+
# query parameters
|
|
778
|
+
query_params = opts[:query_params] || {}
|
|
779
|
+
|
|
780
|
+
# header parameters
|
|
781
|
+
header_params = opts[:header_params] || {}
|
|
782
|
+
# HTTP header 'Accept' (if needed)
|
|
783
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
784
|
+
|
|
785
|
+
# form parameters
|
|
786
|
+
form_params = opts[:form_params] || {}
|
|
787
|
+
|
|
788
|
+
# http body (model)
|
|
789
|
+
post_body = opts[:debug_body]
|
|
790
|
+
|
|
791
|
+
# return_type
|
|
792
|
+
return_type = opts[:debug_return_type] || 'ListStudioProjects200Response'
|
|
793
|
+
|
|
794
|
+
# auth_names
|
|
795
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
796
|
+
|
|
797
|
+
new_options = opts.merge(
|
|
798
|
+
:operation => :"StudioApi.list_studio_projects",
|
|
799
|
+
:header_params => header_params,
|
|
800
|
+
:query_params => query_params,
|
|
801
|
+
:form_params => form_params,
|
|
802
|
+
:body => post_body,
|
|
803
|
+
:auth_names => auth_names,
|
|
804
|
+
:return_type => return_type
|
|
805
|
+
)
|
|
806
|
+
|
|
807
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
808
|
+
if @api_client.config.debugging
|
|
809
|
+
@api_client.config.logger.debug "API called: StudioApi#list_studio_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
810
|
+
end
|
|
811
|
+
return data, status_code, headers
|
|
812
|
+
end
|
|
813
|
+
|
|
814
|
+
# Suspend a Studio deployment
|
|
815
|
+
# Pauses a deployment without deleting it — the Fly.io machine is stopped and the URL returns 503 until the deployment is woken. Suspended deployments do not accrue runtime charges.
|
|
816
|
+
# @param id [String]
|
|
817
|
+
# @param [Hash] opts the optional parameters
|
|
818
|
+
# @return [GetStudioDeployment200Response]
|
|
819
|
+
def suspend_studio_deployment(id, opts = {})
|
|
820
|
+
data, _status_code, _headers = suspend_studio_deployment_with_http_info(id, opts)
|
|
821
|
+
data
|
|
822
|
+
end
|
|
823
|
+
|
|
824
|
+
# Suspend a Studio deployment
|
|
825
|
+
# Pauses a deployment without deleting it — the Fly.io machine is stopped and the URL returns 503 until the deployment is woken. Suspended deployments do not accrue runtime charges.
|
|
826
|
+
# @param id [String]
|
|
827
|
+
# @param [Hash] opts the optional parameters
|
|
828
|
+
# @return [Array<(GetStudioDeployment200Response, Integer, Hash)>] GetStudioDeployment200Response data, response status code and response headers
|
|
829
|
+
def suspend_studio_deployment_with_http_info(id, opts = {})
|
|
830
|
+
if @api_client.config.debugging
|
|
831
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.suspend_studio_deployment ...'
|
|
832
|
+
end
|
|
833
|
+
# verify the required parameter 'id' is set
|
|
834
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
835
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.suspend_studio_deployment"
|
|
836
|
+
end
|
|
837
|
+
# resource path
|
|
838
|
+
local_var_path = '/api/studio/deployments/{id}/suspend'.sub('{id}', CGI.escape(id.to_s))
|
|
839
|
+
|
|
840
|
+
# query parameters
|
|
841
|
+
query_params = opts[:query_params] || {}
|
|
842
|
+
|
|
843
|
+
# header parameters
|
|
844
|
+
header_params = opts[:header_params] || {}
|
|
845
|
+
# HTTP header 'Accept' (if needed)
|
|
846
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
847
|
+
|
|
848
|
+
# form parameters
|
|
849
|
+
form_params = opts[:form_params] || {}
|
|
850
|
+
|
|
851
|
+
# http body (model)
|
|
852
|
+
post_body = opts[:debug_body]
|
|
853
|
+
|
|
854
|
+
# return_type
|
|
855
|
+
return_type = opts[:debug_return_type] || 'GetStudioDeployment200Response'
|
|
856
|
+
|
|
857
|
+
# auth_names
|
|
858
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
859
|
+
|
|
860
|
+
new_options = opts.merge(
|
|
861
|
+
:operation => :"StudioApi.suspend_studio_deployment",
|
|
862
|
+
:header_params => header_params,
|
|
863
|
+
:query_params => query_params,
|
|
864
|
+
:form_params => form_params,
|
|
865
|
+
:body => post_body,
|
|
866
|
+
:auth_names => auth_names,
|
|
867
|
+
:return_type => return_type
|
|
868
|
+
)
|
|
869
|
+
|
|
870
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
871
|
+
if @api_client.config.debugging
|
|
872
|
+
@api_client.config.logger.debug "API called: StudioApi#suspend_studio_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
873
|
+
end
|
|
874
|
+
return data, status_code, headers
|
|
875
|
+
end
|
|
876
|
+
|
|
877
|
+
# Update a Studio project
|
|
878
|
+
# Updates project metadata. Only the included fields are touched; omit a field to leave it unchanged.
|
|
879
|
+
# @param id [String]
|
|
880
|
+
# @param update_studio_project_request [UpdateStudioProjectRequest]
|
|
881
|
+
# @param [Hash] opts the optional parameters
|
|
882
|
+
# @return [GetStudioProject200Response]
|
|
883
|
+
def update_studio_project(id, update_studio_project_request, opts = {})
|
|
884
|
+
data, _status_code, _headers = update_studio_project_with_http_info(id, update_studio_project_request, opts)
|
|
885
|
+
data
|
|
886
|
+
end
|
|
887
|
+
|
|
888
|
+
# Update a Studio project
|
|
889
|
+
# Updates project metadata. Only the included fields are touched; omit a field to leave it unchanged.
|
|
890
|
+
# @param id [String]
|
|
891
|
+
# @param update_studio_project_request [UpdateStudioProjectRequest]
|
|
892
|
+
# @param [Hash] opts the optional parameters
|
|
893
|
+
# @return [Array<(GetStudioProject200Response, Integer, Hash)>] GetStudioProject200Response data, response status code and response headers
|
|
894
|
+
def update_studio_project_with_http_info(id, update_studio_project_request, opts = {})
|
|
895
|
+
if @api_client.config.debugging
|
|
896
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.update_studio_project ...'
|
|
897
|
+
end
|
|
898
|
+
# verify the required parameter 'id' is set
|
|
899
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
900
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.update_studio_project"
|
|
901
|
+
end
|
|
902
|
+
# verify the required parameter 'update_studio_project_request' is set
|
|
903
|
+
if @api_client.config.client_side_validation && update_studio_project_request.nil?
|
|
904
|
+
fail ArgumentError, "Missing the required parameter 'update_studio_project_request' when calling StudioApi.update_studio_project"
|
|
905
|
+
end
|
|
906
|
+
# resource path
|
|
907
|
+
local_var_path = '/api/studio/projects/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
908
|
+
|
|
909
|
+
# query parameters
|
|
910
|
+
query_params = opts[:query_params] || {}
|
|
911
|
+
|
|
912
|
+
# header parameters
|
|
913
|
+
header_params = opts[:header_params] || {}
|
|
914
|
+
# HTTP header 'Accept' (if needed)
|
|
915
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
916
|
+
# HTTP header 'Content-Type'
|
|
917
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
918
|
+
if !content_type.nil?
|
|
919
|
+
header_params['Content-Type'] = content_type
|
|
920
|
+
end
|
|
921
|
+
|
|
922
|
+
# form parameters
|
|
923
|
+
form_params = opts[:form_params] || {}
|
|
924
|
+
|
|
925
|
+
# http body (model)
|
|
926
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_studio_project_request)
|
|
927
|
+
|
|
928
|
+
# return_type
|
|
929
|
+
return_type = opts[:debug_return_type] || 'GetStudioProject200Response'
|
|
930
|
+
|
|
931
|
+
# auth_names
|
|
932
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
933
|
+
|
|
934
|
+
new_options = opts.merge(
|
|
935
|
+
:operation => :"StudioApi.update_studio_project",
|
|
936
|
+
:header_params => header_params,
|
|
937
|
+
:query_params => query_params,
|
|
938
|
+
:form_params => form_params,
|
|
939
|
+
:body => post_body,
|
|
940
|
+
:auth_names => auth_names,
|
|
941
|
+
:return_type => return_type
|
|
942
|
+
)
|
|
943
|
+
|
|
944
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
945
|
+
if @api_client.config.debugging
|
|
946
|
+
@api_client.config.logger.debug "API called: StudioApi#update_studio_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
947
|
+
end
|
|
948
|
+
return data, status_code, headers
|
|
949
|
+
end
|
|
950
|
+
|
|
951
|
+
# Upsert a Studio project file
|
|
952
|
+
# Creates or replaces a file at the given path. Returns the new sha256 so subsequent writes can use optimistic concurrency.
|
|
953
|
+
# @param id [String]
|
|
954
|
+
# @param path [String] URL-encoded project-relative path, e.g. `src%2Fapp%2Fpage.tsx`.
|
|
955
|
+
# @param upsert_studio_project_file_request [UpsertStudioProjectFileRequest]
|
|
956
|
+
# @param [Hash] opts the optional parameters
|
|
957
|
+
# @return [UpsertStudioProjectFile200Response]
|
|
958
|
+
def upsert_studio_project_file(id, path, upsert_studio_project_file_request, opts = {})
|
|
959
|
+
data, _status_code, _headers = upsert_studio_project_file_with_http_info(id, path, upsert_studio_project_file_request, opts)
|
|
960
|
+
data
|
|
961
|
+
end
|
|
962
|
+
|
|
963
|
+
# Upsert a Studio project file
|
|
964
|
+
# Creates or replaces a file at the given path. Returns the new sha256 so subsequent writes can use optimistic concurrency.
|
|
965
|
+
# @param id [String]
|
|
966
|
+
# @param path [String] URL-encoded project-relative path, e.g. `src%2Fapp%2Fpage.tsx`.
|
|
967
|
+
# @param upsert_studio_project_file_request [UpsertStudioProjectFileRequest]
|
|
968
|
+
# @param [Hash] opts the optional parameters
|
|
969
|
+
# @return [Array<(UpsertStudioProjectFile200Response, Integer, Hash)>] UpsertStudioProjectFile200Response data, response status code and response headers
|
|
970
|
+
def upsert_studio_project_file_with_http_info(id, path, upsert_studio_project_file_request, opts = {})
|
|
971
|
+
if @api_client.config.debugging
|
|
972
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.upsert_studio_project_file ...'
|
|
973
|
+
end
|
|
974
|
+
# verify the required parameter 'id' is set
|
|
975
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
976
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.upsert_studio_project_file"
|
|
977
|
+
end
|
|
978
|
+
# verify the required parameter 'path' is set
|
|
979
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
980
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling StudioApi.upsert_studio_project_file"
|
|
981
|
+
end
|
|
982
|
+
# verify the required parameter 'upsert_studio_project_file_request' is set
|
|
983
|
+
if @api_client.config.client_side_validation && upsert_studio_project_file_request.nil?
|
|
984
|
+
fail ArgumentError, "Missing the required parameter 'upsert_studio_project_file_request' when calling StudioApi.upsert_studio_project_file"
|
|
985
|
+
end
|
|
986
|
+
# resource path
|
|
987
|
+
local_var_path = '/api/studio/projects/{id}/files/{path}'.sub('{id}', CGI.escape(id.to_s)).sub('{path}', CGI.escape(path.to_s))
|
|
988
|
+
|
|
989
|
+
# query parameters
|
|
990
|
+
query_params = opts[:query_params] || {}
|
|
991
|
+
|
|
992
|
+
# header parameters
|
|
993
|
+
header_params = opts[:header_params] || {}
|
|
994
|
+
# HTTP header 'Accept' (if needed)
|
|
995
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
996
|
+
# HTTP header 'Content-Type'
|
|
997
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
998
|
+
if !content_type.nil?
|
|
999
|
+
header_params['Content-Type'] = content_type
|
|
1000
|
+
end
|
|
1001
|
+
|
|
1002
|
+
# form parameters
|
|
1003
|
+
form_params = opts[:form_params] || {}
|
|
1004
|
+
|
|
1005
|
+
# http body (model)
|
|
1006
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(upsert_studio_project_file_request)
|
|
1007
|
+
|
|
1008
|
+
# return_type
|
|
1009
|
+
return_type = opts[:debug_return_type] || 'UpsertStudioProjectFile200Response'
|
|
1010
|
+
|
|
1011
|
+
# auth_names
|
|
1012
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1013
|
+
|
|
1014
|
+
new_options = opts.merge(
|
|
1015
|
+
:operation => :"StudioApi.upsert_studio_project_file",
|
|
1016
|
+
:header_params => header_params,
|
|
1017
|
+
:query_params => query_params,
|
|
1018
|
+
:form_params => form_params,
|
|
1019
|
+
:body => post_body,
|
|
1020
|
+
:auth_names => auth_names,
|
|
1021
|
+
:return_type => return_type
|
|
1022
|
+
)
|
|
1023
|
+
|
|
1024
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1025
|
+
if @api_client.config.debugging
|
|
1026
|
+
@api_client.config.logger.debug "API called: StudioApi#upsert_studio_project_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1027
|
+
end
|
|
1028
|
+
return data, status_code, headers
|
|
1029
|
+
end
|
|
1030
|
+
|
|
1031
|
+
# Wake a suspended Studio deployment
|
|
1032
|
+
# Resumes a previously suspended deployment — Repull restarts the Fly.io machine and the URL becomes reachable again once `status` returns to `live`.
|
|
1033
|
+
# @param id [String]
|
|
1034
|
+
# @param [Hash] opts the optional parameters
|
|
1035
|
+
# @return [GetStudioDeployment200Response]
|
|
1036
|
+
def wake_studio_deployment(id, opts = {})
|
|
1037
|
+
data, _status_code, _headers = wake_studio_deployment_with_http_info(id, opts)
|
|
1038
|
+
data
|
|
1039
|
+
end
|
|
1040
|
+
|
|
1041
|
+
# Wake a suspended Studio deployment
|
|
1042
|
+
# Resumes a previously suspended deployment — Repull restarts the Fly.io machine and the URL becomes reachable again once `status` returns to `live`.
|
|
1043
|
+
# @param id [String]
|
|
1044
|
+
# @param [Hash] opts the optional parameters
|
|
1045
|
+
# @return [Array<(GetStudioDeployment200Response, Integer, Hash)>] GetStudioDeployment200Response data, response status code and response headers
|
|
1046
|
+
def wake_studio_deployment_with_http_info(id, opts = {})
|
|
1047
|
+
if @api_client.config.debugging
|
|
1048
|
+
@api_client.config.logger.debug 'Calling API: StudioApi.wake_studio_deployment ...'
|
|
1049
|
+
end
|
|
1050
|
+
# verify the required parameter 'id' is set
|
|
1051
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1052
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.wake_studio_deployment"
|
|
1053
|
+
end
|
|
1054
|
+
# resource path
|
|
1055
|
+
local_var_path = '/api/studio/deployments/{id}/wake'.sub('{id}', CGI.escape(id.to_s))
|
|
1056
|
+
|
|
1057
|
+
# query parameters
|
|
1058
|
+
query_params = opts[:query_params] || {}
|
|
1059
|
+
|
|
1060
|
+
# header parameters
|
|
1061
|
+
header_params = opts[:header_params] || {}
|
|
1062
|
+
# HTTP header 'Accept' (if needed)
|
|
1063
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1064
|
+
|
|
1065
|
+
# form parameters
|
|
1066
|
+
form_params = opts[:form_params] || {}
|
|
1067
|
+
|
|
1068
|
+
# http body (model)
|
|
1069
|
+
post_body = opts[:debug_body]
|
|
1070
|
+
|
|
1071
|
+
# return_type
|
|
1072
|
+
return_type = opts[:debug_return_type] || 'GetStudioDeployment200Response'
|
|
1073
|
+
|
|
1074
|
+
# auth_names
|
|
1075
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1076
|
+
|
|
1077
|
+
new_options = opts.merge(
|
|
1078
|
+
:operation => :"StudioApi.wake_studio_deployment",
|
|
1079
|
+
:header_params => header_params,
|
|
1080
|
+
:query_params => query_params,
|
|
1081
|
+
:form_params => form_params,
|
|
1082
|
+
:body => post_body,
|
|
1083
|
+
:auth_names => auth_names,
|
|
1084
|
+
:return_type => return_type
|
|
1085
|
+
)
|
|
1086
|
+
|
|
1087
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1088
|
+
if @api_client.config.debugging
|
|
1089
|
+
@api_client.config.logger.debug "API called: StudioApi#wake_studio_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1090
|
+
end
|
|
1091
|
+
return data, status_code, headers
|
|
1092
|
+
end
|
|
1093
|
+
end
|
|
1094
|
+
end
|