{"generated_at":"2026-10-08T14:44:37.733407Z","project":{"id":"2b2e730c-4b32-417c-ae4a-57a1eddf29d4","name":"quote_request","workspace_id":"5e890ff3-5c7b-43f5-a4ad-75c47f90bdba","plan":"staff","cloud_gateway_url":"https://cloudgate.p2hs.dev"},"credentials":{"cloud_service_token_env":"CLOUD_SERVICE_TOKEN","project_id_env":"PROJECT_ID","cloud_gateway_env":"CLOUD_GATEWAY_URL"},"backend":{"provider":"p2hs_cloud","generated_app":"ui_and_bff","durable_data":"p2hs_cloud","jobs_and_queues":"p2hs_cloud","policy_authority":"p2hs_core","uses":"p2hs_cloud","customer_backend":null,"split":{"generated_app":["UI","calls to installed immutable platform /api routes"],"p2hs_cloud":["record engine (create/read/update/delete/query/upsert)","app-user identities","jobs and queues","webhooks","storage artifacts","connector dispatch","realtime"],"p2hs_core":["authorization","tenancy","entitlements","billing policy","secret custody","this manifest"]},"customer_backend_attach":{"status":"not_attached","uses":"p2hs_cloud","when_attached":"A later platform feature will let an owner attach an existing HTTP API or database. Until then, and whenever customer_backend is omitted, the generated app uses P2HS Cloud. Do not invent a local store or call a customer origin from the Worker.","codegen":"If no customer backend is provided, store data in Cloud records and proxy via the BFF. Do not build SQLite/KV/JSON as a substitute."}},"env_vars":{"secrets":[],"public":[]},"database":{"persistence":"cloud_record_engine","schema_status":"empty","schema_source":"live","entities":[]},"auth":{"user_directory":"platform_only","enabled":true,"providers":["email","magic_link"],"allow_signup":true,"custom_roles":["admin","super_admin","member","staff"],"google_oauth_mode":null,"super_admin_role":"super_admin","admin_role":"admin","customer_role":"member","admin_panel_path":"/admin","customer_login_path":"/login","workspace_owner_email":"mohsin465@piemail.us","workspace_owner_name":"Mohsin Haidery","staff_from_workspace":[{"email":"muhammad.zakir@pie-solutions.com","name":"Muhammad Zakir","workspace_role":"admin","app_role":"admin"},{"email":"mohsin465@piemail.us","name":"Mohsin Haidery","workspace_role":"owner","app_role":"super_admin"}],"owner_provisioned_as_super_admin":true,"owner_provisioned_as_admin":true},"storage":{"buckets":[]},"functions":{"system":[{"id":"81ec4ff0-1679-4b57-9b90-8d5250988dae","slug":"ledger-get-account-balance","name":"Get Ledger Account Balance","tags":["accounting","ledger","finance"],"requires":[],"status":"available","description":"Computes the net balance of a ledger account from its posted ledger_entry records. Balance convention is credit-normal: balance = sum(credits) - sum(debits).\n","version":"1.0.0","trigger_type":"http","input_schema":{"type":"object","required":["account"],"properties":{"account":{"type":"string","description":"Passed as the ?account= query parameter."}}},"output_schema":{"type":"object","properties":{"account":{"type":"string"},"balance":{"type":"number"},"currency":{"type":"string"},"entry_count":{"type":"integer"}}},"route_examples":{"nuxt":{"client_call":"await $fetch('/api/ledger/balance', { query: { account } })","server_route":"/server/api/ledger/balance.get.ts"}}},{"id":"4e05766a-9d82-47e4-9cf5-d639616baf64","slug":"ledger-post-transaction","name":"Post Ledger Transaction","tags":["accounting","ledger","finance"],"requires":[],"status":"available","description":"Posts a balanced double-entry accounting transaction (two or more postings whose debits equal credits) as ledger_entry records. Creates the ledger_entry entity on first use if it does not already exist for the project.\n","version":"1.0.0","trigger_type":"http","input_schema":{"type":"object","required":["entries"],"properties":{"memo":{"type":"string"},"entries":{"type":"array","items":{"type":"object","required":["account","direction","amount"],"properties":{"amount":{"type":"number"},"account":{"type":"string"},"direction":{"enum":["debit","credit"],"type":"string"}}}},"currency":{"type":"string"}}},"output_schema":{"type":"object","properties":{"entries":{"type":"array"},"currency":{"type":"string"},"transaction_id":{"type":"string"}}},"route_examples":{"nuxt":{"client_call":"await $fetch('/api/ledger/post', { method: 'POST', body: { entries } })","server_route":"/server/api/ledger/post.post.ts"}}},{"id":"e1237ac6-07ce-4a80-84aa-0164521f3f17","slug":"stripe-create-checkout","name":"Create Stripe Checkout Session","tags":["stripe","checkout","payments"],"requires":["stripe"],"status":"available","description":"Creates a hosted Stripe Checkout Session and returns the checkout URL.","version":"1.0.0","trigger_type":"http","input_schema":{"type":"object","required":["line_items","success_url","cancel_url"],"properties":{"cancel_url":{"type":"string"},"line_items":{"type":"array","items":{"type":"object","properties":{"price_id":{"type":"string"},"quantity":{"type":"integer"}}}},"success_url":{"type":"string"},"customer_email":{"type":"string"}}},"output_schema":{"type":"object","properties":{"session_id":{"type":"string"},"checkout_url":{"type":"string"}}},"route_examples":{"nuxt":{"client_call":"await $fetch('/api/checkout', { method: 'POST', body })","server_route":"/server/api/checkout.post.ts"}}},{"id":"b5a0bec2-3596-4681-80ea-94f2ea611a97","slug":"task-create","name":"Create Task","tags":["tasks","productivity","project-management"],"requires":[],"status":"available","description":"Creates a task record with status, category, priority, tags, and assignee. Creates the task entity on first use if it does not already exist for the project.\n","version":"1.0.0","trigger_type":"http","input_schema":{"type":"object","required":["title"],"properties":{"tags":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"status":{"enum":["todo","in_progress","done"],"type":"string"},"assignee":{"type":"string"},"category":{"type":"string"},"due_date":{"type":"string"},"priority":{"enum":["low","medium","high"],"type":"string"},"description":{"type":"string"}}},"output_schema":{"type":"object","properties":{"id":{"type":"string"},"tags":{"type":"array"},"title":{"type":"string"},"status":{"type":"string"},"assignee":{"type":"string"},"category":{"type":"string"},"due_date":{"type":"string"},"priority":{"type":"string"}}},"route_examples":{"nuxt":{"client_call":"await $fetch('/api/tasks', { method: 'POST', body: task })","server_route":"/server/api/tasks/index.post.ts"}}},{"id":"a85073b4-5782-4546-b714-79f15beefcca","slug":"task-list","name":"List Tasks","tags":["tasks","productivity","project-management"],"requires":[],"status":"available","description":"Lists tasks with optional status, category, assignee, and tag filters, and cursor-based pagination.\n","version":"1.0.0","trigger_type":"http","input_schema":{"type":"object","properties":{"tag":{"type":"string"},"limit":{"type":"integer"},"cursor":{"type":"string"},"status":{"enum":["todo","in_progress","done"],"type":"string"},"assignee":{"type":"string"},"category":{"type":"string"}}},"output_schema":{"type":"object","properties":{"tasks":{"type":"array"},"next_cursor":{"type":"string"}}},"route_examples":{"nuxt":{"client_call":"await $fetch('/api/tasks', { query: { status: 'todo' } })","server_route":"/server/api/tasks/index.get.ts"}}},{"id":"e2a189f0-a206-4c30-a152-2675b04d1f34","slug":"booking-cancel","name":"Cancel Booking","tags":["booking","appointments","scheduling"],"requires":[],"status":"available","description":"Marks a booking as cancelled, freeing its time slot for new bookings.","version":"1.1.0","trigger_type":"http","input_schema":{"type":"object","required":["booking_id"],"properties":{"booking_id":{"type":"string"}}},"output_schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}}},"route_examples":{"nuxt":{"client_call":"await $fetch(`/api/bookings/${id}/cancel`, { method: 'POST' })","server_route":"/server/api/bookings/[id]/cancel.post.ts"}}},{"id":"b3c60295-d98c-439c-9d84-ee97083b0535","slug":"hubspot-upsert-contact","name":"Upsert HubSpot Contact","tags":["hubspot","crm"],"requires":["hubspot"],"status":"available","description":"Creates or updates a HubSpot contact by email using the CRM batch upsert API. Reusable from any flow that needs to push a customer into HubSpot — signup, booking, checkout, contact forms.\n","version":"1.0.0","trigger_type":"http","input_schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"phone":{"type":"string"},"lastname":{"type":"string"},"firstname":{"type":"string"},"properties":{"type":"object","description":"Additional HubSpot contact property names/values to set."}}},"output_schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}}},"route_examples":{"nuxt":{"client_call":"await $fetch('/api/crm/hubspot-contact', { method: 'POST', body: { email, firstname, lastname } })","server_route":"/server/api/crm/hubspot-contact.post.ts"}}},{"id":"2dff684a-6b98-4214-a82e-e6b7de93530c","slug":"salesforce-upsert-lead","name":"Upsert Salesforce Lead","tags":["salesforce","crm"],"requires":["salesforce"],"status":"available","description":"Creates or updates a Salesforce Lead by email (looked up via SOQL, since Email is not an External ID field on a stock Salesforce org). Reusable from any flow that needs to push a prospect into Salesforce — signup, booking, checkout, contact forms.\n","version":"1.0.0","trigger_type":"http","input_schema":{"type":"object","required":["email","last_name"],"properties":{"email":{"type":"string","format":"email"},"phone":{"type":"string"},"fields":{"type":"object","description":"Additional Salesforce Lead field API names/values to set."},"company":{"type":"string","description":"Required by Salesforce if the org enforces the standard Lead validation rule; defaults to \"Unknown\" if omitted."},"last_name":{"type":"string","description":"Required by Salesforce's standard Lead object."},"first_name":{"type":"string"}}},"output_schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"created":{"type":"boolean"}}},"route_examples":{"nuxt":{"client_call":"await $fetch('/api/crm/salesforce-lead', { method: 'POST', body: { email, last_name } })","server_route":"/server/api/crm/salesforce-lead.post.ts"}}},{"id":"9a7651a2-58dd-4bb6-bec8-3f7e6b81cef2","slug":"client-portal-create-account","name":"Create Client Portal Account","tags":["client-portal","rls","onboarding"],"requires":[],"status":"available","description":"Creates a client_account record correctly owned by a verified app-user, so Cloud's row-level security actually restricts that customer to their own account and updates. Verifies the app_user_id is a real, existing platform identity before creating the account — never trust an arbitrary caller- supplied id as \"verified ownership\". Part of the client-portal feature pack.\n","version":"1.0.0","trigger_type":"http","input_schema":{"type":"object","required":["app_user_id"],"properties":{"app_user_id":{"type":"string","description":"An existing platform app-user id (e.g. from GET /api/admin/users). Verified against Cloud before the account is created."},"company_name":{"type":"string"}}},"output_schema":{"type":"object","properties":{"id":{"type":"string"},"app_user_id":{"type":"string"}}},"route_examples":{"nuxt":{"client_call":"await $fetch('/api/admin/client-accounts', { method: 'POST', body: { app_user_id, company_name } })","server_route":"/server/api/admin/client-accounts/index.post.ts"}}},{"id":"7ac50e0a-735c-4c7d-ab36-6bcbfd558ecb","slug":"booking-create","name":"Create Booking","tags":["booking","appointments","scheduling"],"requires":[],"status":"available","description":"Creates an appointment/reservation booking with atomic double-booking protection — rejects a new booking that overlaps an existing held/confirmed booking for the same resource. Registers the booking resource on first use if it does not already exist for the project.\n","version":"1.1.0","trigger_type":"http","input_schema":{"type":"object","required":["customer_name","customer_email","resource","start_time","end_time"],"properties":{"notes":{"type":"string"},"end_time":{"type":"string","description":"ISO 8601 datetime."},"resource":{"type":"string","description":"The staff member, room, or service being booked."},"start_time":{"type":"string","description":"ISO 8601 datetime."},"customer_name":{"type":"string"},"customer_email":{"type":"string"},"customer_phone":{"type":"string","description":"Required only if REMINDER_CHANNEL is configured as \"sms\"."},"static_env_vars":{"type":"object","properties":{"REMINDER_CHANNEL":{"type":"string"},"REMINDER_LEAD_MINUTES":{"type":"string"},"REMINDER_CONNECTION_ID":{"type":"string"}},"description":"Resolved at pack-install time by PackInstallService, not part of the per-request body. REMINDER_LEAD_MINUTES (default 1440) and REMINDER_CHANNEL (default \"email\") control the reminder scheduled automatically after a successful booking; sms requires REMINDER_CONNECTION_ID (a Twilio connection) or no reminder is scheduled.\n"}}},"output_schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}}},"route_examples":{"nuxt":{"client_call":"await $fetch('/api/bookings', { method: 'POST', body: booking })","server_route":"/server/api/bookings/index.post.ts"}}},{"id":"4e0b9f0c-354e-4629-8a82-de538e23e6ac","slug":"client-portal-post-update","name":"Post Client Portal Update","tags":["client-portal","rls"],"requires":[],"status":"available","description":"Creates a project_update record automatically owned by the same app-user as its parent client_account, so the customer's own RLS-scoped session sees it without any manual owner wiring by the caller. Part of the client-portal feature pack.\n","version":"1.0.0","trigger_type":"http","input_schema":{"type":"object","required":["client_account_id","title","body"],"properties":{"body":{"type":"string"},"title":{"type":"string"},"visibility":{"enum":["client","internal"],"type":"string","default":"internal","description":"\"client\" is shown to the customer's own portal view; \"internal\" is staff-only. Defaults to internal so an update is never accidentally exposed."},"client_account_id":{"type":"string"}}},"output_schema":{"type":"object","properties":{"id":{"type":"string"},"visibility":{"type":"string"}}},"route_examples":{"nuxt":{"client_call":"await $fetch(`/api/admin/client-accounts/${id}/updates`, { method: 'POST', body: { title, body, visibility: 'client' } })","server_route":"/server/api/admin/client-accounts/[id]/updates.post.ts"}}},{"id":"a9839f3c-8d87-4a56-b72d-af8566d93301","slug":"contact-capture-retry","name":"Retry Failed Contact Notifications","tags":["contact-capture","email","retry"],"requires":[],"status":"available","description":"Periodically re-attempts the owner notification for contact_submission records stuck in status=failed, up to 3 total attempts. Exists because event-triggered function failures are not automatically retried by the platform queue (Cloud's pc-functions consumer swallows per-invocation failures) — this is the explicit recovery path contact-capture-notify's failures rely on. Part of the contact-capture feature pack; not meant to be installed standalone.\n","version":"1.1.0","trigger_type":"schedule","input_schema":{"type":"object","properties":{"static_env_vars":{"type":"object","properties":{"NOTIFY_TO_EMAIL":{"type":"string","format":"email"}}}}},"output_schema":{"type":"object","properties":{"retried":{"type":"number"},"recovered":{"type":"number"}}},"route_examples":null},{"id":"fd50c10a-35c6-4647-a078-19fbcf460bc9","slug":"contact-capture-notify","name":"Notify on Contact Submission","tags":["contact-capture","email"],"requires":[],"status":"available","description":"Sends the site owner a notification email when a contact_submission record is created, and updates the submission's status/notify_error accordingly. Part of the contact-capture feature pack — not meant to be installed standalone, since it depends on that pack's contact_submission entity shape.\n","version":"1.1.0","trigger_type":"event","input_schema":{"type":"object","properties":{"static_env_vars":{"type":"object","properties":{"NOTIFY_TO_EMAIL":{"type":"string","format":"email"}},"description":"Resolved at pack-install time by PackInstallService — NOTIFY_TO_EMAIL is the actual destination address, not a literal in this manifest.\n"}}},"output_schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"route_examples":null},{"id":"844b70e4-c874-4103-965a-78096776cbcb","slug":"contact-capture-crm-sync","name":"Sync Contact Submission to CRM","tags":["contact-capture","crm"],"requires":[],"status":"available","description":"When a contact_submission record is created, optionally upserts it as a contact/lead in a connected CRM (HubSpot or Salesforce) via the real integration.execute connector pipeline. A no-op (not an error) when no CRM connection is configured for this install. Part of the contact-capture feature pack — not meant to be installed standalone.\n","version":"1.0.0","trigger_type":"event","input_schema":{"type":"object","properties":{"static_env_vars":{"type":"object","properties":{"CRM_CONNECTION_ID":{"type":"string","description":"The project's connector connection id for the target CRM. Unset = CRM sync disabled for this install."},"CRM_FIELD_MAPPING":{"type":"string","description":"JSON object string mapping contact_submission field names to CRM property/field names, e.g. {\"name\":\"firstname\",\"message\":\"contact_form_message\"} for HubSpot, or {\"name\":\"LastName\",\"message\":\"Description\"} for Salesforce. email is always sent separately and does not need to be listed. Salesforce Lead requires LastName at minimum — an unmapped required field will make the sync fail, visibly, every time; this is a real setup requirement, not something this function can invent a value for.\n"},"CRM_CONNECTOR_ACTION":{"type":"string","description":"hubspot.upsert_contact, salesforce.upsert_lead, or salesforce.upsert_contact."}},"description":"Resolved at pack-install time by PackInstallService from this install's own config — not literals in this manifest.\n"}}},"output_schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"route_examples":null},{"id":"34a7fbad-f8d4-4083-bc27-f1afbed65e5e","slug":"booking-list-availability","name":"List Booking Availability","tags":["booking","appointments","scheduling"],"requires":[],"status":"available","description":"Returns free time slots for a resource over a date range, computed from the resource's configured business hours/duration and existing held/confirmed reservations.\n","version":"1.1.0","trigger_type":"http","input_schema":{"type":"object","required":["resource"],"properties":{"to":{"type":"string","description":"ISO 8601 datetime. Defaults to 7 days after from."},"date":{"type":"string","description":"Single day, YYYY-MM-DD (evaluated in UTC). Mutually exclusive with from/to."},"from":{"type":"string","description":"ISO 8601 datetime. Defaults to now."},"resource":{"type":"string"}}},"output_schema":{"type":"object","properties":{"slots":{"type":"array"}}},"route_examples":{"nuxt":{"client_call":"await $fetch('/api/bookings/availability', { query: { resource, date } })","server_route":"/server/api/bookings/availability.get.ts"}}}],"project":[]},"feature_packs":{"catalog":[{"id":"7ebee586-03e7-4766-8160-76e48fb8fe50","slug":"inventory-management","name":"Inventory Management","description":"Staff-managed operational stock records. Quantity is explicit state, not a reservation.","version":"1.0.0","tags":["inventory","stock"],"composes":[],"requires":["primitive:inventory.reserve","primitive:inventory.release","primitive:inventory.commit"],"provides":["inventory.stock"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"5a2d31db-f88d-485b-bad3-5cb959929819","slug":"membership-management","name":"Membership Management","description":"Staff-managed application membership roster. Not auth, RBAC, or Stripe subscriptions.","version":"1.0.0","tags":["membership","roster"],"composes":[],"requires":[],"provides":["membership.member"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"39a39b88-bbcc-4c5e-be1e-5fb35a725270","slug":"appointment-booking","name":"Appointment Booking","description":"Atomic slot reservations, availability, and cancellation via Cloud's native booking store — instead of hand-rolled overlap checks on the record engine.","version":"1.1.0","tags":["booking","appointments","scheduling"],"composes":["booking-create","booking-cancel","booking-list-availability"],"requires":["primitive:booking.reserve","primitive:booking.cancel","primitive:booking.availability"],"provides":["booking.availability","booking.appointment","booking.cancellation"],"events":["booking.created","booking.cancelled","booking.rescheduled"],"provider_bindings":[{"capability":"calendar.sync","providers":["google_calendar","calendly"],"configuration_required":false,"missing_configuration_behavior":"disabled"},{"capability":"messaging.sms.send","providers":["twilio"],"configuration_required":false,"missing_configuration_behavior":"degraded"},{"capability":"notification.sms","providers":["twilio"],"configuration_required":false,"missing_configuration_behavior":"degraded"}],"status":"available","input_schema":{"type":"object","properties":{"calendar_sync":{"type":"boolean","default":false},"reminder_channel":{"enum":["email","sms"],"type":"string","default":"email"},"reminder_lead_minutes":{"type":"number","default":1440,"description":"Minutes before the appointment to send the reminder. Default 1440 (24h)."},"reminder_connection_id":{"type":"string","description":"Required only when reminder_channel is \"sms\" — a configured Twilio connection id."}}}},{"id":"bc1e3865-2ce7-47d1-958b-3380878f9b5a","slug":"crm-pipeline","name":"CRM Pipeline","description":"First-party contacts and deals with pipeline stages, tasks, and reminders — with optional two-way sync to HubSpot or Salesforce.","version":"1.0.0","tags":["crm","leads","pipeline"],"composes":["task-create","task-list"],"requires":[],"provides":["crm.contact","crm.deal","crm.pipeline"],"events":["crm.contact_created","crm.deal_created","crm.deal_stage_changed"],"provider_bindings":[{"capability":"crm.external_sync","providers":["hubspot","salesforce"],"configuration_required":false,"missing_configuration_behavior":"disabled"}],"status":"available","input_schema":{"type":"object","properties":{"pipeline_stages":{"type":"array","items":{"type":"string"},"description":"Override the default stage list."},"crm_sync_connector_action":{"type":"string","description":"Optional connector action to mirror new contacts externally, e.g. hubspot.upsert_contact."}}}},{"id":"184f22a5-71f3-44be-95d7-323aaac001c2","slug":"reporting-dashboards","name":"Reporting Dashboards","description":"Staff-managed saved report definitions over existing Cloud records. No BI warehouse, no new query engine.","version":"1.0.0","tags":["reporting","dashboards"],"composes":[],"requires":[],"provides":["reporting.dashboard"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"9d6c8b9c-9597-409e-bea8-1ea749174de8","slug":"saas-membership","name":"SaaS Membership","description":"App-customer subscriptions and entitlements reconciled from Stripe webhooks — kept separate from the builder workspace's own P2HS plan/billing.","version":"1.1.0","tags":["saas","subscriptions","entitlements"],"composes":[],"requires":[],"provides":["payments.subscription","membership.entitlement"],"events":["subscription.created","subscription.status_changed","subscription.canceled"],"provider_bindings":[{"capability":"payments.subscription","providers":["stripe"],"configuration_required":true,"missing_configuration_behavior":"degraded"},{"capability":"payments.provider","providers":["stripe"],"configuration_required":true,"missing_configuration_behavior":"degraded"}],"status":"available","input_schema":{"type":"object","properties":{"plan_keys":{"type":"array","items":{"type":"string"},"description":"App-facing plan keys this project offers, e.g. ['starter', 'pro']."}}}},{"id":"11f41985-7f31-432d-94be-039ed2a232db","slug":"approval-workflow","name":"Approval Workflow","description":"Requests routed to a role-scoped approver with a fixed pending/approved/rejected/escalated state machine and a task-based audit trail — instead of unconstrained record PATCHes that let any status jump to any other.","version":"1.0.0","tags":["operations","approvals","internal"],"composes":["task-create","task-list"],"requires":["primitive:workflow.transition"],"provides":["workflow.approval"],"events":["approval.requested","approval.approved","approval.rejected","approval.escalated"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","required":["approver_roles"],"properties":{"approver_roles":{"type":"array","items":{"type":"string"},"description":"Platform auth custom_roles allowed to approve/reject, e.g. ['manager', 'admin']."},"escalation_hours":{"type":"number","description":"Hours a request may stay pending before it is flagged for escalation."}}}},{"id":"b1af1556-3af4-41f7-bbd5-322a7801ccb7","slug":"task-management","name":"Task Management","description":"Staff-managed task tracking with an enforced status graph. Optional subject reference (subject_entity_key/subject_record_id) so a task may relate to any other record; assignment composes with the assignment-tracking pack rather than an assignee field here. Not the legacy task-create/task-list function library -- that entity_key ('task') is a separate, ungoverned, contained-compatibility mechanism this pack does not touch or reuse.","version":"1.0.0","tags":["workflow","tasks","operations"],"composes":[],"requires":["primitive:workflow.transition"],"provides":["task.management","task.tracking"],"events":["task.created","task.status_changed","task.completed"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"57277a33-393f-4fbb-9999-566d4c3dd5be","slug":"activity-timeline","name":"Activity Timeline","description":"Governed read-model projection over canonical domain events (10D-10D4) for a subject, referenced by opaque (subject_entity_key, subject_record_id). Not a second event system: it emits nothing, and this pack's contract grants no actor a create/update action -- rows exist only via canonical event consumption, never a generated-app write path.","version":"1.0.0","tags":["workflow","activity","operations"],"composes":[],"requires":[],"provides":["activity.timeline","activity.tracking"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"48ef0456-5d71-433d-80b7-609866540cc4","slug":"ai-knowledge-assistant","name":"AI Knowledge Assistant","description":"A threaded chat assistant backed by the app owner's own OpenAI API key via the openai connector (BYOK) — never P2HS's own managed AI credits/wallet.","version":"1.0.0","tags":["ai","assistant","chat"],"composes":[],"requires":["primitive:data.entity"],"provides":["ai.assistant","ai.chat"],"events":["assistant.message_created"],"provider_bindings":[{"capability":"ai.chat","providers":["openai"],"configuration_required":true,"missing_configuration_behavior":"degraded"}],"status":"available","input_schema":{"type":"object","required":["system_prompt"],"properties":{"model":{"type":"string","default":"gpt-4o-mini"},"system_prompt":{"type":"string","description":"Instructions establishing the assistant's role/scope for this app."},"knowledge_base_enabled":{"type":"boolean","default":false,"description":"Ground responses in the manifest's knowledge_base entries when available."}}}},{"id":"e6f358ed-88c6-4973-bf55-6f40ce33161c","slug":"staff-admin-console","name":"Staff Admin Console","description":"Lets a super_admin invite, track, and revoke admin (staff) users for the app's own three-tier auth (super_admin/admin/member) — instead of a hand-rolled invite flow per project.","version":"1.0.0","tags":["auth","staff","admin","roles"],"composes":[],"requires":[],"provides":["staff.invitation","admin.staff_management"],"events":["staff.invited","staff.accepted","staff.revoked"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{"notify_email":{"type":"boolean","default":true,"description":"Send an email.send job to the invitee with a link to accept the invite."},"invite_accept_path":{"type":"string","default":"/admin/invite/accept","description":"Route where an invited staff member completes signup and is granted auth.admin_role."}}}},{"id":"cefda756-a1de-43d5-96db-3ca0cbd3b93a","slug":"notifications-in-app","name":"In-App Notifications","description":"Governed, per-recipient projection over canonical domain events (10D-10D4). Not a second event bus: it emits nothing of its own. Recipient identity is the platform's existing authenticated app_user id (JWT sub / CallerAuth.userId), reused via record ownership + access_policy scope=owner -- no new individual-user relation type. Rows exist only via canonical event consumption by a non-app_user (internal) caller; no role is granted create.","version":"1.0.0","tags":["notifications","in_app","operations"],"composes":[],"requires":[],"provides":["notifications.in_app","notifications.tracking"],"events":["notification.email_delivery_attempted"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"68800f1a-1279-4a68-873c-ced9014a7f2e","slug":"comment-threads","name":"Comment Threads","description":"Cross-cutting comment/note records with an explicit visibility field (internal/customer_visible/staff_only), reusable by case, task, and document records.","version":"1.0.0","tags":["collaboration","comments"],"composes":[],"requires":[],"provides":["collaboration.comment"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"413574ab-0ef7-4a2a-803a-50082fa9ade9","slug":"governance-groups","name":"Governance Groups","description":"Staff-managed governance group/membership records. Meetings are task.management records; agendas/minutes are documents records; decisions are workflow.approval records -- deliberately no dedicated meeting/agenda/decision subsystem.","version":"1.0.0","tags":["governance"],"composes":[],"requires":[],"provides":["governance.group"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"7f164064-608d-44c1-b23b-fede11aa45a8","slug":"customer-success-accounts","name":"Customer Success Accounts","description":"Staff-managed onboarding/health/escalation tracking per customer or organization. Health is staff-set/configuration-driven, not computed.","version":"1.0.0","tags":["customer_success"],"composes":[],"requires":[],"provides":["customer_success.account"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"4e2b38d1-c4fb-48b7-a38f-b9ca0d1d1ddc","slug":"content-ingest","name":"Content Ingest","description":"Receive content records from an external automation (Make, n8n, a customer's own backend, ...) through a governed webhook and upsert them into a content_item entity, identified by source+external_id. Pair with the content.collection App Block to present them.","version":"1.0.0","tags":["content","webhook","ingest"],"composes":[],"requires":[],"provides":["content.ingest_webhook","content.item"],"events":["content.ingested","content.ingest_rejected"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"4a79b0ae-9f7a-44fb-8999-afab171bf033","slug":"client-portal","name":"Client Portal","description":"Authenticated client accounts with a project-update feed and Stripe invoices/billing-portal access — client data isolated per app user.","version":"1.1.0","tags":["portal","clients","billing"],"composes":["client-portal-create-account","client-portal-post-update"],"requires":[],"provides":["client.account","client.updates","billing.customer"],"events":["client.account_created","client.update_published"],"provider_bindings":[{"capability":"payments.provider","providers":["stripe"],"configuration_required":true,"missing_configuration_behavior":"degraded"}],"status":"available","input_schema":{"type":"object","properties":{"crm_sync_connector_action":{"type":"string","description":"Optional connector action to mirror client accounts externally, e.g. salesforce.upsert_contact."}}}},{"id":"20a80028-3ac5-47a5-8a19-8fd4b9268665","slug":"contact-capture","name":"Contact Capture","description":"Validated contact-form submission with a durable inbox record, owner email notification via platform email.send (no Resend connector required), optional visitor confirmation, and optional CRM upsert.","version":"1.3.0","tags":["contact","forms","leads","crm"],"composes":["contact-capture-notify","contact-capture-crm-sync","contact-capture-retry"],"requires":["primitive:email.send"],"provides":["form.public_submission","contact.capture"],"events":["contact.submitted","contact.notification_sent","contact.notification_failed","contact.crm_synced","contact.crm_sync_failed"],"provider_bindings":[{"capability":"crm.contact.upsert","providers":["hubspot","salesforce"],"configuration_required":false,"missing_configuration_behavior":"disabled"},{"capability":"crm.external_sync","providers":["hubspot","salesforce"],"configuration_required":false,"missing_configuration_behavior":"disabled"}],"status":"available","input_schema":{"type":"object","properties":{"notify_email":{"type":"boolean","default":true,"description":"Send the site owner an email when a new submission arrives."},"notify_to_email":{"type":"string","description":"Destination address(es) for new-submission notifications. Comma-separate multiple addresses. When omitted, the workspace owner email is used."},"crm_connection_id":{"type":"string","description":"Optional connector connection id for a CRM to sync new submissions into."},"crm_field_mapping":{"type":"object","description":"Maps contact_submission field names to CRM property/field names."},"crm_connector_action":{"enum":["hubspot.upsert_contact","salesforce.upsert_lead","salesforce.upsert_contact"],"type":"string","description":"Which CRM action to call. Required if crm_connection_id is set."},"send_confirmation_email":{"type":"boolean","default":true,"description":"Send the visitor a confirmation email that their message was received."}}}},{"id":"9dd0c414-e490-4449-869a-e75cb5632f0a","slug":"contract-management","name":"Contract Management","description":"Staff-managed contract/agreement lifecycle records with parties and start/end/renewal/notice dates. E-signature stays an external, optional integration -- never a hard requirement.","version":"1.0.0","tags":["contract"],"composes":[],"requires":[],"provides":["contract.contract"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"b931e52f-aac3-4452-a103-ef7fa004df26","slug":"workforce-directory","name":"Workforce Directory","description":"Staff-managed worker directory records with role, skills, and a credential expiry date. Shift assignment is a separate Cloud-native primitive (workforce.shift_assign / workforce.shift_release), not a field here -- no payroll, timesheet, or clock-in engine.","version":"1.0.0","tags":["workforce"],"composes":[],"requires":["primitive:workforce.shift_assign","primitive:workforce.shift_release"],"provides":["workforce.worker"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"6aa70b28-c7ea-4b7b-be8a-84bbb061f387","slug":"content-presets","name":"Content Presets","description":"Canonical staff-authored content entities (testimonials, FAQs, services, team members, locations, pricing tiers, gallery items, events) for pairing with the content.collection App Block, so these common marketing-site structures don't need a bespoke schema invented per generated project.","version":"1.0.0","tags":["content","marketing","website"],"composes":[],"requires":[],"provides":["content.preset.testimonial","content.preset.faq","content.preset.service","content.preset.team_member","content.preset.location","content.preset.pricing_tier","content.preset.gallery_item","content.preset.event"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"d6ecf6d9-36f3-40e4-b6ce-7cf815758223","slug":"business-directory","name":"Business Directory","description":"A publicly browsable directory of business profiles, each owned and editable only by the app-user who created it — like a normal user profile, not staff-managed catalog data.","version":"1.1.0","tags":["directory","profiles","networking"],"composes":[],"requires":[],"provides":["directory.business","directory.profile"],"events":["directory.profile_updated"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"2bc6c1e3-04bb-41e6-9a85-d1f4b2f2e2e6","slug":"calculator-mortgage","name":"Mortgage Calculator","description":"Informational mortgage payment calculator. Ships Calculation IR only; no persistence entity. Local execution. Not authoritative billing.","version":"1.0.0","tags":["calculator","visualization"],"composes":[],"requires":[],"provides":["calculator.mortgage"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"3f5c76ff-d139-4741-bc3d-6fac3f2a1774","slug":"product-catalog","name":"Product Catalog","description":"Staff-managed application catalog items, independent of Stripe checkout.","version":"1.1.0","tags":["catalog","products"],"composes":[],"requires":[],"provides":["catalog.product"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"ed872b1f-c2c1-4e3d-8fcb-840543d2e456","slug":"messaging","name":"Messaging","description":"Private 1:1/group chat between business-directory profiles, fanned out one rls_enabled copy per participant so each side's reads stay scoped by the platform, not by application code.","version":"1.1.0","tags":["messaging","chat","networking"],"composes":[],"requires":[],"provides":["communication.messaging"],"events":["conversation.created","message.sent","message.read"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"21a8384d-6bfd-4932-b2dd-6641d7739bcd","slug":"classifieds","name":"Classifieds","description":"Craigslist/OLX-style listings -- users post items for sale, wanted, services, or free, publicly browsable, editable only by their own poster. Pairs well with the messaging pack for buyer-seller inquiries, but works standalone.","version":"1.0.0","tags":["classifieds","marketplace","listings"],"composes":[],"requires":[],"provides":["marketplace.classifieds"],"events":["listing.created","listing.updated"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"9fe5d1b5-df28-4e95-825a-95e67bc9a4a6","slug":"payment-checkout","name":"Payment Checkout","description":"Server-trusted Stripe checkout — resolves line-item prices from the project's own price records instead of accepting client-supplied amounts.","version":"1.3.0","tags":["payments","stripe","checkout"],"composes":[],"requires":[],"provides":["payments.checkout"],"events":["payment.checkout_created","payment.completed","payment.failed","payment.captured","payment.refunded","payment.catalog_upserted"],"provider_bindings":[{"capability":"payments.checkout","providers":["stripe","paypal"],"configuration_required":true,"missing_configuration_behavior":"degraded"},{"capability":"payments.provider","providers":["stripe"],"configuration_required":true,"missing_configuration_behavior":"degraded"}],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"913c7627-0a55-4cc8-9724-6d8562d99eaf","slug":"renewal-operations","name":"Renewal Operations","description":"Provider-neutral, idempotent extension of an application record date field. Does not charge a payment provider or imply subscription billing.","version":"1.0.0","tags":["renewal","records","operations"],"composes":[],"requires":["primitive:record.renew"],"provides":["record.renewal"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"cf30cb8b-1640-4f4f-b0b2-a6cefadf41a0","slug":"quote-lifecycle","name":"Quote Lifecycle","description":"Staff-managed quote records (draft/sent/accepted/rejected/expired), distinct from the public forms.quote_request intake submission.","version":"1.2.0","tags":["crm","quotes"],"composes":[],"requires":[],"provides":["crm.quote"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"d0e860c4-fa7b-46ec-84bc-08ccd881d0d9","slug":"order-management","name":"Order Management","description":"Staff-managed application order records, independent of Stripe checkout.","version":"1.2.0","tags":["orders"],"composes":[],"requires":[],"provides":["orders.order"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"840b3f33-3fce-462d-9acc-bdd0875fd8a9","slug":"organization-records","name":"Organization Records","description":"Staff-managed company/account records, distinct from crm.customer contacts.","version":"1.1.0","tags":["crm","organizations"],"composes":[],"requires":[],"provides":["crm.organization","crm.team","crm.org_unit"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"b3f25215-2ff6-478b-87e5-3ceb6367f432","slug":"requirements-fulfillment","name":"Requirements and Fulfillment","description":"Generic subject-scoped requirements with evidence submission and explicit review, rejection, and waiver transitions.","version":"1.0.0","tags":["requirements","fulfillment","evidence"],"composes":[],"requires":["primitive:data.entity"],"provides":[],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"3192f51d-840b-4ca0-939f-7c90a5772f83","slug":"salesforce-order-sync","name":"Salesforce Order Sync","description":"Recoverable order/line-item sync to Salesforce (standard Order object, a custom object, or an Opportunity mapping) via retryable upsert-by-external-ID.","version":"1.0.0","tags":["salesforce","crm","orders"],"composes":[],"requires":[],"provides":["crm.external_order_sync"],"events":["order.synced"],"provider_bindings":[{"capability":"crm.external_sync","providers":["salesforce"],"configuration_required":true,"missing_configuration_behavior":"degraded"}],"status":"available","input_schema":{"type":"object","properties":{"external_id_field":{"type":"string","description":"External ID field on the target object used for idempotent upsert."},"target_object_type":{"type":"string","default":"Order","description":"Salesforce object to sync orders into, e.g. Order, OrderItem, or a custom object API name."}}}},{"id":"d532d242-833e-4cd5-b267-ac5a2d8858a7","slug":"billing-management","name":"Billing Management","description":"Staff-managed application invoice records. Paid is status, not a Stripe charge.","version":"1.2.0","tags":["billing","invoices"],"composes":[],"requires":[],"provides":["billing.invoice"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"8943ae46-af1e-43f3-a97b-f9a28b018ccb","slug":"support-inbox","name":"Support Inbox","description":"A ticket + threaded-message inbox with live updates via the platform realtime channel — for a real help-desk widget, distinct from a one-shot contact form.","version":"1.1.0","tags":["support","helpdesk","realtime"],"composes":[],"requires":["primitive:workflow.transition"],"provides":["support.ticket","support.inbox"],"events":["ticket.created","ticket.assigned","ticket.status_changed","message.sent"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{"notify_email":{"type":"boolean","default":true},"enable_ai_suggested_replies":{"type":"boolean","default":false,"description":"Use the livechat.message capability (if enabled for this project) to draft suggested owner replies."}}}},{"id":"14f067d8-e1da-48c4-90d1-c6da0b96037d","slug":"connections-networking","name":"Connections & Networking","description":"LinkedIn-style connect/accept/decline between two business-directory profiles. Each side owns only the row it created; a connection's status is read from whichever rows exist between the two businesses.","version":"1.0.0","tags":["networking","connections","social"],"composes":[],"requires":["feature_pack:business-directory"],"provides":["directory.connection"],"events":["connection.requested","connection.accepted","connection.declined"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"3ea76370-49f0-4b00-bad0-03126e75da20","slug":"social-feed","name":"Social Feed","description":"A professional business feed: posts, reshares, likes/saves, and comments between business-directory profiles.","version":"1.0.0","tags":["feed","posts","social"],"composes":[],"requires":["feature_pack:business-directory"],"provides":["social.post","social.reaction","social.comment"],"events":["post.created","reaction.created","comment.created"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"8baa33a1-7b48-4f88-9de9-8cb9fe6fe34e","slug":"content-recommendations","name":"Content Recommendations","description":"Upsell/cross-sell/related-item recommendations for any content entity (products, articles, ...) -- curated relations plus same-category/tag-based baseline discovery, with optional AI-assisted similarity search when the project has Cloud's AI configured.","version":"1.0.0","tags":["recommendations","discovery","ai"],"composes":[],"requires":[],"provides":[],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","required":["content_entity_key"],"properties":{"content_entity_key":{"type":"string","description":"The entity this install's recommendations target, e.g. \"product\" or the project's own article/blog entity. Must already be declared."},"content_tags_field_key":{"type":"string","description":"Optional multi_select field on content_entity_key used for tag-based baseline discovery."},"content_text_field_key":{"type":"string","description":"Optional text field on content_entity_key to embed for AI-assisted similarity search (POST .../ai/search) when the project has AI configured. Ignored otherwise."},"content_category_field_key":{"type":"string","description":"Optional select field on content_entity_key used for \"same category\" baseline discovery."}}}},{"id":"6af8d60a-c4f2-49e2-8729-331aa980d67b","slug":"case-lifecycle","name":"Case Lifecycle","description":"Staff-managed case or application files with a durable record and an enforced status graph — not a project-local tracker.","version":"1.0.0","tags":["cases","workflow","applications"],"composes":[],"requires":["primitive:workflow.transition"],"provides":["case.record","case.lifecycle"],"events":["case.created","case.status_changed","case.resolved"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"553b73ee-dbad-4b46-a3c4-81f9bcfea9ff","slug":"assignment-tracking","name":"Assignment Tracking","description":"Staff-managed assignment of any platform record (lead, case, ticket, ...) to a staff member, referenced by opaque (entity_key, record_id) -- not a per-vertical assigned_to field, and not a second workflow engine: the assignment's own status graph is enforced by the existing workflow.transition primitive.","version":"1.0.0","tags":["workflow","assignment","operations"],"composes":[],"requires":["primitive:workflow.transition"],"provides":["workflow.assignment","assignment.tracking"],"events":["assignment.created","assignment.status_changed","assignment.completed","assignment.cancelled"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"00b26768-b47b-4d3c-b179-e09981cf931a","slug":"documents-lifecycle","name":"Documents Lifecycle","description":"Member-owned structured content records (title/content/content_format/status). Plain text only in this slice -- rich text/markdown is a deliberately deferred future capability, not a limitation of the persistence model. document_id is not a file_id: binary attachments compose via the existing files.attachments capability (11D5D), never by extending this entity.","version":"1.0.0","tags":["documents","content"],"composes":[],"requires":[],"provides":["document.record","document.lifecycle"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"e92cc47e-a14e-414d-a1a8-78bd871bc4b7","slug":"customer-records","name":"Customer Records","description":"Staff-managed customer records, independent of pipeline and external CRM providers.","version":"1.0.0","tags":["crm","customers"],"composes":[],"requires":[],"provides":["crm.customer"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"0c62f0d7-5217-496e-b6dd-099465481bef","slug":"lead-lifecycle","name":"Lead Lifecycle","description":"Staff-managed sales leads with a durable record and an enforced status graph — not a HubSpot substitute or a project-local store.","version":"1.1.0","tags":["crm","leads","pipeline"],"composes":[],"requires":["primitive:workflow.transition"],"provides":["crm.lead","crm.lead_lifecycle"],"events":["lead.created","lead.status_changed","lead.won","lead.lost"],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}},{"id":"50de9a16-e3a2-4614-a712-ce5ed0583bf3","slug":"file-attachments","name":"File Attachments","description":"Subject-agnostic attachment relation: opaque file_id plus (subject_entity_key, subject_record_id). Uses data.entity and the existing platform storage authority. Default object storage is an implementation detail and is never disclosed to Codegen or generated apps as a provider, bucket, or SDK.","version":"1.0.0","tags":["files","attachments","operations"],"composes":[],"requires":[],"provides":["files.attachments","file.attachments"],"events":[],"provider_bindings":[],"status":"available","input_schema":{"type":"object","properties":{}}}],"installed":[]},"connectors":{"execution_contract":{"method":"p2hs.integrations.execute","request_type":"integration.execute","required_fields":["connection_id","action","input"],"role":"provider-specific connector dispatch; not the default for queued capabilities such as email.send"},"capabilities":{"email.send":{"id":"email.send","status":"implemented","invocable":true,"request_type":"email.send","method":"POST /api/jobs/email.send","runtime":"queued","role":"default","implemented_by":["mailgun.send_email","resend.send_email","ses.send_email"],"codegen":"Use this for generic transactional email. Runtime chooses platform email or a connected Resend/Mailgun/SES adapter. Do not call vendor action slugs. Switching the connected provider must not change generated application code. Generated apps call the installed same-origin BFF POST /api/jobs/email.send. Dashboard/capability invoke uses POST /api/projects/{project_id}/capabilities/email.send. Never construct a Core host (P2HS_BACKEND_URL, CORE_API_BASE_URL, beapipie).","surface":"invoke","boundary":"B","resolution":{"kind":"platform_or_customer","customer_override":true}},"messaging.send":{"id":"messaging.send","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/messaging.send","runtime":"integration.execute","role":"default","implemented_by":["slack.post_message"],"codegen":"Use this for generic operational/chat messages. Runtime resolves the project binding (Slack today; a future Teams connection must not change generated code). Do not emit POST /api/jobs/messaging.send. Do not call slack.post_message or api.slack.com for generic sends. slack.post_message is a provider_actions escape hatch only for Slack Block Kit, attachments, or Slack-specific API semantics. metadata is audit-only and must not carry blocks/attachments/formatting. Twilio SMS is messaging.sms.send, not messaging.send. Emit only the platform-relative public path; never a Core host.","input_schema":{"type":"object","additionalProperties":false,"required":["destination","text"],"properties":{"destination":{"type":"string","minLength":1,"description":"Logical destination (e.g. ops, user:123, support-team). Not a Slack channel/user ID (C0123 / U0123). The runtime resolver maps logical names to provider addresses; do not treat this field as a raw provider identifier.","x-p2hs":{"kind":"logical_destination","resolution":"runtime_resolver","not_provider_address":true}},"text":{"type":"string","minLength":1,"description":"Plain message body. Not mrkdwn, Block Kit, or attachments."},"thread_ref":{"type":"string","description":"Opaque thread id from a prior messaging.send result. Empty starts a new thread."},"metadata":{"type":"object","additionalProperties":true,"description":"Opaque application/audit context. MUST NOT affect provider rendering semantics. Not a side door for blocks, attachments, buttons, formatting, or provider options. Rendering extensions need a capability version or a provider escape hatch.","x-p2hs":{"kind":"audit_context","must_not_affect_provider_rendering":true,"forbidden_keys":["blocks","attachments","buttons","mrkdwn","unfurl_links","icon_emoji","channel","thread_ts"]}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["message_id","status"],"properties":{"message_id":{"type":"string"},"thread_ref":{"type":"string"},"status":{"type":"string","enum":["sent","queued","rejected"]}}},"errors":["capability_not_invocable","capability_not_bound","binding_ambiguous","connection_inactive","credentials_missing","destination_invalid","destination_unbound","text_required","provider_unavailable","provider_rejected"],"adapter_mappings":{"slack":{"provider_action":"slack.post_message","status":"runtime_adapter","fields":{"destination":"channel","text":"text","thread_ref":"thread_ts"},"unmapped_provider_fields":["blocks","attachments","unfurl_links","mrkdwn","icon_emoji"],"escape_hatch":"Use slack.post_message when the user explicitly requires Slack Block Kit or other chat.postMessage semantics. Those fields are not part of messaging.send."}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"messaging.sms.send":{"id":"messaging.sms.send","status":"implemented","invocable":true,"request_type":"integration.execute","method":"POST /api/projects/{project_id}/capabilities/messaging.sms.send","runtime":"Core resolver + Cloud integration.execute","role":"default","implemented_by":["twilio.send_sms"],"codegen":"Emit only POST /api/projects/{project_id}/capabilities/messaging.sms.send — never a Core host. Do not fold SMS into messaging.send. Sender numbers and Messaging Service SIDs belong on the Twilio connection, not in generated app code.","input_schema":{"type":"object","additionalProperties":false,"required":["destination","text"],"properties":{"destination":{"type":"string","minLength":1,"description":"E.164 recipient phone number (e.g. +14155550123). Not a Twilio Messaging Service SID, WhatsApp address, or logical alias. Sender identity is resolved from the bound connection, not this field.","x-p2hs":{"kind":"e164_recipient","normalization":"e164","not_logical_alias":true,"not_sender":true}},"text":{"type":"string","minLength":1,"description":"Plain SMS body. Not MMS media, WhatsApp templates, or Twilio Content SID payloads."},"metadata":{"type":"object","additionalProperties":true,"description":"Opaque application/audit context. MUST NOT affect provider rendering or Twilio send options. Not a side door for media_url, From, Messaging Service SID, status callbacks, or Content SID.","x-p2hs":{"kind":"audit_context","must_not_affect_provider_rendering":true,"forbidden_keys":["media_url","from","messaging_service_sid","status_callback","validity_period","smart_encoded","shorten_urls","content_sid","content_variables","twilio_sid","from_number"]}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["status"],"properties":{"message_id":{"type":"string"},"status":{"type":"string","enum":["queued","rejected"]}}},"errors":["capability_not_invocable","capability_not_bound","binding_ambiguous","connection_inactive","credentials_missing","destination_invalid","text_required","sender_unbound","provider_fields_forbidden","provider_unavailable","provider_rejected"],"adapter_mappings":{"twilio":{"provider_action":"twilio.send_sms","status":"current_path_audit","live_runtime":"integration.execute → pc-processor twilio.send_sms","fields":{"destination":"to","text":"body"},"sender":{"capability_field":null,"connection_config":["messaging_service_sid","from_phone"],"twilio_request":["MessagingServiceSid","From"]},"unmapped_provider_fields":["from","media_url","messaging_service_sid","status_callback","validity_period","smart_encoded","shorten_urls","content_sid","content_variables"],"unmapped_provider_output":["twilio_sid","sid","messaging_service_sid","from_number","from"],"escape_hatch":"Use twilio.send_sms when the user explicitly requires Twilio Messages API semantics (MMS media_url, WhatsApp, Content SID, status callbacks, Messaging Service override, From override). Those fields are not part of messaging.sms.send. Do not overload messaging.sms.send for MMS; that is a future messaging.mms.send or the Twilio escape hatch."}},"surface":"invoke","boundary":"B","resolution":{"kind":"platform_or_customer","customer_override":true}},"automation.workflow.trigger":{"id":"automation.workflow.trigger","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/automation.workflow.trigger","runtime":"integration.execute","role":"default","implemented_by":["make_com.trigger_scenario","n8n.trigger_workflow"],"codegen":"Use this for generic workflow triggers. Runtime resolves the project binding (Make or n8n). Switching the connected adapter must not change generated code. Do not emit POST /api/jobs/automation.workflow.trigger. workflow is a logical alias (e.g. lead-intake), never a Make scenario ID, n8n workflow ID, or webhook URL. make_com.trigger_scenario and n8n.trigger_workflow are provider_actions escape hatches for vendor webhook/API semantics. Public path is Dashboard/BFF only; never a Core host. Success returns only capability, status, and opaque execution_ref.","input_schema":{"type":"object","additionalProperties":false,"required":["workflow","input"],"properties":{"workflow":{"type":"string","minLength":1,"pattern":"^[a-z][a-z0-9-]{0,62}$","description":"Logical workflow name (e.g. lead-intake). Not a Make scenario ID, n8n workflow ID, Zapier zap ID, or webhook URL. Runtime binding resolves this name to a project connection.","x-p2hs":{"kind":"logical_workflow","resolution":"runtime_resolver","not_provider_id":true}},"input":{"type":"object","additionalProperties":true,"description":"JSON object posted as the workflow payload. Not Make scenario variables, n8n execution options, or a webhook URL."},"metadata":{"type":"object","additionalProperties":true,"description":"Opaque application/audit context. MUST NOT select the provider workflow or alter Make/n8n/Zapier execution semantics.","x-p2hs":{"kind":"audit_context","must_not_affect_provider_execution":true,"forbidden_keys":["scenario_id","workflow_id","webhook_url","hook_url","zap_id","make_scenario_id","n8n_workflow_id"]}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["capability","status"],"properties":{"capability":{"type":"string","const":"automation.workflow.trigger"},"status":{"type":"string","enum":["queued","rejected"]},"execution_ref":{"type":"string","description":"Opaque platform reference for the queued job. Not a Make scenario ID, n8n execution ID, webhook URL, or provider operation URL.","x-p2hs":{"kind":"opaque_execution_ref","not_provider_id":true}},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["capability_not_invocable","capability_not_bound","binding_ambiguous","workflow_invalid","workflow_unbound","input_required","provider_fields_forbidden","connection_inactive","credentials_missing","provider_unavailable","provider_rejected"],"adapter_mappings":{"make_com":{"provider_action":"make_com.trigger_scenario","status":"runtime_adapter","cloud_handler":"make_com.trigger_scenario","fields":{"input":"payload"},"workflow":{"capability_field":"workflow","connection_config":["workflow"],"provider_address":"webhook_url"},"unmapped_provider_fields":["webhook_url","scenario_id","api_base_url"],"escape_hatch":"Use make_com.trigger_scenario for Make-specific scenario variables, API-run-by-id, or webhook URL semantics."},"n8n":{"provider_action":"n8n.trigger_workflow","status":"runtime_adapter","cloud_handler":"n8n.trigger_workflow","fields":{"input":"payload"},"workflow":{"capability_field":"workflow","connection_config":["workflow"],"provider_address":"webhook_url"},"unmapped_provider_fields":["webhook_url","workflow_id","instance_base_url"],"escape_hatch":"Use n8n.trigger_workflow for n8n-specific execution semantics, REST execute-by-id, or webhook URL semantics."}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"document.create":{"id":"document.create","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/document.create","runtime":"integration.execute","role":"default","implemented_by":["google_docs.create_document"],"codegen":"Use document.* for generic document work. Emit POST /api/projects/{project_id}/capabilities/<verb> on the public Dashboard/BFF path. Never invent POST /api/jobs/document.* . Never construct a Core host. document is a logical alias, not a Google document_id. Do not put Google document IDs, revision IDs, Docs API method names, or Drive paths in generated application code. google_docs.insert_text is a provider_actions escape hatch for a numeric Google Docs index. google_docs.replace_all_text is an escape hatch for match_case. Other google_docs.* actions are escape hatches for explicit Google Docs API semantics. Switching the connected Docs adapter must not change generated application code. document.create does not persist a binding to a logical alias. Do not assume document.create { title: \"Proposal\" } makes document.append_text { document: \"proposal\" } work. Subsequent get/insert/append/replace require an already-bound logical document. Create-binding is deferred; do not invent a binding write.","input_schema":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","description":"Optional document title. Provider document IDs stay on the binding."},"metadata":{"type":"object","additionalProperties":true,"description":"Opaque application/audit context. MUST NOT select the Google document or carry Docs API fields.","x-p2hs":{"kind":"audit_context","must_not_affect_provider_execution":true,"forbidden_keys":["document_id","revision_id","google_document_id","docs_document_id","index","match_case","requests","batchUpdate","documents.batchUpdate","documents.get","drive.files"]}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["capability","status"],"properties":{"capability":{"type":"string"},"status":{"type":"string","enum":["queued","rejected","succeeded"]},"document":{"type":"object","additionalProperties":false,"description":"Normalized document content for document.get succeeded results. Not a Google document payload.","properties":{"title":{"type":"string"},"body_text":{"type":"string"}}},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["capability_not_invocable","capability_not_bound","binding_ambiguous","document_invalid","document_unbound","text_required","find_required","position_invalid","provider_fields_forbidden","connection_inactive","credentials_missing","permission_denied","approval_required","provider_unavailable","provider_rejected"],"adapter_mappings":{"google_docs":{"provider_action":"google_docs.create_document","status":"runtime_adapter","fields":{"title":"title"},"unmapped_provider_fields":[],"document":"created_resource_bound_later","escape_hatch":"Use google_docs.create_document only for explicit Google Docs API create semantics (provider document_id return, Drive parent)."}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"document.get":{"id":"document.get","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/document.get","runtime":"integration.execute","role":"default","implemented_by":["google_docs.get_document"],"codegen":"Use document.* for generic document work. Emit POST /api/projects/{project_id}/capabilities/<verb> on the public Dashboard/BFF path. Never invent POST /api/jobs/document.* . Never construct a Core host. document is a logical alias, not a Google document_id. Do not put Google document IDs, revision IDs, Docs API method names, or Drive paths in generated application code. google_docs.insert_text is a provider_actions escape hatch for a numeric Google Docs index. google_docs.replace_all_text is an escape hatch for match_case. Other google_docs.* actions are escape hatches for explicit Google Docs API semantics. Switching the connected Docs adapter must not change generated application code.","input_schema":{"type":"object","additionalProperties":false,"required":["document"],"properties":{"document":{"type":"string","minLength":1,"description":"Logical document alias (e.g. contract-template). Not a Google document ID, revision ID, or Drive file ID.","x-p2hs":{"kind":"logical_document","not_provider_id":true}},"metadata":{"type":"object","additionalProperties":true,"description":"Opaque application/audit context. MUST NOT select the Google document or carry Docs API fields.","x-p2hs":{"kind":"audit_context","must_not_affect_provider_execution":true,"forbidden_keys":["document_id","revision_id","google_document_id","docs_document_id","index","match_case","requests","batchUpdate","documents.batchUpdate","documents.get","drive.files"]}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["capability","status"],"properties":{"capability":{"type":"string"},"status":{"type":"string","enum":["queued","rejected","succeeded"]},"document":{"type":"object","additionalProperties":false,"description":"Normalized document content for document.get succeeded results. Not a Google document payload.","properties":{"title":{"type":"string"},"body_text":{"type":"string"}}},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["capability_not_invocable","capability_not_bound","binding_ambiguous","document_invalid","document_unbound","text_required","find_required","position_invalid","provider_fields_forbidden","connection_inactive","credentials_missing","permission_denied","approval_required","provider_unavailable","provider_rejected"],"adapter_mappings":{"google_docs":{"provider_action":"google_docs.get_document","status":"runtime_adapter","fields":{},"document":"logical_alias_to_connection_document_id","unmapped_provider_fields":["document_id"],"escape_hatch":"Use google_docs.get_document only for explicit Google document_id or revision payloads."}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"document.insert_text":{"id":"document.insert_text","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/document.insert_text","runtime":"integration.execute","role":"default","implemented_by":["google_docs.insert_text"],"codegen":"Use document.* for generic document work. Emit POST /api/projects/{project_id}/capabilities/<verb> on the public Dashboard/BFF path. Never invent POST /api/jobs/document.* . Never construct a Core host. document is a logical alias, not a Google document_id. Do not put Google document IDs, revision IDs, Docs API method names, or Drive paths in generated application code. google_docs.insert_text is a provider_actions escape hatch for a numeric Google Docs index. google_docs.replace_all_text is an escape hatch for match_case. Other google_docs.* actions are escape hatches for explicit Google Docs API semantics. Switching the connected Docs adapter must not change generated application code.","input_schema":{"type":"object","additionalProperties":false,"required":["document","text"],"properties":{"document":{"type":"string","minLength":1,"description":"Logical document alias (e.g. contract-template). Not a Google document ID, revision ID, or Drive file ID.","x-p2hs":{"kind":"logical_document","not_provider_id":true}},"text":{"type":"string","minLength":1},"position":{"type":"string","enum":["start"],"default":"start","description":"Abstract insertion point. start maps to the beginning of the document body. Numeric Google Docs indexes are not part of this contract; use google_docs.insert_text for index. Appending at the end is document.append_text.","x-p2hs":{"kind":"abstract_position","not_google_index":true,"maps_to_google_docs":{"start":1}}},"metadata":{"type":"object","additionalProperties":true,"description":"Opaque application/audit context. MUST NOT select the Google document or carry Docs API fields.","x-p2hs":{"kind":"audit_context","must_not_affect_provider_execution":true,"forbidden_keys":["document_id","revision_id","google_document_id","docs_document_id","index","match_case","requests","batchUpdate","documents.batchUpdate","documents.get","drive.files"]}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["capability","status"],"properties":{"capability":{"type":"string"},"status":{"type":"string","enum":["queued","rejected","succeeded"]},"document":{"type":"object","additionalProperties":false,"description":"Normalized document content for document.get succeeded results. Not a Google document payload.","properties":{"title":{"type":"string"},"body_text":{"type":"string"}}},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["capability_not_invocable","capability_not_bound","binding_ambiguous","document_invalid","document_unbound","text_required","find_required","position_invalid","provider_fields_forbidden","connection_inactive","credentials_missing","permission_denied","approval_required","provider_unavailable","provider_rejected"],"adapter_mappings":{"google_docs":{"provider_action":"google_docs.insert_text","status":"runtime_adapter","fields":{"text":"text","position":"index_via_abstract_start_only"},"position_map":{"start":1},"unmapped_provider_fields":["index","document_id"],"document":"logical_alias_to_connection_document_id","escape_hatch":"Use google_docs.insert_text when the caller needs a numeric Google Docs index. document.insert_text only maps position=start."}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"document.append_text":{"id":"document.append_text","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/document.append_text","runtime":"integration.execute","role":"default","implemented_by":["google_docs.append_text"],"codegen":"Use document.* for generic document work. Emit POST /api/projects/{project_id}/capabilities/<verb> on the public Dashboard/BFF path. Never invent POST /api/jobs/document.* . Never construct a Core host. document is a logical alias, not a Google document_id. Do not put Google document IDs, revision IDs, Docs API method names, or Drive paths in generated application code. google_docs.insert_text is a provider_actions escape hatch for a numeric Google Docs index. google_docs.replace_all_text is an escape hatch for match_case. Other google_docs.* actions are escape hatches for explicit Google Docs API semantics. Switching the connected Docs adapter must not change generated application code.","input_schema":{"type":"object","additionalProperties":false,"required":["document","text"],"properties":{"document":{"type":"string","minLength":1,"description":"Logical document alias (e.g. contract-template). Not a Google document ID, revision ID, or Drive file ID.","x-p2hs":{"kind":"logical_document","not_provider_id":true}},"text":{"type":"string","minLength":1},"metadata":{"type":"object","additionalProperties":true,"description":"Opaque application/audit context. MUST NOT select the Google document or carry Docs API fields.","x-p2hs":{"kind":"audit_context","must_not_affect_provider_execution":true,"forbidden_keys":["document_id","revision_id","google_document_id","docs_document_id","index","match_case","requests","batchUpdate","documents.batchUpdate","documents.get","drive.files"]}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["capability","status"],"properties":{"capability":{"type":"string"},"status":{"type":"string","enum":["queued","rejected","succeeded"]},"document":{"type":"object","additionalProperties":false,"description":"Normalized document content for document.get succeeded results. Not a Google document payload.","properties":{"title":{"type":"string"},"body_text":{"type":"string"}}},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["capability_not_invocable","capability_not_bound","binding_ambiguous","document_invalid","document_unbound","text_required","find_required","position_invalid","provider_fields_forbidden","connection_inactive","credentials_missing","permission_denied","approval_required","provider_unavailable","provider_rejected"],"adapter_mappings":{"google_docs":{"provider_action":"google_docs.append_text","status":"runtime_adapter","fields":{"text":"text"},"unmapped_provider_fields":["document_id"],"document":"logical_alias_to_connection_document_id","escape_hatch":"Use google_docs.append_text only for explicit Google Docs API append semantics."}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"document.replace_text":{"id":"document.replace_text","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/document.replace_text","runtime":"integration.execute","role":"default","implemented_by":["google_docs.replace_all_text"],"codegen":"Use document.* for generic document work. Emit POST /api/projects/{project_id}/capabilities/<verb> on the public Dashboard/BFF path. Never invent POST /api/jobs/document.* . Never construct a Core host. document is a logical alias, not a Google document_id. Do not put Google document IDs, revision IDs, Docs API method names, or Drive paths in generated application code. google_docs.insert_text is a provider_actions escape hatch for a numeric Google Docs index. google_docs.replace_all_text is an escape hatch for match_case. Other google_docs.* actions are escape hatches for explicit Google Docs API semantics. Switching the connected Docs adapter must not change generated application code.","input_schema":{"type":"object","additionalProperties":false,"required":["document","find"],"properties":{"document":{"type":"string","minLength":1,"description":"Logical document alias (e.g. contract-template). Not a Google document ID, revision ID, or Drive file ID.","x-p2hs":{"kind":"logical_document","not_provider_id":true}},"find":{"type":"string","minLength":1},"replace":{"type":"string"},"metadata":{"type":"object","additionalProperties":true,"description":"Opaque application/audit context. MUST NOT select the Google document or carry Docs API fields.","x-p2hs":{"kind":"audit_context","must_not_affect_provider_execution":true,"forbidden_keys":["document_id","revision_id","google_document_id","docs_document_id","index","match_case","requests","batchUpdate","documents.batchUpdate","documents.get","drive.files"]}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["capability","status"],"properties":{"capability":{"type":"string"},"status":{"type":"string","enum":["queued","rejected","succeeded"]},"document":{"type":"object","additionalProperties":false,"description":"Normalized document content for document.get succeeded results. Not a Google document payload.","properties":{"title":{"type":"string"},"body_text":{"type":"string"}}},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["capability_not_invocable","capability_not_bound","binding_ambiguous","document_invalid","document_unbound","text_required","find_required","position_invalid","provider_fields_forbidden","connection_inactive","credentials_missing","permission_denied","approval_required","provider_unavailable","provider_rejected"],"adapter_mappings":{"google_docs":{"provider_action":"google_docs.replace_all_text","status":"runtime_adapter","fields":{"find":"find","replace":"replace"},"unmapped_provider_fields":["match_case","document_id"],"document":"logical_alias_to_connection_document_id","escape_hatch":"Use google_docs.replace_all_text when the caller needs match_case or other Google replace-all API semantics."}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.contact.create":{"id":"crm.contact.create","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.contact.create","runtime":"integration.execute","role":"default","implemented_by":["hubspot.create_contact","salesforce.create_contact"],"codegen":"Default for generic CRM contact work. Public path is POST /api/projects/{project_id}/capabilities/crm.contact.<verb>. create = new contact; upsert = create-or-update / sync / ensure-exists by email (payload {contact:{email,first_name,last_name,phone}}); do not choose upsert merely because email is present. Search is exact email only. Get/update use CRMObjectRef {object_type,external_id} — opaque connection-scoped id, not a P2HS record id. Example contact: {email:'customer@example.com',first_name:'Jane',last_name:'Smith'}. Never emit hubspot.create_contact, salesforce.create_contact, hs_object_id, External ID, or provider_hint for generic intent. Salesforce Lead and the crm.lead App Block are not CRMContact.","input_schema":{"type":"object","properties":{"contact":{"type":"object"}},"required":["contact"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"contact":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_contact_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.create_contact"},"salesforce":{"provider_action":"salesforce.create_contact"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.contact.get":{"id":"crm.contact.get","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.contact.get","runtime":"integration.execute","role":"default","implemented_by":["hubspot.get_contact","salesforce.get_contact"],"codegen":"Default for generic CRM contact work. Public path is POST /api/projects/{project_id}/capabilities/crm.contact.<verb>. create = new contact; upsert = create-or-update / sync / ensure-exists by email (payload {contact:{email,first_name,last_name,phone}}); do not choose upsert merely because email is present. Search is exact email only. Get/update use CRMObjectRef {object_type,external_id} — opaque connection-scoped id, not a P2HS record id. Example contact: {email:'customer@example.com',first_name:'Jane',last_name:'Smith'}. Never emit hubspot.create_contact, salesforce.create_contact, hs_object_id, External ID, or provider_hint for generic intent. Salesforce Lead and the crm.lead App Block are not CRMContact.","input_schema":{"type":"object","properties":{"contact":{"type":"object"}},"required":["contact"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"contact":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_contact_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.get_contact"},"salesforce":{"provider_action":"salesforce.get_contact"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.contact.update":{"id":"crm.contact.update","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.contact.update","runtime":"integration.execute","role":"default","implemented_by":["hubspot.update_contact","salesforce.update_contact"],"codegen":"Default for generic CRM contact work. Public path is POST /api/projects/{project_id}/capabilities/crm.contact.<verb>. create = new contact; upsert = create-or-update / sync / ensure-exists by email (payload {contact:{email,first_name,last_name,phone}}); do not choose upsert merely because email is present. Search is exact email only. Get/update use CRMObjectRef {object_type,external_id} — opaque connection-scoped id, not a P2HS record id. Example contact: {email:'customer@example.com',first_name:'Jane',last_name:'Smith'}. Never emit hubspot.create_contact, salesforce.create_contact, hs_object_id, External ID, or provider_hint for generic intent. Salesforce Lead and the crm.lead App Block are not CRMContact.","input_schema":{"type":"object","properties":{"contact":{"type":"object"},"changes":{"type":"object"}},"required":["contact","changes"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"contact":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_contact_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.update_contact"},"salesforce":{"provider_action":"salesforce.update_contact"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.contact.upsert":{"id":"crm.contact.upsert","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.contact.upsert","runtime":"integration.execute","role":"default","implemented_by":["hubspot.upsert_contact","salesforce.upsert_contact"],"codegen":"Default for generic CRM contact work. Public path is POST /api/projects/{project_id}/capabilities/crm.contact.<verb>. create = new contact; upsert = create-or-update / sync / ensure-exists by email (payload {contact:{email,first_name,last_name,phone}}); do not choose upsert merely because email is present. Search is exact email only. Get/update use CRMObjectRef {object_type,external_id} — opaque connection-scoped id, not a P2HS record id. Example contact: {email:'customer@example.com',first_name:'Jane',last_name:'Smith'}. Never emit hubspot.create_contact, salesforce.create_contact, hs_object_id, External ID, or provider_hint for generic intent. Salesforce Lead and the crm.lead App Block are not CRMContact.","input_schema":{"type":"object","properties":{"contact":{"type":"object"}},"required":["contact"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"contact":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_contact_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.upsert_contact"},"salesforce":{"provider_action":"salesforce.upsert_contact"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.contact.search":{"id":"crm.contact.search","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.contact.search","runtime":"integration.execute","role":"default","implemented_by":["hubspot.search_contacts","salesforce.search_contacts"],"codegen":"Default for generic CRM contact work. Public path is POST /api/projects/{project_id}/capabilities/crm.contact.<verb>. create = new contact; upsert = create-or-update / sync / ensure-exists by email (payload {contact:{email,first_name,last_name,phone}}); do not choose upsert merely because email is present. Search is exact email only. Get/update use CRMObjectRef {object_type,external_id} — opaque connection-scoped id, not a P2HS record id. Example contact: {email:'customer@example.com',first_name:'Jane',last_name:'Smith'}. Never emit hubspot.create_contact, salesforce.create_contact, hs_object_id, External ID, or provider_hint for generic intent. Salesforce Lead and the crm.lead App Block are not CRMContact.","input_schema":{"type":"object","properties":{"email":{"type":"string"},"cursor":{"type":"string"}},"required":["email"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"contact":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_contact_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.search_contacts"},"salesforce":{"provider_action":"salesforce.search_contacts"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.company.create":{"id":"crm.company.create","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.company.create","runtime":"integration.execute","role":"default","implemented_by":["hubspot.create_company","salesforce.create_account"],"codegen":"Default for generic CRM company work. Public path is POST /api/projects/{project_id}/capabilities/crm.company.<verb>. Canonical fields: name, domain, phone. For portable HubSpot+Salesforce generation, do not require domain (Salesforce may reject it). Search is exact name only — not domain. Example: {name:'Acme Corp',phone:'555-0100'}. Never emit hubspot.create_company, salesforce.create_account, or AccountId.","input_schema":{"type":"object","properties":{"company":{"type":"object"}},"required":["company"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"company":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_company_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_field_unsupported","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.create_company"},"salesforce":{"provider_action":"salesforce.create_account"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.company.get":{"id":"crm.company.get","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.company.get","runtime":"integration.execute","role":"default","implemented_by":["hubspot.get_company","salesforce.get_account"],"codegen":"Default for generic CRM company work. Public path is POST /api/projects/{project_id}/capabilities/crm.company.<verb>. Canonical fields: name, domain, phone. For portable HubSpot+Salesforce generation, do not require domain (Salesforce may reject it). Search is exact name only — not domain. Example: {name:'Acme Corp',phone:'555-0100'}. Never emit hubspot.create_company, salesforce.create_account, or AccountId.","input_schema":{"type":"object","properties":{"company":{"type":"object"}},"required":["company"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"company":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_company_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_field_unsupported","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.get_company"},"salesforce":{"provider_action":"salesforce.get_account"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.company.update":{"id":"crm.company.update","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.company.update","runtime":"integration.execute","role":"default","implemented_by":["hubspot.update_company","salesforce.update_account"],"codegen":"Default for generic CRM company work. Public path is POST /api/projects/{project_id}/capabilities/crm.company.<verb>. Canonical fields: name, domain, phone. For portable HubSpot+Salesforce generation, do not require domain (Salesforce may reject it). Search is exact name only — not domain. Example: {name:'Acme Corp',phone:'555-0100'}. Never emit hubspot.create_company, salesforce.create_account, or AccountId.","input_schema":{"type":"object","properties":{"company":{"type":"object"},"changes":{"type":"object"}},"required":["company","changes"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"company":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_company_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_field_unsupported","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.update_company"},"salesforce":{"provider_action":"salesforce.update_account"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.company.search":{"id":"crm.company.search","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.company.search","runtime":"integration.execute","role":"default","implemented_by":["hubspot.search_companies","salesforce.search_accounts"],"codegen":"Default for generic CRM company work. Public path is POST /api/projects/{project_id}/capabilities/crm.company.<verb>. Canonical fields: name, domain, phone. For portable HubSpot+Salesforce generation, do not require domain (Salesforce may reject it). Search is exact name only — not domain. Example: {name:'Acme Corp',phone:'555-0100'}. Never emit hubspot.create_company, salesforce.create_account, or AccountId.","input_schema":{"type":"object","properties":{"name":{"type":"string"},"cursor":{"type":"string"}},"required":["name"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"company":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_company_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_field_unsupported","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.search_companies"},"salesforce":{"provider_action":"salesforce.search_accounts"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.deal.create":{"id":"crm.deal.create","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.deal.create","runtime":"integration.execute","role":"default","implemented_by":["hubspot.create_deal","salesforce.create_opportunity"],"codegen":"Default for generic CRM deal/opportunity work. Public path is POST /api/projects/{project_id}/capabilities/crm.deal.<verb>. stage is a project logical alias only — never dealstage, StageName, appointmentscheduled, closedwon, or Closed Won. Do not invent pipeline:'default'; omit pipeline unless the requirement explicitly needs it (HubSpot-only; Salesforce pipeline is rejected and is not RecordType). Search is exact name and/or stage (AND). Example: {name:'Enterprise Renewal',amount:25000,stage:'qualified'} only when qualified is a configured alias. Amount has no canonical currency.","input_schema":{"type":"object","properties":{"deal":{"type":"object"}},"required":["deal"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"deal":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_deal_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_field_unsupported","crm_pipeline_unsupported","crm_pipeline_unbound","crm_stage_unbound","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.create_deal"},"salesforce":{"provider_action":"salesforce.create_opportunity"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.deal.get":{"id":"crm.deal.get","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.deal.get","runtime":"integration.execute","role":"default","implemented_by":["hubspot.get_deal","salesforce.get_opportunity"],"codegen":"Default for generic CRM deal/opportunity work. Public path is POST /api/projects/{project_id}/capabilities/crm.deal.<verb>. stage is a project logical alias only — never dealstage, StageName, appointmentscheduled, closedwon, or Closed Won. Do not invent pipeline:'default'; omit pipeline unless the requirement explicitly needs it (HubSpot-only; Salesforce pipeline is rejected and is not RecordType). Search is exact name and/or stage (AND). Example: {name:'Enterprise Renewal',amount:25000,stage:'qualified'} only when qualified is a configured alias. Amount has no canonical currency.","input_schema":{"type":"object","properties":{"deal":{"type":"object"}},"required":["deal"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"deal":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_deal_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_field_unsupported","crm_pipeline_unsupported","crm_pipeline_unbound","crm_stage_unbound","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.get_deal"},"salesforce":{"provider_action":"salesforce.get_opportunity"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.deal.update":{"id":"crm.deal.update","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.deal.update","runtime":"integration.execute","role":"default","implemented_by":["hubspot.update_deal","salesforce.update_opportunity"],"codegen":"Default for generic CRM deal/opportunity work. Public path is POST /api/projects/{project_id}/capabilities/crm.deal.<verb>. stage is a project logical alias only — never dealstage, StageName, appointmentscheduled, closedwon, or Closed Won. Do not invent pipeline:'default'; omit pipeline unless the requirement explicitly needs it (HubSpot-only; Salesforce pipeline is rejected and is not RecordType). Search is exact name and/or stage (AND). Example: {name:'Enterprise Renewal',amount:25000,stage:'qualified'} only when qualified is a configured alias. Amount has no canonical currency.","input_schema":{"type":"object","properties":{"deal":{"type":"object"},"changes":{"type":"object"}},"required":["deal","changes"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"deal":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_deal_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_field_unsupported","crm_pipeline_unsupported","crm_pipeline_unbound","crm_stage_unbound","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.update_deal"},"salesforce":{"provider_action":"salesforce.update_opportunity"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.deal.search":{"id":"crm.deal.search","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.deal.search","runtime":"integration.execute","role":"default","implemented_by":["hubspot.search_deals","salesforce.search_opportunities"],"codegen":"Default for generic CRM deal/opportunity work. Public path is POST /api/projects/{project_id}/capabilities/crm.deal.<verb>. stage is a project logical alias only — never dealstage, StageName, appointmentscheduled, closedwon, or Closed Won. Do not invent pipeline:'default'; omit pipeline unless the requirement explicitly needs it (HubSpot-only; Salesforce pipeline is rejected and is not RecordType). Search is exact name and/or stage (AND). Example: {name:'Enterprise Renewal',amount:25000,stage:'qualified'} only when qualified is a configured alias. Amount has no canonical currency.","input_schema":{"type":"object","properties":{"name":{"type":"string"},"stage":{"type":"string"},"cursor":{"type":"string"}},"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"deal":{"type":"object"},"items":{"type":"array"},"next_cursor":{"type":"string"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_deal_not_found","crm_duplicate_match","crm_validation_failed","crm_property_invalid","crm_field_unsupported","crm_pipeline_unsupported","crm_pipeline_unbound","crm_stage_unbound","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.search_deals"},"salesforce":{"provider_action":"salesforce.search_opportunities"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"crm.association.create":{"id":"crm.association.create","status":"implemented","invocable":true,"request_type":null,"method":"POST /api/projects/{project_id}/capabilities/crm.association.create","runtime":"integration.execute","role":"default","implemented_by":["hubspot.associate_objects","salesforce.update_contact","salesforce.update_opportunity"],"codegen":"Default for generic CRM primary links. Public path is POST /api/projects/{project_id}/capabilities/crm.association.create. Supported pairs: contact→company and deal→company using CRMObjectRef {object_type,external_id}. Do not generate company→contact, company→deal, or contact↔deal. Do not emit association_type_id, AccountId, WhoId, WhatId, or OpportunityContactRole; those are provider_actions when explicitly required.","input_schema":{"type":"object","properties":{"association":{"type":"object"}},"required":["association"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"capability":{"type":"string"},"status":{"type":"string"},"association":{"type":"object"},"reason_code":{"type":"string"},"message":{"type":"string"}}},"errors":["crm_unbound","binding_ambiguous","crm_association_unsupported","crm_association_invalid","crm_relationship_conflict","crm_validation_failed","crm_permission_denied","reauthorization_required","crm_rate_limited","crm_provider_unavailable","provider_fields_forbidden","capability_not_invocable"],"adapter_mappings":{"hubspot":{"provider_action":"hubspot.associate_objects"},"salesforce":{"contact_company":"salesforce.update_contact","deal_company":"salesforce.update_opportunity"}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"payments.checkout.create":{"id":"payments.checkout.create","status":"implemented","invocable":true,"request_type":"payment.checkout.create","method":"POST /api/projects/{project_id}/capabilities/payments.checkout.create","runtime":"queued","role":"default","implemented_by":["paypal.create_order","stripe.create_checkout"],"codegen":"Use this for provider-neutral checkout. Runtime resolves the bound Stripe or PayPal connection. Do not call stripe.create_checkout or paypal.create_order. Do not send amounts from the browser; items reference trusted Cloud price records. Generated apps may keep POST /api/jobs/payment.checkout.create as a compatibility port. Dashboard invoke uses POST /api/projects/{project_id}/capabilities/payments.checkout.create. Never construct a Core host.","surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"payments.order.capture":{"id":"payments.order.capture","status":"implemented","invocable":true,"request_type":"payment.capture","method":"POST /api/projects/{project_id}/capabilities/payments.order.capture","runtime":"queued","role":"default","implemented_by":["paypal.capture_order","paypal.authorize_order","paypal.capture_authorization","stripe.capture_payment_intent"],"codegen":"Capture an authorized checkout order. Runtime resolves Stripe or PayPal. Do not call provider capture actions. Generated apps may keep POST /api/jobs/payment.capture as a compatibility port. Never a Core host.","surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"payments.refund.create":{"id":"payments.refund.create","status":"implemented","invocable":true,"request_type":"payment.refund","method":"POST /api/projects/{project_id}/capabilities/payments.refund.create","runtime":"queued","role":"default","implemented_by":["paypal.refund_capture","stripe.create_refund"],"codegen":"Refund a trusted checkout order. Runtime resolves Stripe or PayPal. Refund ceiling comes from trusted order state, not a browser amount as authority. Generated apps may keep POST /api/jobs/payment.refund. Never a Core host.","surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"payments.catalog.upsert":{"id":"payments.catalog.upsert","status":"implemented","invocable":true,"request_type":"payment.catalog.upsert","method":"POST /api/projects/{project_id}/capabilities/payments.catalog.upsert","runtime":"queued","role":"default","implemented_by":["stripe.create_product"],"codegen":"Upsert trusted product/price records. Stripe creates Product+Price; PayPal stores Cloud unit_amount only. Do not call stripe.create_product for generic catalog writes. Generated apps may keep POST /api/jobs/payment.catalog.upsert. Never a Core host.","surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"spreadsheet.rows.read":{"id":"spreadsheet.rows.read","status":"implemented","invocable":true,"request_type":"integration.execute","method":"POST /api/projects/{project_id}/capabilities/spreadsheet.rows.read","runtime":"core_resolve_cloud_execute","role":"default","implemented_by":["google_sheets.read_values"],"codegen":"Use the public host-relative BFF method with an already-bound resource alias. Execution is queued, not a provider result. Do not invent returned rows, files or resource IDs. Metadata is audit-only. Missing setup is a capability gap. Google ranges and USER_ENTERED formulas require explicit provider actions.","input_schema":{"additionalProperties":false,"properties":{"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"spreadsheet":{"pattern":"^[a-z][a-z0-9_-]{0,63}$","title":"Spreadsheet","type":"string"},"offset":{"default":0,"maximum":1000000,"minimum":0,"title":"Offset","type":"integer"},"limit":{"default":100,"maximum":1000,"minimum":1,"title":"Limit","type":"integer"}},"required":["spreadsheet"],"title":"ReadRows","type":"object"},"output_schema":{"type":"object","properties":{"capability":{"const":"spreadsheet.rows.read"},"status":{"enum":["queued","rejected"]},"reason_code":{"type":"string"}}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"spreadsheet.rows.append":{"id":"spreadsheet.rows.append","status":"implemented","invocable":true,"request_type":"integration.execute","method":"POST /api/projects/{project_id}/capabilities/spreadsheet.rows.append","runtime":"core_resolve_cloud_execute","role":"default","implemented_by":["google_sheets.append_values"],"codegen":"Use the public host-relative BFF method with an already-bound resource alias. Execution is queued, not a provider result. Do not invent returned rows, files or resource IDs. Metadata is audit-only. Missing setup is a capability gap. Google ranges and USER_ENTERED formulas require explicit provider actions.","input_schema":{"additionalProperties":false,"properties":{"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"spreadsheet":{"pattern":"^[a-z][a-z0-9_-]{0,63}$","title":"Spreadsheet","type":"string"},"rows":{"items":{"items":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"integer"},{"type":"number"}]},"maxItems":100,"minItems":1,"type":"array"},"maxItems":1000,"minItems":1,"title":"Rows","type":"array"}},"required":["spreadsheet","rows"],"title":"AppendRows","type":"object"},"output_schema":{"type":"object","properties":{"capability":{"const":"spreadsheet.rows.append"},"status":{"enum":["queued","rejected"]},"reason_code":{"type":"string"}}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"spreadsheet.rows.update":{"id":"spreadsheet.rows.update","status":"implemented","invocable":true,"request_type":"integration.execute","method":"POST /api/projects/{project_id}/capabilities/spreadsheet.rows.update","runtime":"core_resolve_cloud_execute","role":"default","implemented_by":["google_sheets.update_values"],"codegen":"Use the public host-relative BFF method with an already-bound resource alias. Execution is queued, not a provider result. Do not invent returned rows, files or resource IDs. Metadata is audit-only. Missing setup is a capability gap. Google ranges and USER_ENTERED formulas require explicit provider actions.","input_schema":{"additionalProperties":false,"properties":{"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"spreadsheet":{"pattern":"^[a-z][a-z0-9_-]{0,63}$","title":"Spreadsheet","type":"string"},"rows":{"items":{"items":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"integer"},{"type":"number"}]},"maxItems":100,"minItems":1,"type":"array"},"maxItems":1000,"minItems":1,"title":"Rows","type":"array"},"offset":{"maximum":1000000,"minimum":0,"title":"Offset","type":"integer"}},"required":["spreadsheet","rows","offset"],"title":"UpdateRows","type":"object"},"output_schema":{"type":"object","properties":{"capability":{"const":"spreadsheet.rows.update"},"status":{"enum":["queued","rejected"]},"reason_code":{"type":"string"}}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true}},"storage.file.put":{"id":"storage.file.put","status":"implemented","invocable":true,"request_type":"integration.execute","method":"POST /api/projects/{project_id}/capabilities/storage.file.put","runtime":"core_resolve_cloud_execute","role":"default","implemented_by":["amazon_s3.put_object","cloudflare_r2.put_object"],"codegen":"Use the public host-relative BFF method with an already-bound resource alias. Execution is queued, not a provider result. Do not invent returned rows, files or resource IDs. Metadata is audit-only. Missing setup is a capability gap. Google ranges and USER_ENTERED formulas require explicit provider actions.","input_schema":{"additionalProperties":false,"properties":{"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"storage":{"pattern":"^[a-z][a-z0-9_-]{0,63}$","title":"Storage","type":"string"},"key":{"maxLength":1024,"minLength":1,"title":"Key","type":"string"},"content_base64":{"maxLength":349528,"title":"Content Base64","type":"string"},"content_type":{"default":"application/octet-stream","maxLength":200,"title":"Content Type","type":"string"}},"required":["storage","key","content_base64"],"title":"PutFile","type":"object"},"output_schema":{"type":"object","properties":{"capability":{"const":"storage.file.put"},"status":{"enum":["queued","rejected"]},"reason_code":{"type":"string"}}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true},"storage_scope":"customer_connector","platform_fallback":false},"storage.file.get":{"id":"storage.file.get","status":"implemented","invocable":true,"request_type":"integration.execute","method":"POST /api/projects/{project_id}/capabilities/storage.file.get","runtime":"core_resolve_cloud_execute","role":"default","implemented_by":["amazon_s3.get_object","cloudflare_r2.get_object"],"codegen":"Use the public host-relative BFF method with an already-bound resource alias. Execution is queued, not a provider result. Do not invent returned rows, files or resource IDs. Metadata is audit-only. Missing setup is a capability gap. Google ranges and USER_ENTERED formulas require explicit provider actions.","input_schema":{"additionalProperties":false,"properties":{"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"storage":{"pattern":"^[a-z][a-z0-9_-]{0,63}$","title":"Storage","type":"string"},"key":{"maxLength":1024,"minLength":1,"title":"Key","type":"string"}},"required":["storage","key"],"title":"FileInput","type":"object"},"output_schema":{"type":"object","properties":{"capability":{"const":"storage.file.get"},"status":{"enum":["queued","rejected"]},"reason_code":{"type":"string"}}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true},"storage_scope":"customer_connector","platform_fallback":false},"storage.file.delete":{"id":"storage.file.delete","status":"implemented","invocable":true,"request_type":"integration.execute","method":"POST /api/projects/{project_id}/capabilities/storage.file.delete","runtime":"core_resolve_cloud_execute","role":"default","implemented_by":["amazon_s3.delete_object","cloudflare_r2.delete_object"],"codegen":"Use the public host-relative BFF method with an already-bound resource alias. Execution is queued, not a provider result. Do not invent returned rows, files or resource IDs. Metadata is audit-only. Missing setup is a capability gap. Google ranges and USER_ENTERED formulas require explicit provider actions.","input_schema":{"additionalProperties":false,"properties":{"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"storage":{"pattern":"^[a-z][a-z0-9_-]{0,63}$","title":"Storage","type":"string"},"key":{"maxLength":1024,"minLength":1,"title":"Key","type":"string"}},"required":["storage","key"],"title":"FileInput","type":"object"},"output_schema":{"type":"object","properties":{"capability":{"const":"storage.file.delete"},"status":{"enum":["queued","rejected"]},"reason_code":{"type":"string"}}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true},"storage_scope":"customer_connector","platform_fallback":false},"storage.file.exists":{"id":"storage.file.exists","status":"implemented","invocable":true,"request_type":"integration.execute","method":"POST /api/projects/{project_id}/capabilities/storage.file.exists","runtime":"core_resolve_cloud_execute","role":"default","implemented_by":["amazon_s3.head_object","cloudflare_r2.head_object"],"codegen":"Use the public host-relative BFF method with an already-bound resource alias. Execution is queued, not a provider result. Do not invent returned rows, files or resource IDs. Metadata is audit-only. Missing setup is a capability gap. Google ranges and USER_ENTERED formulas require explicit provider actions.","input_schema":{"additionalProperties":false,"properties":{"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"storage":{"pattern":"^[a-z][a-z0-9_-]{0,63}$","title":"Storage","type":"string"},"key":{"maxLength":1024,"minLength":1,"title":"Key","type":"string"}},"required":["storage","key"],"title":"FileInput","type":"object"},"output_schema":{"type":"object","properties":{"capability":{"const":"storage.file.exists"},"status":{"enum":["queued","rejected"]},"reason_code":{"type":"string"}}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true},"storage_scope":"customer_connector","platform_fallback":false},"storage.file.list":{"id":"storage.file.list","status":"implemented","invocable":true,"request_type":"integration.execute","method":"POST /api/projects/{project_id}/capabilities/storage.file.list","runtime":"core_resolve_cloud_execute","role":"default","implemented_by":["amazon_s3.list_objects","cloudflare_r2.list_objects"],"codegen":"Use the public host-relative BFF method with an already-bound resource alias. Execution is queued, not a provider result. Do not invent returned rows, files or resource IDs. Metadata is audit-only. Missing setup is a capability gap. Google ranges and USER_ENTERED formulas require explicit provider actions.","input_schema":{"additionalProperties":false,"properties":{"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"storage":{"pattern":"^[a-z][a-z0-9_-]{0,63}$","title":"Storage","type":"string"},"prefix":{"default":"","maxLength":1024,"title":"Prefix","type":"string"},"limit":{"default":100,"maximum":1000,"minimum":1,"title":"Limit","type":"integer"},"cursor":{"anyOf":[{"maxLength":4096,"type":"string"},{"type":"null"}],"default":null,"title":"Cursor"}},"required":["storage"],"title":"ListFiles","type":"object"},"output_schema":{"type":"object","properties":{"capability":{"const":"storage.file.list"},"status":{"enum":["queued","rejected"]},"reason_code":{"type":"string"}}},"surface":"invoke","boundary":"C","resolution":{"kind":"customer_connection","required":true},"storage_scope":"customer_connector","platform_fallback":false}},"provider_actions":{"mailgun.send_email":{"role":"escape_hatch","implements":["email.send"],"when":"Only when the user explicitly requires Mailgun API semantics (recipient-variables, Mailgun templates, tracking flags)."},"resend.send_email":{"role":"escape_hatch","implements":["email.send"],"when":"Only when the user explicitly requires Resend API semantics (tags, templates, Resend scheduled_at, batch)."},"ses.send_email":{"role":"escape_hatch","implements":["email.send"],"when":"Only when the user explicitly requires Amazon SES API semantics (configuration sets, SES-specific tags)."},"slack.post_message":{"role":"escape_hatch","implements":["messaging.send"],"when":"Only when the user explicitly requires Slack API semantics (Block Kit, attachments, mrkdwn, unfurl_links, icon_emoji)."},"twilio.send_sms":{"role":"escape_hatch","implements":["messaging.sms.send"],"when":"Only when the user explicitly requires this provider's API."},"make_com.trigger_scenario":{"role":"escape_hatch","implements":["automation.workflow.trigger"],"when":"Only when the user explicitly requires Make webhook/API semantics (scenario IDs, scenario variables, Make API run-by-id)."},"n8n.trigger_workflow":{"role":"escape_hatch","implements":["automation.workflow.trigger"],"when":"Only when the user explicitly requires n8n webhook/API semantics (workflow IDs, Header Auth details, REST execute-by-id)."},"google_docs.create_document":{"role":"escape_hatch","implements":["document.create"],"when":"Only when the user explicitly requires Google Docs API create semantics (provider document_id return, Drive parent)."},"google_docs.get_document":{"role":"escape_hatch","implements":["document.get"],"when":"Only when the user explicitly requires Google document_id or revision payloads."},"google_docs.insert_text":{"role":"escape_hatch","implements":["document.insert_text"],"when":"Only when the user explicitly requires a numeric Google Docs index."},"google_docs.append_text":{"role":"escape_hatch","implements":["document.append_text"],"when":"Only when the user explicitly requires Google Docs API append semantics."},"google_docs.replace_all_text":{"role":"escape_hatch","implements":["document.replace_text"],"when":"Only when the user explicitly requires match_case or other Google replace-all API semantics."},"hubspot.create_contact":{"role":"escape_hatch","implements":["crm.contact.create"],"when":"Only when the user explicitly requires HubSpot Contacts API semantics, not generic CRM contact create."},"salesforce.create_contact":{"role":"escape_hatch","implements":["crm.contact.create"],"when":"Only when the user explicitly requires Salesforce Contact API semantics, not generic CRM contact create."},"hubspot.get_contact":{"role":"escape_hatch","implements":["crm.contact.get"],"when":"Only when the user explicitly requires this provider's API."},"salesforce.get_contact":{"role":"escape_hatch","implements":["crm.contact.get"],"when":"Only when the user explicitly requires this provider's API."},"hubspot.update_contact":{"role":"escape_hatch","implements":["crm.contact.update"],"when":"Only when the user explicitly requires HubSpot-specific contact properties such as lifecycle stage; generic updates use crm.contact.update."},"salesforce.update_contact":{"role":"escape_hatch","implements":["crm.contact.update","crm.association.create"],"when":"Only when the user explicitly requires this provider's API."},"hubspot.upsert_contact":{"role":"escape_hatch","implements":["crm.contact.upsert"],"when":"Only when the user explicitly requires HubSpot upsert/id semantics; generic create-or-update by email is crm.contact.upsert."},"salesforce.upsert_contact":{"role":"escape_hatch","implements":["crm.contact.upsert"],"when":"Only when the user explicitly requires Salesforce External ID upsert; generic create-or-update by email is crm.contact.upsert."},"hubspot.search_contacts":{"role":"escape_hatch","implements":["crm.contact.search"],"when":"Only when the user explicitly requires HubSpot filterGroups, sorts, or complex search; generic email lookup is crm.contact.search."},"salesforce.search_contacts":{"role":"escape_hatch","implements":["crm.contact.search"],"when":"Only when the user explicitly requires Salesforce-native contact query beyond exact email."},"hubspot.create_company":{"role":"escape_hatch","implements":["crm.company.create"],"when":"Only when the user explicitly requires this provider's API."},"salesforce.create_account":{"role":"escape_hatch","implements":["crm.company.create"],"when":"Only when the user explicitly requires this provider's API."},"hubspot.get_company":{"role":"escape_hatch","implements":["crm.company.get"],"when":"Only when the user explicitly requires this provider's API."},"salesforce.get_account":{"role":"escape_hatch","implements":["crm.company.get"],"when":"Only when the user explicitly requires this provider's API."},"hubspot.update_company":{"role":"escape_hatch","implements":["crm.company.update"],"when":"Only when the user explicitly requires this provider's API."},"salesforce.update_account":{"role":"escape_hatch","implements":["crm.company.update"],"when":"Only when the user explicitly requires this provider's API."},"hubspot.search_companies":{"role":"escape_hatch","implements":["crm.company.search"],"when":"Only when the user explicitly requires this provider's API."},"salesforce.search_accounts":{"role":"escape_hatch","implements":["crm.company.search"],"when":"Only when the user explicitly requires this provider's API."},"hubspot.create_deal":{"role":"escape_hatch","implements":["crm.deal.create"],"when":"Only when the user explicitly requires this provider's API."},"salesforce.create_opportunity":{"role":"escape_hatch","implements":["crm.deal.create"],"when":"Only when the user explicitly requires Salesforce Opportunity API semantics, not generic crm.deal.create."},"hubspot.get_deal":{"role":"escape_hatch","implements":["crm.deal.get"],"when":"Only when the user explicitly requires this provider's API."},"salesforce.get_opportunity":{"role":"escape_hatch","implements":["crm.deal.get"],"when":"Only when the user explicitly requires this provider's API."},"hubspot.update_deal":{"role":"escape_hatch","implements":["crm.deal.update"],"when":"Only when the user explicitly requires this provider's API."},"salesforce.update_opportunity":{"role":"escape_hatch","implements":["crm.deal.update","crm.association.create"],"when":"Only when the user explicitly requires this provider's API."},"hubspot.search_deals":{"role":"escape_hatch","implements":["crm.deal.search"],"when":"Only when the user explicitly requires this provider's API."},"salesforce.search_opportunities":{"role":"escape_hatch","implements":["crm.deal.search"],"when":"Only when the user explicitly requires this provider's API."},"hubspot.associate_objects":{"role":"escape_hatch","implements":["crm.association.create"],"when":"Only when the user explicitly requires HubSpot association labels, association_type_id, or pairs outside contact→company and deal→company."},"paypal.create_order":{"role":"escape_hatch","implements":["payments.checkout.create"],"when":"Only when the user explicitly requires this provider's API."},"stripe.create_checkout":{"role":"escape_hatch","implements":["payments.checkout.create"],"when":"Only when the user explicitly requires this provider's API."},"paypal.capture_order":{"role":"escape_hatch","implements":["payments.order.capture"],"when":"Only when the user explicitly requires this provider's API."},"paypal.authorize_order":{"role":"escape_hatch","implements":["payments.order.capture"],"when":"Only when the user explicitly requires this provider's API."},"paypal.capture_authorization":{"role":"escape_hatch","implements":["payments.order.capture"],"when":"Only when the user explicitly requires this provider's API."},"stripe.capture_payment_intent":{"role":"escape_hatch","implements":["payments.order.capture"],"when":"Only when the user explicitly requires this provider's API."},"paypal.refund_capture":{"role":"escape_hatch","implements":["payments.refund.create"],"when":"Only when the user explicitly requires this provider's API."},"stripe.create_refund":{"role":"escape_hatch","implements":["payments.refund.create"],"when":"Only when the user explicitly requires this provider's API."},"stripe.create_product":{"role":"escape_hatch","implements":["payments.catalog.upsert"],"when":"Only when the user explicitly requires this provider's API."},"google_sheets.read_values":{"role":"escape_hatch","implements":["spreadsheet.rows.read"],"when":"Only when the user explicitly requires this provider's API."},"google_sheets.append_values":{"role":"escape_hatch","implements":["spreadsheet.rows.append"],"when":"Only when the user explicitly requires this provider's API."},"google_sheets.update_values":{"role":"escape_hatch","implements":["spreadsheet.rows.update"],"when":"Only when the user explicitly requires this provider's API."},"amazon_s3.put_object":{"role":"escape_hatch","implements":["storage.file.put"],"when":"Only when the user explicitly requires this provider's API."},"cloudflare_r2.put_object":{"role":"escape_hatch","implements":["storage.file.put"],"when":"Only when the user explicitly requires this provider's API."},"amazon_s3.get_object":{"role":"escape_hatch","implements":["storage.file.get"],"when":"Only when the user explicitly requires this provider's API."},"cloudflare_r2.get_object":{"role":"escape_hatch","implements":["storage.file.get"],"when":"Only when the user explicitly requires this provider's API."},"amazon_s3.delete_object":{"role":"escape_hatch","implements":["storage.file.delete"],"when":"Only when the user explicitly requires this provider's API."},"cloudflare_r2.delete_object":{"role":"escape_hatch","implements":["storage.file.delete"],"when":"Only when the user explicitly requires this provider's API."},"amazon_s3.head_object":{"role":"escape_hatch","implements":["storage.file.exists"],"when":"Only when the user explicitly requires this provider's API."},"cloudflare_r2.head_object":{"role":"escape_hatch","implements":["storage.file.exists"],"when":"Only when the user explicitly requires this provider's API."},"amazon_s3.list_objects":{"role":"escape_hatch","implements":["storage.file.list"],"when":"Only when the user explicitly requires this provider's API."},"cloudflare_r2.list_objects":{"role":"escape_hatch","implements":["storage.file.list"],"when":"Only when the user explicitly requires this provider's API."},"hubspot.upsert_company":{"role":"escape_hatch","implements":[],"when":"Only when the user explicitly requires HubSpot company upsert semantics."},"hubspot.upsert_deal":{"role":"escape_hatch","implements":[],"when":"Only when the user explicitly requires HubSpot deal upsert semantics."},"salesforce.query_soql":{"role":"escape_hatch","implements":[],"when":"Only when the user explicitly requires Salesforce SOQL."},"salesforce.create_lead":{"role":"escape_hatch","implements":[],"when":"Only when the user explicitly requires Salesforce Lead; it is not crm.contact."},"salesforce.create_task":{"role":"escape_hatch","implements":[],"when":"Only when the user explicitly requires Salesforce Task."},"salesforce.create_event":{"role":"escape_hatch","implements":[],"when":"Only when the user explicitly requires Salesforce Event."},"salesforce.upsert_record":{"role":"escape_hatch","implements":[],"when":"Only when the user explicitly requires Salesforce External ID / custom SObject upsert."},"salesforce.associate_record":{"role":"escape_hatch","implements":[],"when":"Only when the user explicitly requires Salesforce OpportunityContactRole or other non-canonical association semantics."}},"catalog":{"paypal":{"name":"PayPal","category":"payments","actions":["paypal.create_order","paypal.capture_order","paypal.get_order","paypal.refund"],"setup":"Connect PayPal in the dashboard before live capture. Sandbox is allowed for previews."},"twilio":{"name":"Twilio","category":"communication","actions":["twilio.send_sms"],"setup":"Connect Twilio for SMS reminders. Generic transactional email uses email.send (platform or a connected Resend/Mailgun/SES adapter), not a vendor send_email slug."},"calendly":{"name":"Calendly","category":"scheduling","actions":["calendly.list_event_types","calendly.create_scheduling_link","calendly.get_event","calendly.cancel_event"],"setup":"Optional. Prefer Cloud bookings.reserve for first-party scheduling; use Calendly when the owner already hosts availability there."},"google_calendar":{"name":"Google Calendar","category":"scheduling","actions":["google_calendar.create_event","google_calendar.update_event","google_calendar.delete_event"],"setup":"Optional calendar sync. Custom Cloud bookings remain the source of truth for reservable slots."}},"items":{}},"integrations":{},"connections":{},"realtime":{"built_in_channels":["records","jobs","auth","storage"],"custom_channels":[]},"ai":{"enabled":false,"embedding_provider":null,"available_models":[],"embed_configs":[]},"schedules":[],"knowledge_base":{"entries":[{"title":"Project Instructions","content":"\n\n# Agreed project brief\n# quote_request\n\n\nquote_request: Create a public quote request form for project inquiries. People: Staff. Built around Quote Request.\n\n## Original intent\nDisposable certification fixture: a public quote request form named quote_request with name, email, project description, and one file attachment field; staff can review submissions privately. No payments.\n\n## Domain signals\nDomain: certification\nRequested product shape: form\n\n## Product purpose\nTo allow users to submit project requests via a public form.\n\n## First build goal\nCreate a public quote request form for project inquiries.\n\n## Target audience\n- general public\n\n## Archetypes\nmarketing_site\n\n## People\n- Staff: Staff members who review submissions. Access: private.\n\n## Workflow: Quote Request Submission\nUsers submit their project details through the quote request form.\nUser fills out the quote request form → Staff reviews the submission\nOutcome: Staff receives and reviews project requests.\n\n## Core entities\n- Quote Request: A request submitted by users for project quotes. (ownership: User owns the submission until reviewed by staff.; lifecycle: submitted → under review → completed)\n\n## Forms\n- quote_request\n\n## Source requirements and discovery answers\nThese are product requirements, not platform policy. Later clarifications override earlier requests.\nDisposable certification fixture: a public quote request form named quote_request with name, email, project description, and one file attachment field; staff can review submissions privately. No payments.\n\n## Implementation autonomy\nDiscovery defined product intent, actors, workflows, core entities, consequential rules, permissions, tenancy, billing, and integrations. The validated App Block / Feature Pack composition is architecture authority. Codegen implements that composition using customer terminology in the UI and canonical platform identities at runtime. Codegen chooses screens, conventional fields, CRUD UX, navigation, and other reversible implementation details. Codegen must not invent backends, tables, APIs, or capability substitutes from the original customer prompt.\n\n## Cloud implementation plan\nUse p2hs/discovery-cloud-contract.json for the complete discovery contract. The current run's PlatformBackendCapabilities overrides this snapshot. Paths and auth policies below are resolved by Core, not generated by the model. Missing capabilities must be reported, never invented or replaced with local backends.\n\nContract SHA-256: 486b03fbfe72a6e317948609f7b7aa5c4e4896cad20470b0447664935fd3df60\n\n### Users submit their project details through the quote request form.\nUser fills out the quote request form with name, email, project description, and uploads a file. The form submission is sent to the forms.submit endpoint.\n\n- `forms.submit`: `POST /api/forms/:form_key/submissions`; auth: `public`\n\n- Acceptance: Form submission returns a success response with a submission ID.\n\n- Acceptance: Submission data is correctly stored and accessible for staff review.\n\n- Unsupported / unresolved: No direct feedback mechanism for users after submission.\n\n### Staff reviews the submission.\nStaff accesses the submissions privately to review the details through the users list and get endpoints.\n\n- `auth.users_list`: `GET /api/admin/users`; auth: `staff`\n\n- `auth.users_get`: `GET /api/admin/users/:user_id`; auth: `staff`\n\n- Acceptance: Staff can retrieve a list of submissions.\n\n- Acceptance: Staff can view details of each submission.\n\n- Unsupported / unresolved: No automated notification system for staff when a new submission is made.\n\n### Resource declarations\n\n\n### Owner setup / prerequisites\nStaff must have access to the forms.submit endpoint to review submissions.\nStaff must have access to the users list and get endpoints to view submission details."}]},"api_surface":{"auth":{"signup":{"port_id":"auth.signup","method":"POST","path":"/api/auth/signup","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string","minLength":8},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_origin":{"type":"string"},"link_path":{"type":"string"},"admin_only":{"type":"boolean"}},"required":["email","password"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"email_verified":{"type":"boolean"},"provider":{"type":"string"},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"created_at":{"type":"string"}},"required":["id","email","role","email_verified","provider","user_metadata","app_metadata","created_at"],"additionalProperties":false}},"required":["access_token","refresh_token","user"],"additionalProperties":false},"success_statuses":[201],"notes":["app_origin is auto-populated by the installed adapter from the request's Origin/Referer header (or x-p2hs-public-origin); a generated app does not need to set it, and a same-origin request never needs to."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"signin":{"port_id":"auth.signin","method":"POST","path":"/api/auth/signin","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"email_verified":{"type":"boolean"},"provider":{"type":"string"},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"created_at":{"type":"string"}},"required":["id","email","role","email_verified","provider","user_metadata","app_metadata","created_at"],"additionalProperties":false}},"required":["access_token","refresh_token","user"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"signout":{"port_id":"auth.signout","method":"POST","path":"/api/auth/signout","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"refresh_token":{"type":"string"}},"required":["refresh_token"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"refresh":{"port_id":"auth.refresh","method":"POST","path":"/api/auth/refresh","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"refresh_token":{"type":"string"}},"required":["refresh_token"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"email_verified":{"type":"boolean"},"provider":{"type":"string"},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"created_at":{"type":"string"}},"required":["id","email","role","email_verified","provider","user_metadata","app_metadata","created_at"],"additionalProperties":false}},"required":["access_token","refresh_token","user"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"session":{"port_id":"auth.session","method":"POST","path":"/api/auth/session","auth":"public","transport":"http","schema":{"request_body":{"oneOf":[{"type":"object","properties":{"grant_type":{"const":"password"},"email":{"type":"string"},"password":{"type":"string"}},"required":["grant_type","email","password"],"additionalProperties":false},{"type":"object","properties":{"grant_type":{"const":"refresh_token"},"refresh_token":{"type":"string"}},"required":["grant_type","refresh_token"],"additionalProperties":false}]},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"email_verified":{"type":"boolean"},"provider":{"type":"string"},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"created_at":{"type":"string"}},"required":["id","email","role","email_verified","provider","user_metadata","app_metadata","created_at"],"additionalProperties":false}},"required":["access_token","refresh_token","user"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"me":{"port_id":"auth.me","method":"GET","path":"/api/auth/me","auth":"session","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"email_verified":{"type":"boolean"},"provider":{"type":"string"},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"created_at":{"type":"string"}},"required":["id","email","role","email_verified","provider","user_metadata","app_metadata","created_at"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"profile":{"port_id":"auth.profile","method":"PUT","path":"/api/auth/me","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."}},"required":["user_metadata"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"email_verified":{"type":"boolean"},"provider":{"type":"string"},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"created_at":{"type":"string"}},"required":["id","email","role","email_verified","provider","user_metadata","app_metadata","created_at"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"permissions_check":{"port_id":"auth.permissions_check","method":"POST","path":"/api/auth/permissions/check","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"permission":{"type":"string"}},"required":["permission"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"allowed":{"type":"boolean"},"role":{"type":"string"},"permission":{"type":"string"}},"required":["allowed","role","permission"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"magic_link_request":{"port_id":"auth.magic_link_request","method":"POST","path":"/api/auth/magic-link/request","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"email":{"type":"string"},"app_origin":{"type":"string"},"link_path":{"type":"string"},"admin_only":{"type":"boolean"}},"required":["email"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":false},"success_statuses":[200],"notes":["app_origin is auto-populated by the installed adapter from the request's Origin/Referer header (or x-p2hs-public-origin); a generated app does not need to set it, and a same-origin request never needs to."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"magic_link_consume":{"port_id":"auth.magic_link_consume","method":"GET","path":"/api/auth/magic-link/consume","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{"token":{"type":"string"},"next":{"type":"string"}},"required":["token"],"additionalProperties":false},"response":{"type":"string","content_type":"text/html"},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"magic_link_verify":{"port_id":"auth.magic_link_verify","method":"POST","path":"/api/auth/magic-link/verify","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"email_verified":{"type":"boolean"},"provider":{"type":"string"},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"created_at":{"type":"string"}},"required":["id","email","role","email_verified","provider","user_metadata","app_metadata","created_at"],"additionalProperties":false}},"required":["access_token","refresh_token","user"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"otp_request":{"port_id":"auth.otp_request","method":"POST","path":"/api/auth/otp/request","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"email":{"type":"string"},"app_origin":{"type":"string"}},"required":["email"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":false},"success_statuses":[200],"notes":["app_origin is accepted but has no effect: OTP delivers a 6-digit code by email, never a link, so no origin is needed to build one.","app_origin is auto-populated by the installed adapter from the request's Origin/Referer header (or x-p2hs-public-origin); a generated app does not need to set it, and a same-origin request never needs to."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"otp_verify":{"port_id":"auth.otp_verify","method":"POST","path":"/api/auth/otp/verify","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"email":{"type":"string"},"code":{"type":"string"}},"required":["email","code"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"email_verified":{"type":"boolean"},"provider":{"type":"string"},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"created_at":{"type":"string"}},"required":["id","email","role","email_verified","provider","user_metadata","app_metadata","created_at"],"additionalProperties":false}},"required":["access_token","refresh_token","user"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"verify_email":{"port_id":"auth.verify_email","method":"POST","path":"/api/auth/verify-email","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"token":{"type":"string"}},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{"token":{"type":"string"}},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":false},"success_statuses":[200],"notes":["Supply token in JSON body or query string."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"invite_accept":{"port_id":"auth.invite_accept","method":"POST","path":"/api/auth/invite/accept","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"token":{"type":"string"},"password":{"type":"string","minLength":8}},"required":["token"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"email_verified":{"type":"boolean"},"provider":{"type":"string"},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"created_at":{"type":"string"}},"required":["id","email","role","email_verified","provider","user_metadata","app_metadata","created_at"],"additionalProperties":false}},"required":["access_token","refresh_token","user"],"additionalProperties":false},"success_statuses":[200],"notes":["Password required when accepting an invite for a new email user."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"password_reset_request":{"port_id":"auth.password_reset_request","method":"POST","path":"/api/auth/forgot-password","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"email":{"type":"string"},"admin_only":{"type":"boolean"},"app_origin":{"type":"string"}},"required":["email"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false},"success_statuses":[200],"notes":["The installed adapter computes reset_path itself from admin_only (true → /admin/reset-password, false → /reset-password); it never reads a reset_path or link_path field from the request, so sending either has no effect.","Always returns 200 with a generic message whether or not the email exists, to avoid account enumeration.","app_origin is auto-populated by the installed adapter from the request's Origin/Referer header (or x-p2hs-public-origin); a generated app does not need to set it, and a same-origin request never needs to."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"password_reset":{"port_id":"auth.password_reset","method":"POST","path":"/api/auth/reset-password","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"token":{"type":"string"},"password":{"type":"string","minLength":8}},"required":["token","password"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_list":{"port_id":"auth.users_list","method":"GET","path":"/api/admin/users","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{"page":{"type":"string"},"limit":{"type":"string"},"status":{"type":"string","enum":["all","active","inactive"]}},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","super_admin"]},"is_active":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_login_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name","role","is_active","created_at","last_login_at"],"additionalProperties":true}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success","data","pagination"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_create":{"port_id":"auth.users_create","method":"POST","path":"/api/admin/users","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"password":{"type":"string","minLength":8},"role":{"type":"string","enum":["member","admin"]},"is_active":{"const":true}},"required":["email"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","super_admin"]},"is_active":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_login_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name","role","is_active","created_at","last_login_at"],"additionalProperties":true}},"required":["success","data"],"additionalProperties":false},"success_statuses":[200,201],"notes":["Only super_admin may create users. Default role is admin. This is the installed BFF shape, not raw Cloud auth/users.","If email already belongs to an existing user, Cloud silently upserts instead of creating: it updates that user's role/password (and email_verified) and returns 200. A genuinely new user returns 201. Both cases return the same response shape."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_get":{"port_id":"auth.users_get","method":"GET","path":"/api/admin/users/:user_id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","super_admin"]},"is_active":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_login_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name","role","is_active","created_at","last_login_at"],"additionalProperties":true}},"required":["success","data"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"user_id":{"type":"string"}},"required":["user_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_update":{"port_id":"auth.users_update","method":"PATCH","path":"/api/admin/users/:user_id","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string","enum":["member","admin"]},"is_active":{"type":"boolean"}},"required":[],"additionalProperties":false,"minProperties":1},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","super_admin"]},"is_active":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_login_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name","role","is_active","created_at","last_login_at"],"additionalProperties":true}},"required":["success","data"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"user_id":{"type":"string"}},"required":["user_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_delete":{"port_id":"auth.users_delete","method":"DELETE","path":"/api/admin/users/:user_id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true}},"required":["success"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"user_id":{"type":"string"}},"required":["user_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_set_password":{"port_id":"auth.users_set_password","method":"PATCH","path":"/api/admin/users/:user_id/password","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"password":{"type":"string","minLength":8}},"required":["password"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true}},"required":["success"],"additionalProperties":false},"success_statuses":[200],"notes":["Only super_admin may call this, and never against another super_admin. The installed adapter implements this by re-POSTing to the same Cloud endpoint as auth.users_create with the target user's existing email; Cloud upserts the password because the email already exists. This is the installed BFF shape, not a distinct raw Cloud route."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"user_id":{"type":"string"}},"required":["user_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"mfa_totp":{"port_id":"auth.mfa_totp","method":"POST","path":"/api/auth/mfa","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"action":{"type":"string","enum":["totp_status","totp_setup","totp_enable","totp_disable"]},"code":{"type":"string"}},"required":["action"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","additionalProperties":true},"success_statuses":[200],"notes":["TOTP secrets are returned only during setup and must not be persisted by generated apps."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"passkey":{"port_id":"auth.passkey","method":"POST","path":"/api/auth/passkey","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"action":{"type":"string","enum":["registration_options","registration_verify","authentication_options","authentication_verify","list","delete"]},"credential":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"credential_id":{"type":"string"},"name":{"type":"string"}},"required":["action"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","additionalProperties":true},"success_statuses":[200],"notes":["Passkey registration and assertion ceremonies are initiated in the browser and verified by Cloud."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"mfa_totp_verify":{"port_id":"auth.mfa_totp_verify","method":"POST","path":"/api/auth/mfa/verify","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"mfa_token":{"type":"string"},"code":{"type":"string"}},"required":["mfa_token","code"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"email_verified":{"type":"boolean"},"provider":{"type":"string"},"user_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"app_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"created_at":{"type":"string"}},"required":["id","email","role","email_verified","provider","user_metadata","app_metadata","created_at"],"additionalProperties":false}},"required":["access_token","refresh_token","user"],"additionalProperties":false},"success_statuses":[200],"notes":["The MFA token is short-lived and is exchanged for the normal access and refresh token pair only after TOTP verification."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}}},"records":{"search":{"port_id":"records.search","method":"POST","path":"/api/records/search","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"query":{"type":"string"},"entity_key":{"type":"string"},"entity_keys":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"limit":{"type":"integer"}},"required":["query"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entity_key":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"updated_at":{"type":"string"},"score":{"type":"number"}},"required":["id","entity_key","title","slug","data","updated_at","score"],"additionalProperties":false}},"query":{"type":"string"},"entity_keys":{"type":"array","items":{"type":"string"}}},"required":["results","query","entity_keys"],"additionalProperties":false},"success_statuses":[200],"notes":["Search is cross-entity when entity_keys is supplied. Only indexed text-like fields plus title/slug are searched."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-search.ts"]}},"query":{"port_id":"records.query","method":"POST","path":"/api/records/:entity/query","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"where":{"$ref":"#/$defs/where"},"status":{"type":"string","enum":["active","archived","all"]},"order_by":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"type":"string","enum":["created_at","updated_at","title","slug"]},{"type":"object","properties":{"indexed_field":{"type":"string"}},"required":["indexed_field"],"additionalProperties":false}]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field","dir"],"additionalProperties":false}},"limit":{"type":"integer","minimum":1,"maximum":200},"cursor":{"type":"string"}},"required":[],"additionalProperties":false,"$defs":{"where":{"oneOf":[{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/where"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/$defs/where"},"maxItems":8}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/$defs/where"}},"required":["not"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","starts_with","between","is_null","field_exists"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},"required":["type","field","op"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"relation"},"direction":{"type":"string","enum":["from","to"]},"relation_key":{"type":"string"},"to_entity_key":{"type":"string"},"from_entity_key":{"type":"string"}},"required":["type","direction","relation_key"],"additionalProperties":false}]}}},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"data_json":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["id"],"additionalProperties":true}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["records","total","next_cursor"],"additionalProperties":false},"success_statuses":[200],"notes":["entity comes from the URL; do not include entity_key in the body. where depth maximum is 6. Records retain Cloud record envelopes; application data is in data_json."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-operations.ts"]}},"create":{"port_id":"records.create","method":"POST","path":"/api/records/:entity","auth":"staff","transport":"http","schema":{"request_body":{"anyOf":[{"type":"object","properties":{"data":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"parent_record_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data"],"additionalProperties":false},{"type":"object","additionalProperties":true,"description":"Shorthand application data; the adapter wraps it as data. Prefer the explicit data envelope."}]},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"record":{"type":"object","properties":{"id":{"type":"string"},"data_json":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["id"],"additionalProperties":true}},"required":["record"],"additionalProperties":false},"success_statuses":[200],"notes":["owner_user_id is accepted but ignored: Cloud always stamps the caller's own identity on rls_enabled/owner_managed entities for this staff-session auth path, and ignores it entirely otherwise. There is no way for the app to set another user's ownership through this route."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/records.ts"]}},"update":{"port_id":"records.update","method":"PATCH","path":"/api/records/:entity/:id","auth":"staff","transport":"http","schema":{"request_body":{"anyOf":[{"type":"object","properties":{"data":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"parent_record_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data"],"additionalProperties":false},{"type":"object","additionalProperties":true,"description":"Shorthand application data; the adapter wraps it as data. Prefer the explicit data envelope."}]},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"record":{"type":"object","properties":{"id":{"type":"string"},"data_json":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["id"],"additionalProperties":true}},"required":["record"],"additionalProperties":false},"success_statuses":[200],"notes":["owner_user_id is accepted but ignored: Cloud always stamps the caller's own identity on rls_enabled/owner_managed entities for this staff-session auth path, and ignores it entirely otherwise. There is no way for the app to set another user's ownership through this route."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"},"id":{"type":"string"}},"required":["entity","id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/records.ts"]}},"delete":{"port_id":"records.delete","method":"DELETE","path":"/api/records/:entity/:id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true}},"required":["success"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"},"id":{"type":"string"}},"required":["entity","id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/records.ts"]}},"aggregate":{"port_id":"records.aggregate","method":"POST","path":"/api/records/:entity/aggregate","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"where":{"$ref":"#/$defs/where"},"status":{"type":"string","enum":["active","archived","all"]},"group_by":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"}},"required":["type","field"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"date_bucket"},"field":{"anyOf":[{"type":"string"},{"type":"object","properties":{"indexed_date_field":{"type":"string"}},"required":["indexed_date_field"],"additionalProperties":false}]},"granularity":{"type":"string","enum":["day","month","year"]}},"required":["type","field","granularity"],"additionalProperties":false}]},"maxItems":6},"measures":{"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["count","sum","avg","min","max"]},"field":{"type":"string"},"alias":{"type":"string"}},"required":["op","alias"],"additionalProperties":false},"minItems":1,"maxItems":10},"max_groups":{"type":"integer"}},"required":["group_by","measures"],"additionalProperties":false,"$defs":{"where":{"oneOf":[{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/where"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/$defs/where"},"maxItems":8}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/$defs/where"}},"required":["not"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","starts_with","between","is_null","field_exists"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},"required":["type","field","op"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"relation"},"direction":{"type":"string","enum":["from","to"]},"relation_key":{"type":"string"},"to_entity_key":{"type":"string"},"from_entity_key":{"type":"string"}},"required":["type","direction","relation_key"],"additionalProperties":false}]}}},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."}},"query_api_version":{"const":"1"}},"required":["rows","query_api_version"],"additionalProperties":false},"success_statuses":[200],"notes":["entity comes from the URL; do not include entity_key in the body.","Only group_by[0] is evaluated; additional entries are silently ignored, not combined into a multi-level group-by."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-operations.ts"]}},"facet":{"port_id":"records.facet","method":"POST","path":"/api/records/:entity/facet","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"where":{"$ref":"#/$defs/where"},"status":{"type":"string","enum":["active","archived","all"]},"dimensions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"limit":{"type":"integer","maximum":200}},"required":["field"],"additionalProperties":false},"minItems":1,"maxItems":5}},"required":["dimensions"],"additionalProperties":false,"$defs":{"where":{"oneOf":[{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/where"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/$defs/where"},"maxItems":8}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/$defs/where"}},"required":["not"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","starts_with","between","is_null","field_exists"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},"required":["type","field","op"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"relation"},"direction":{"type":"string","enum":["from","to"]},"relation_key":{"type":"string"},"to_entity_key":{"type":"string"},"from_entity_key":{"type":"string"}},"required":["type","direction","relation_key"],"additionalProperties":false}]}}},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"facets":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"buckets":{"type":"array","items":{"type":"object","properties":{"bucket":{},"n":{"type":"number"}},"required":["bucket","n"],"additionalProperties":false}}},"required":["field","buckets"],"additionalProperties":false}},"query_api_version":{"const":"1"}},"required":["facets","query_api_version"],"additionalProperties":false},"success_statuses":[200],"notes":["entity comes from the URL; do not include entity_key in the body.","Each dimension's limit is silently capped at 200 server-side regardless of what is sent."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-operations.ts"]}},"bulk_update":{"port_id":"records.bulk_update","method":"POST","path":"/api/records/:entity/bulk-update","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"where":{"$ref":"#/$defs/where"},"ids":{"type":"array","items":{"type":"string"},"maxItems":500},"status_filter":{"type":"string","enum":["active","archived","all"]},"serialized":{"type":"boolean"},"patch":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"status":{"type":"string"}},"required":[],"additionalProperties":false}},"required":["patch"],"additionalProperties":false,"$defs":{"where":{"oneOf":[{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/where"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/$defs/where"},"maxItems":8}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/$defs/where"}},"required":["not"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","starts_with","between","is_null","field_exists"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},"required":["type","field","op"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"relation"},"direction":{"type":"string","enum":["from","to"]},"relation_key":{"type":"string"},"to_entity_key":{"type":"string"},"from_entity_key":{"type":"string"}},"required":["type","direction","relation_key"],"additionalProperties":false}]}}},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"updated":{"type":"integer"},"query_api_version":{"type":"string"}},"required":["updated"],"additionalProperties":false},"success_statuses":[200],"notes":["entity comes from the URL; do not include entity_key in the body.","Rejected with 403 when the entity is owner_managed and the caller is an app user (staff-issued service tokens are unaffected)."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-operations.ts"]}},"bulk_delete":{"port_id":"records.bulk_delete","method":"POST","path":"/api/records/:entity/bulk-delete","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"where":{"$ref":"#/$defs/where"},"ids":{"type":"array","items":{"type":"string"},"maxItems":500},"status_filter":{"type":"string","enum":["active","archived","all"]},"serialized":{"type":"boolean"},"hard":{"type":"boolean"}},"required":[],"additionalProperties":false,"$defs":{"where":{"oneOf":[{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/where"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/$defs/where"},"maxItems":8}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/$defs/where"}},"required":["not"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","starts_with","between","is_null","field_exists"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},"required":["type","field","op"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"relation"},"direction":{"type":"string","enum":["from","to"]},"relation_key":{"type":"string"},"to_entity_key":{"type":"string"},"from_entity_key":{"type":"string"}},"required":["type","direction","relation_key"],"additionalProperties":false}]}}},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"deleted":{"type":"integer"},"query_api_version":{"type":"string"}},"required":["deleted","query_api_version"],"additionalProperties":false},"success_statuses":[200],"notes":["entity comes from the URL; do not include entity_key in the body.","Rejected with 403 when the entity is owner_managed and the caller is an app user (staff-issued service tokens are unaffected).","hard:true is not supported and always returns 400; omit hard or send false."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-operations.ts"]}}},"storage":{"presign_upload":{"port_id":"storage.presign_upload","method":"POST","path":"/api/storage/:bucket/presign","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"number"}},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"file_id":{"type":"string"},"upload_url":{"type":"string"},"expires_in":{"type":"integer"}},"required":["file_id","upload_url","expires_in"],"additionalProperties":false},"success_statuses":[201],"notes":["PUT file bytes to the returned upload_url, then call storage.confirm."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"bucket":{"type":"string"}},"required":["bucket"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/storage.ts"]}},"list":{"port_id":"storage.list","method":"GET","path":"/api/storage/:bucket/files","auth":"session","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{"limit":{"type":"string"},"cursor":{"type":"string"}},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string"},"uploaded_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","filename"],"additionalProperties":true}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["files","next_cursor"],"additionalProperties":false},"success_statuses":[200],"notes":["The list row never includes entity_key, record_id or a CDN/public URL — call storage.metadata for those."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"bucket":{"type":"string"}},"required":["bucket"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/storage.ts"]}},"get":{"port_id":"storage.get","method":"GET","path":"/api/storage/:bucket/files/:fid","auth":"session","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string"},"uploaded_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","filename"],"additionalProperties":true},"success_statuses":[200],"notes":["Never includes entity_key, record_id or a CDN/public URL — call storage.metadata for those."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"bucket":{"type":"string"},"fid":{"type":"string"}},"required":["bucket","fid"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/storage.ts"]}},"delete":{"port_id":"storage.delete","method":"DELETE","path":"/api/storage/:bucket/files/:fid","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"bucket":{"type":"string"},"fid":{"type":"string"}},"required":["bucket","fid"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/storage.ts"]}},"confirm":{"port_id":"storage.confirm","method":"POST","path":"/api/storage/:bucket/files/:fid/confirm","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"file_id":{"type":"string"},"filename":{"type":"string"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"type":"number"},"bucket":{"type":"string"},"status":{"const":"active"}},"required":["file_id","filename","content_type","size_bytes","bucket","status"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"bucket":{"type":"string"},"fid":{"type":"string"}},"required":["bucket","fid"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/storage.ts"]}},"presign_download":{"port_id":"storage.presign_download","method":"POST","path":"/api/storage/:bucket/files/:fid/presign-download","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"expires_in":{"type":"number"}},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"download_url":{"type":"string"},"expires_in":{"type":"number"},"filename":{"type":"string"}},"required":["download_url","expires_in","filename"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"bucket":{"type":"string"},"fid":{"type":"string"}},"required":["bucket","fid"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/storage.ts"]}},"copy":{"port_id":"storage.copy","method":"POST","path":"/api/storage/:bucket/files/:fid/copy","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"filename":{"type":"string"},"target_bucket":{"type":"string"}},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"file_id":{"type":"string"},"bucket":{"type":"string"},"filename":{"type":"string"},"size_bytes":{"type":"number"},"cloned_from":{"type":"string"}},"required":["file_id","bucket","filename","size_bytes","cloned_from"],"additionalProperties":false},"success_statuses":[201],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"bucket":{"type":"string"},"fid":{"type":"string"}},"required":["bucket","fid"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/storage.ts"]}},"move":{"port_id":"storage.move","method":"POST","path":"/api/storage/:bucket/files/:fid/move","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"filename":{"type":"string"},"target_bucket":{"type":"string"}},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"file_id":{"type":"string"},"object_key":{"type":"string"},"bucket":{"type":"string"}},"required":["ok","file_id","object_key"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"bucket":{"type":"string"},"fid":{"type":"string"}},"required":["bucket","fid"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/storage.ts"]}},"attach":{"port_id":"storage.attach","method":"POST","path":"/api/storage/:bucket/files/:fid/attach","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"entity_key":{"type":"string"},"record_id":{"type":"string"}},"required":["entity_key","record_id"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"file_id":{"type":"string"},"entity_key":{"type":"string"},"record_id":{"type":"string"},"status":{"type":"string"}},"required":["file_id","entity_key","record_id"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"bucket":{"type":"string"},"fid":{"type":"string"}},"required":["bucket","fid"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/storage.ts"]}},"metadata":{"port_id":"storage.metadata","method":"GET","path":"/api/storage/:bucket/files/:fid/metadata","auth":"session","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"file_id":{"type":"string"},"filename":{"type":"string"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"etag":{"anyOf":[{"type":"string"},{"type":"null"}]},"uploaded":{"anyOf":[{"type":"string"},{"type":"null"}]},"r2_custom_metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"entity_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"record_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"registry_metadata":{}},"required":["file_id","filename","content_type","size_bytes","etag","uploaded","r2_custom_metadata","entity_key","record_id","registry_metadata"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"bucket":{"type":"string"},"fid":{"type":"string"}},"required":["bucket","fid"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/storage.ts"]}}},"bookings":{"list_resources":{"port_id":"bookings.list_resources","method":"GET","path":"/api/bookings/resources","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resource_key":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"duration_minutes":{"type":"number"},"buffer_minutes":{"type":"number"}},"required":["id","resource_key"],"additionalProperties":true}}},"required":["resources"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/bookings.ts"]}},"upsert_resource":{"port_id":"bookings.upsert_resource","method":"POST","path":"/api/bookings/resources","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"resource_key":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"duration_minutes":{"type":"number"},"buffer_minutes":{"type":"number"},"hours":{},"source":{"type":"string"},"connection_id":{"type":"string"},"external_id":{"type":"string"}},"required":["resource_key"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string"},"resource_key":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"duration_minutes":{"type":"number"},"buffer_minutes":{"type":"number"}},"required":["id","resource_key"],"additionalProperties":true}},"required":["resource"],"additionalProperties":false},"success_statuses":[201],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/bookings.ts"]}},"availability":{"port_id":"bookings.availability","method":"GET","path":"/api/bookings/resources/:resource_key/availability","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"resource_key":{"type":"string"},"timezone":{"type":"string"},"slots":{"type":"array","items":{"type":"object","properties":{"starts_at":{"type":"string"},"ends_at":{"type":"string"}},"required":["starts_at","ends_at"],"additionalProperties":true}}},"required":["resource_key","timezone","slots"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"resource_key":{"type":"string"}},"required":["resource_key"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/bookings.ts"]}},"reserve":{"port_id":"bookings.reserve","method":"POST","path":"/api/bookings/reserve","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"resource_key":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"confirm":{"type":"boolean"},"hold_minutes":{"type":"number"},"idempotency_key":{"type":"string"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"customer_phone":{"type":"string"},"notes":{"type":"string"},"source":{"type":"string"}},"required":["resource_key","starts_at"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"reservation":{"type":"object","properties":{"id":{"type":"string"},"resource_id":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"status":{"type":"string"}},"required":["id"],"additionalProperties":true}},"required":["reservation"],"additionalProperties":false},"success_statuses":[201],"notes":["Synchronous reservation; returns 409 if the slot is taken."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/bookings.ts"]}},"get":{"port_id":"bookings.get","method":"GET","path":"/api/bookings/:reservation_id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"reservation":{"type":"object","properties":{"id":{"type":"string"},"resource_id":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"status":{"type":"string"}},"required":["id"],"additionalProperties":true}},"required":["reservation"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"reservation_id":{"type":"string"}},"required":["reservation_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/bookings.ts"]}},"cancel":{"port_id":"bookings.cancel","method":"POST","path":"/api/bookings/:reservation_id/cancel","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"reservation":{"type":"object","properties":{"id":{"type":"string"},"resource_id":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"status":{"type":"string"}},"required":["id"],"additionalProperties":true}},"required":["reservation"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"reservation_id":{"type":"string"}},"required":["reservation_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/bookings.ts"]}}},"jobs":{"email_send":{"port_id":"jobs.email_send","method":"POST","path":"/api/jobs/email.send","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"to":{"anyOf":[{"type":"string","format":"email"},{"type":"array","items":{"type":"string","format":"email"},"minItems":1}]},"from":{"type":"string","minLength":1},"reply_to":{"anyOf":[{"type":"string","format":"email"},{"type":"array","items":{"type":"string","format":"email"},"minItems":1}]},"cc":{"anyOf":[{"type":"string","format":"email"},{"type":"array","items":{"type":"string","format":"email"},"minItems":1}]},"bcc":{"anyOf":[{"type":"string","format":"email"},{"type":"array","items":{"type":"string","format":"email"},"minItems":1}]},"subject":{"type":"string","minLength":1},"text":{"type":"string"},"html":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"tags":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}]}},"internal":{"type":"boolean"},"delivery_scope":{"type":"string","enum":["internal","connector"]},"connector_key":{"type":"string","minLength":1},"connection_id":{"type":"string","minLength":1},"action":{"type":"string","minLength":1}},"required":["subject"],"additionalProperties":false,"x-runtime-refinement":"(val, ctx) => {\n            const result = check(val);\n            const setError = () => ctx.addIssue({\n                code: ZodError_js_1.ZodIssueCode.custom,\n                ...getIssueProperties(val),\n            });\n            if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n                return result.then((data) => {\n                    if (!data) {\n                        setError();\n                        return false;\n                    }\n                    else {\n                        return true;\n                    }\n                });\n            }\n            if (!result) {\n                setError();\n                return false;\n            }\n            else {\n                return true;\n            }\n        }","anyOf":[{"required":["text"]},{"required":["html"]}]},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"form_forward":{"port_id":"jobs.form_forward","method":"POST","path":"/api/jobs/form.forward","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"target_url":{"type":"string","format":"uri"},"method":{"type":"string","enum":["GET","POST"]},"fields":{"type":"object","additionalProperties":{}}},"required":["target_url"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"webhook_dispatch":{"port_id":"jobs.webhook_dispatch","method":"POST","path":"/api/jobs/webhook.dispatch","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH"],"default":"POST"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{},"data":{},"secret":{"type":"string"}},"required":["url"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"integration_execute":{"port_id":"jobs.integration_execute","method":"POST","path":"/api/jobs/integration.execute","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"connection_id":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"input":{"type":"object","additionalProperties":{},"default":{}},"approval_token":{"type":"string","minLength":1}},"required":["connection_id","action"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"dropbox_import":{"port_id":"jobs.dropbox_import","method":"POST","path":"/api/jobs/dropbox.import","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"dropbox_url":{"type":"string","format":"uri"},"bucket_name":{"type":"string","minLength":1,"maxLength":64,"default":"dropbox-imports"},"extract_archive":{"type":"boolean","default":true},"filename_hint":{"type":"string","maxLength":255}},"required":["dropbox_url"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"storage_extract":{"port_id":"jobs.storage_extract","method":"POST","path":"/api/jobs/storage.extract","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"bucket_name":{"type":"string","minLength":1,"maxLength":64},"source_file_id":{"type":"string","minLength":1},"entry_offset":{"type":"integer","minimum":0,"default":0},"entry_limit":{"type":"integer","minimum":1,"maximum":100,"default":25},"parent_job_id":{"type":"string","minLength":1},"delete_source_after_extract":{"type":"boolean","default":false}},"required":["bucket_name","source_file_id"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"booking_reserve":{"port_id":"jobs.booking_reserve","method":"POST","path":"/api/jobs/booking.reserve","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"resource_key":{"type":"string","minLength":1,"maxLength":120},"starts_at":{"type":"string","minLength":1},"ends_at":{"type":"string","minLength":1},"membership_record_id":{"type":"string","minLength":1},"customer_email":{"type":"string","format":"email"},"customer_name":{"type":"string","maxLength":200},"customer_phone":{"type":"string","maxLength":40},"notes":{"type":"string","maxLength":2000},"hold_minutes":{"type":"integer","minimum":1,"maximum":240},"confirm":{"type":"boolean","default":true},"reminder_offsets_minutes":{"type":"array","items":{"type":"integer","minimum":1,"maximum":10080}},"reminder_channel":{"type":"string","enum":["email","sms"]},"reminder_connection_id":{"type":"string","minLength":1},"reminder_action":{"type":"string","minLength":1},"calendar_connection_id":{"type":"string","minLength":1},"calendar_action":{"type":"string","minLength":1},"calendar_event_type":{"type":"string","minLength":1}},"required":["resource_key","starts_at"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"booking_cancel":{"port_id":"jobs.booking_cancel","method":"POST","path":"/api/jobs/booking.cancel","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"reservation_id":{"type":"string","minLength":1},"reason":{"type":"string","maxLength":500}},"required":["reservation_id"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"inventory_reserve":{"port_id":"jobs.inventory_reserve","method":"POST","path":"/api/jobs/inventory.reserve","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"record_id":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"reference_type":{"type":"string","maxLength":60},"reference_id":{"type":"string","maxLength":200}},"required":["record_id","quantity"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"inventory_release":{"port_id":"jobs.inventory_release","method":"POST","path":"/api/jobs/inventory.release","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"reservation_id":{"type":"string","minLength":1},"reason":{"type":"string","maxLength":500}},"required":["reservation_id"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"inventory_commit":{"port_id":"jobs.inventory_commit","method":"POST","path":"/api/jobs/inventory.commit","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"reservation_id":{"type":"string","minLength":1}},"required":["reservation_id"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"record_renew":{"port_id":"jobs.record_renew","method":"POST","path":"/api/jobs/record.renew","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"entity_key":{"type":"string"},"record_id":{"type":"string","minLength":1},"date_field":{"type":"string"},"renewal_days":{"type":"integer","minimum":1,"maximum":3650}},"required":["entity_key","record_id","date_field","renewal_days"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"workforce_shift_assign":{"port_id":"jobs.workforce_shift_assign","method":"POST","path":"/api/jobs/workforce.shift_assign","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"worker_record_id":{"type":"string","minLength":1},"starts_at":{"type":"string","minLength":1},"ends_at":{"type":"string","minLength":1},"reference_type":{"type":"string","maxLength":60},"reference_id":{"type":"string","maxLength":200}},"required":["worker_record_id","starts_at","ends_at"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"workforce_shift_release":{"port_id":"jobs.workforce_shift_release","method":"POST","path":"/api/jobs/workforce.shift_release","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"assignment_id":{"type":"string","minLength":1},"reason":{"type":"string","maxLength":500}},"required":["assignment_id"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"reminder_send":{"port_id":"jobs.reminder_send","method":"POST","path":"/api/jobs/reminder.send","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"to":{"type":"string","minLength":1},"subject":{"type":"string","maxLength":300},"text":{"type":"string","minLength":1},"html":{"type":"string"},"connection_id":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"reservation_id":{"type":"string","minLength":1},"reminder_id":{"type":"string","minLength":1},"client_id":{"type":"string","minLength":1}},"required":["channel","to"],"additionalProperties":false,"x-runtime-refinement":"(val, ctx) => {\n            const result = check(val);\n            const setError = () => ctx.addIssue({\n                code: ZodError_js_1.ZodIssueCode.custom,\n                ...getIssueProperties(val),\n            });\n            if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n                return result.then((data) => {\n                    if (!data) {\n                        setError();\n                        return false;\n                    }\n                    else {\n                        return true;\n                    }\n                });\n            }\n            if (!result) {\n                setError();\n                return false;\n            }\n            else {\n                return true;\n            }\n        }","anyOf":[{"required":["text"]},{"required":["html"],"properties":{"html":{"minLength":1}}}]},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"reminder_schedule":{"port_id":"jobs.reminder_schedule","method":"POST","path":"/api/jobs/reminder.schedule","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"to":{"type":"string","minLength":1},"send_at":{"type":"string","minLength":1},"subject":{"type":"string","maxLength":300},"text":{"type":"string","minLength":1},"html":{"type":"string"},"connection_id":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"reservation_id":{"type":"string","minLength":1}},"required":["channel","to","send_at"],"additionalProperties":false,"x-runtime-refinement":"(val, ctx) => {\n            const result = check(val);\n            const setError = () => ctx.addIssue({\n                code: ZodError_js_1.ZodIssueCode.custom,\n                ...getIssueProperties(val),\n            });\n            if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n                return result.then((data) => {\n                    if (!data) {\n                        setError();\n                        return false;\n                    }\n                    else {\n                        return true;\n                    }\n                });\n            }\n            if (!result) {\n                setError();\n                return false;\n            }\n            else {\n                return true;\n            }\n        }","anyOf":[{"required":["text"]},{"required":["html"],"properties":{"html":{"minLength":1}}}],"allOf":[{"if":{"properties":{"channel":{"const":"sms"}},"required":["channel"]},"then":{"required":["connection_id"]}}]},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"payment_checkout_create":{"port_id":"jobs.payment_checkout_create","method":"POST","path":"/api/jobs/payment.checkout.create","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"connection_id":{"type":"string","minLength":1},"success_url":{"type":"string","format":"uri"},"cancel_url":{"type":"string","format":"uri"},"items":{"type":"array","items":{"type":"object","properties":{"price_record_id":{"type":"string","minLength":1},"quantity":{"type":"integer","minimum":1,"maximum":9999}},"required":["price_record_id"],"additionalProperties":false},"minItems":1},"customer_email":{"type":"string","format":"email"},"kind":{"type":"string","enum":["checkout","upsell","additional_purchase","balance_due"]},"capture_mode":{"type":"string","enum":["immediate","manual"]},"related_order_id":{"type":"string","minLength":1},"metadata":{"type":"object","additionalProperties":{}}},"required":["success_url","cancel_url","items"],"additionalProperties":false,"x-runtime-refinement":"(value, ctx) => {\n    const kind = value.kind ?? \"checkout\";\n    if (kind !== \"checkout\" && !value.related_order_id) {\n        ctx.addIssue({\n            code: zod_1.z.ZodIssueCode.custom,\n            message: `${kind} requires related_order_id`,\n            path: [\"related_order_id\"],\n        });\n    }\n}"},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"payment_capture":{"port_id":"jobs.payment_capture","method":"POST","path":"/api/jobs/payment.capture","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"connection_id":{"type":"string","minLength":1},"order_id":{"type":"string","minLength":1}},"required":["order_id"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"payment_refund":{"port_id":"jobs.payment_refund","method":"POST","path":"/api/jobs/payment.refund","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"connection_id":{"type":"string","minLength":1},"order_id":{"type":"string","minLength":1},"amount":{"type":"integer","minimum":1}},"required":["order_id"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"payment_catalog_upsert":{"port_id":"jobs.payment_catalog_upsert","method":"POST","path":"/api/jobs/payment.catalog.upsert","auth":"staff","transport":"queue","schema":{"request_body":{"type":"object","properties":{"payload":{"type":"object","properties":{"connection_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":2000},"sku":{"type":"string","minLength":1,"maxLength":120},"product_record_id":{"type":"string","minLength":1},"price_record_id":{"type":"string","minLength":1},"unit_amount":{"type":"integer","minimum":1},"currency":{"type":"string","minLength":3,"maxLength":3},"interval":{"type":"string","enum":["one_time","month","year"]},"active":{"type":"boolean"}},"required":["name","unit_amount","currency"],"additionalProperties":false},"idempotency_key":{"type":"string"}},"required":["payload"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"},"poll_url":{"type":"string"}},"required":["ok","job_id","status","poll_url"],"additionalProperties":false},"success_statuses":[200],"notes":["Canonical request is {payload: ...}. Supply Idempotency-Key header (or idempotency_key body field). Reuse the same key on retries. Poll the returned app URL; acceptance is not completion. Unwrapped payloads are also accepted by the adapter."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"},"Idempotency-Key":{"type":"string","minLength":1}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/project-jobs.ts","packages/shared/src/request-payloads.ts"]}},"get":{"port_id":"jobs.get","method":"GET","path":"/api/jobs/:job_id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string"},"request_type":{"type":"string"},"result_available":{"type":"boolean"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["job_id","status","request_type","result_available","error","created_at","updated_at"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"job_id":{"type":"string"}},"required":["job_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/requests.ts"]}},"result":{"port_id":"jobs.result","method":"GET","path":"/api/jobs/:job_id/result","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string"},"result":{"type":"object","additionalProperties":true,"description":"Provider/job-specific result. Consult the selected function or provider output schema."},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"artifact_ref":{"type":"string"}},"required":["job_id","status"],"additionalProperties":false},"success_statuses":[200],"notes":["409 until terminal; failed/dead_letter may return HTTP 200 with error. A terminal response is not proof of success.","The installed generic adapter treats the 409 as a failure and replaces its body with {statusCode, message}, discarding job_id/status/error.code from Cloud’s raw 409 payload. A generated app can only branch on the 409 status code while polling, never on fields inside that response body."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"job_id":{"type":"string"}},"required":["job_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/requests.ts"]}},"cancel":{"port_id":"jobs.cancel","method":"POST","path":"/api/jobs/:job_id/cancel","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"job_id":{"type":"string"},"status":{"type":"string"}},"required":["ok","job_id","status"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"job_id":{"type":"string"}},"required":["job_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/requests.ts"]}}},"forms":{"submit":{"port_id":"forms.submit","method":"POST","path":"/api/forms/:form_key/submissions","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"values":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"challenge":{"type":"string"}},"required":["values"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"status":{"const":"accepted"},"submission_id":{"type":"string"}},"required":["ok","status"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"form_key":{"type":"string"}},"required":["form_key"],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/forms.ts"]}},"file_upload":{"port_id":"forms.file_upload","method":"POST","path":"/api/forms/:form_key/files","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"field_key":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"content_base64":{"type":"string"}},"required":["field_key","filename","content_base64"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"ok":{"const":true},"file_id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"number"}},"required":["ok","file_id","filename","content_type"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"form_key":{"type":"string"}},"required":["form_key"],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/forms.ts"]}}},"inventory":{"reservations.list":{"port_id":"inventory.reservations.list","method":"GET","path":"/api/inventory/reservations","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{"status":{"type":"string","enum":["active","released"]},"inventory_record_id":{"type":"string"},"limit":{"type":"integer"},"cursor":{"type":"string"}},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"reservations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"project_id":{"type":"string"},"inventory_record_id":{"type":"string"},"quantity":{"type":"number"},"status":{"type":"string"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"reference_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","inventory_record_id","quantity","status","created_at"],"additionalProperties":true}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["reservations","next_cursor"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/inventory-reservations.ts"]}},"reservations.get":{"port_id":"inventory.reservations.get","method":"GET","path":"/api/inventory/reservations/:id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"reservation":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"project_id":{"type":"string"},"inventory_record_id":{"type":"string"},"quantity":{"type":"number"},"status":{"type":"string"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"reference_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","inventory_record_id","quantity","status","created_at"],"additionalProperties":true}},"required":["reservation"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/inventory-reservations.ts"]}}},"workforce":{"shifts.list":{"port_id":"workforce.shifts.list","method":"GET","path":"/api/workforce/shifts","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{"status":{"type":"string","enum":["assigned","cancelled"]},"worker_record_id":{"type":"string"},"starts_after":{"type":"string"},"starts_before":{"type":"string"},"limit":{"type":"integer"},"cursor":{"type":"string"}},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"shifts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"project_id":{"type":"string"},"worker_record_id":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"status":{"type":"string"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"reference_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","worker_record_id","starts_at","ends_at","status","created_at"],"additionalProperties":true}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["shifts","next_cursor"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/workforce-shifts.ts"]}},"shifts.get":{"port_id":"workforce.shifts.get","method":"GET","path":"/api/workforce/shifts/:id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"shift":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"project_id":{"type":"string"},"worker_record_id":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"status":{"type":"string"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"reference_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","worker_record_id","starts_at","ends_at","status","created_at"],"additionalProperties":true}},"required":["shift"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/workforce-shifts.ts"]}}},"ai":{"embed":{"port_id":"ai.embed","method":"POST","path":"/api/ai/embed","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"text":{"type":"string"},"id":{"type":"string"},"entity_key":{"type":"string"},"record_id":{"type":"string"},"field_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."}},"required":["text"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"id":{"type":"string"},"dimensions":{"type":"integer"}},"required":["id","dimensions"],"additionalProperties":false},"success_statuses":[200],"notes":["metadata is currently accepted but discarded server-side; it is never stored or returned."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/ai.ts"]}},"search":{"port_id":"ai.search","method":"POST","path":"/api/ai/search","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"query":{"type":"string"},"entity_key":{"type":"string"},"field_key":{"type":"string"},"top_k":{"type":"integer"}},"required":["query","entity_key","field_key"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"score":{"type":"number"},"record_id":{"type":"string"},"record":{}},"required":["score","record_id"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/ai.ts"]}},"complete":{"port_id":"ai.complete","method":"POST","path":"/api/ai/complete","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string"}},"required":["role","content"],"additionalProperties":false},"minItems":1},"context":{"type":"object","properties":{"query":{"type":"string"},"entity_key":{"type":"string"},"field_key":{"type":"string"},"top_k":{"type":"integer"},"max_context_tokens":{"type":"integer"}},"required":["query","entity_key","field_key"],"additionalProperties":false}},"required":["messages"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"content":{"type":"string"},"model":{"type":"string"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}},"required":["input_tokens","output_tokens"],"additionalProperties":false}},"required":["content","model","usage"],"additionalProperties":false},"success_statuses":[200],"notes":["context.query/entity_key/field_key are not actually enforced as required by the handler; omitting them silently yields an empty RAG context instead of a 400. Treat them as required anyway — a silently empty context is rarely what you want."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/ai.ts"]}}},"functions":{"invoke":{"port_id":"functions.invoke","method":"POST","path":"/api/fn/:slug","auth":"session","transport":"http","schema":{"request_body":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"description":"Function-specific JSON output; resolve output_schema for the selected slug in manifest.functions.system. No global field shape exists."},"success_statuses":[200],"notes":["Resolve input_schema and output_schema by slug from the function catalog. If absent, report that function-specific contract gap. Generic BFF accepts only JSON objects and JSON responses; private function policy cannot be bypassed with customer auth.","On error, only status codes in [400,401,403,404,405,409,422,429,503] pass through; any other status the function returns collapses to a generic 502, and the function's own structured error body is always replaced with {statusCode, message}."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/functions.ts"]}}},"imports":{"create":{"port_id":"imports.create","method":"POST","path":"/api/imports","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"const":"file"},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false},"destination":{"type":"object","properties":{"type":{"type":"string","enum":["records","external_table"]},"entity_key":{"type":"string"},"table":{"type":"string"},"connection_id":{"type":"string"}},"required":["type"],"additionalProperties":false},"options":{"type":"object","properties":{"mode":{"type":"string","enum":["insert","upsert"]},"delimiter":{"type":"string"},"has_header":{"type":"boolean"}},"required":[],"additionalProperties":true},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_type":{"type":"string","enum":["csv","json","sql"]}},"required":["source","destination"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"import_session_id":{"type":"string"},"status":{"type":"string"},"source_type":{"type":"string"},"destination_type":{"type":"string"}},"required":["import_session_id","status","source_type","destination_type"],"additionalProperties":false},"success_statuses":[201],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"get":{"port_id":"imports.get","method":"GET","path":"/api/imports/:session_id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"import_session_id":{"type":"string"},"status":{"type":"string"},"source_type":{"type":"string"},"destination_type":{"type":"string"},"mapping_json":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"options_json":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"preview_json":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"total_rows":{"anyOf":[{"type":"integer"},{"type":"null"}]},"processed_rows":{"type":"integer"},"succeeded_rows":{"type":"integer"},"failed_rows":{"type":"integer"},"error_count":{"type":"integer"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"recent_errors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"row_number":{"anyOf":[{"type":"integer"},{"type":"null"}]},"column_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_message":{"type":"string"},"raw_row_json":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","error_message","created_at"],"additionalProperties":false}}},"required":["import_session_id","status"],"additionalProperties":true},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"preview":{"port_id":"imports.preview","method":"POST","path":"/api/imports/:session_id/preview","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"sample_rows":{"type":"integer"}},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"oneOf":[{"type":"object","properties":{"import_session_id":{"type":"string"},"kind":{"const":"sql"},"snippet_chars":{"type":"integer"},"total_chars_est":{"type":"integer"}},"required":["import_session_id","kind","snippet_chars","total_chars_est"],"additionalProperties":false},{"type":"object","properties":{"import_session_id":{"type":"string"},"kind":{"const":"json"},"row_count_sample":{"type":"integer"},"columns":{"type":"array","items":{"type":"string"}},"sample_rows":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."}}},"required":["import_session_id","kind","row_count_sample","columns","sample_rows"],"additionalProperties":false},{"type":"object","properties":{"import_session_id":{"type":"string"},"kind":{"const":"csv"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"inferred_type":{"type":"string"},"matches_schema_field":{"type":"boolean"}},"required":["name","inferred_type","matches_schema_field"],"additionalProperties":false}},"row_count_sample":{"type":"integer"},"sample_rows":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."}},"entity_hint":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"inferred_type":{"type":"string"},"matches_schema_field":{"type":"boolean"}},"required":["name","inferred_type","matches_schema_field"],"additionalProperties":false}}},"required":["import_session_id","kind","columns","row_count_sample","sample_rows","entity_hint"],"additionalProperties":false}]},"success_statuses":[200],"notes":["The response shape depends on the session's source_type: sql returns only snippet_chars/total_chars_est; json returns columns as a plain string array; csv additionally returns entity_hint, which duplicates columns."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"map_fields":{"port_id":"imports.map_fields","method":"POST","path":"/api/imports/:session_id/map-fields","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"mapping":{"type":"object","additionalProperties":{"type":"string"}}},"required":["mapping"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"import_session_id":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}},"required":["import_session_id","mapping"],"additionalProperties":false},"success_statuses":[200],"notes":["mapping values are not validated as strings server-side despite the declared shape; send strings anyway."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"validate":{"port_id":"imports.validate","method":"POST","path":"/api/imports/:session_id/validate","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"import_session_id":{"type":"string"},"valid":{"type":"boolean"},"validated":{"type":"integer"},"error_count":{"type":"integer"},"message":{"type":"string"}},"required":["import_session_id","valid","validated","error_count"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"commit":{"port_id":"imports.commit","method":"POST","path":"/api/imports/:session_id/commit","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"validate_only":{"type":"boolean"}},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"oneOf":[{"type":"object","properties":{"import_session_id":{"type":"string"},"message":{"const":"already validated; noop"}},"required":["import_session_id","message"],"additionalProperties":false},{"type":"object","properties":{"import_session_id":{"type":"string"},"job_id":{"type":"string"},"status":{"const":"running"},"message":{"type":"string"}},"required":["import_session_id","job_id","status","message"],"additionalProperties":false}]},"success_statuses":[200,202],"notes":["validate_only:true (200) short-circuits to {import_session_id, message} with no job_id/status; omitting it or sending false starts the real commit (202) with the full shape. Requires the session to be in status ready, else 400."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"cancel":{"port_id":"imports.cancel","method":"POST","path":"/api/imports/:session_id/cancel","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"import_session_id":{"type":"string"},"status":{"const":"cancelled"}},"required":["import_session_id","status"],"additionalProperties":false},"success_statuses":[200],"notes":["Only allowed from draft/previewed/validating/ready/running; any other current status returns 400."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}}}},"bff_conventions":{"catalog_version":"3.7.0","base_path":"/api","ports":[{"port_id":"auth.signup","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/signup","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleSignup"},"bff":{"method":"POST","path":"/api/auth/signup","files":{"pages":"functions/api/auth/signup.js","nuxt":"server/api/auth/signup.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.signin","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/signin","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleSignin"},"bff":{"method":"POST","path":"/api/auth/signin","files":{"pages":"functions/api/auth/signin.js","nuxt":"server/api/auth/signin.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.signout","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/signout","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleSignout"},"bff":{"method":"POST","path":"/api/auth/signout","files":{"pages":"functions/api/auth/signout.js","nuxt":"server/api/auth/signout.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"auth.refresh","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/refresh","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleRefresh"},"bff":{"method":"POST","path":"/api/auth/refresh","files":{"pages":"functions/api/auth/refresh.js","nuxt":"server/api/auth/refresh.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.session","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/session","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleAuthSessionCreate"},"bff":{"method":"POST","path":"/api/auth/session","files":{"pages":"functions/api/auth/session.js","nuxt":"server/api/auth/session.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.me","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/auth/me","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleGetMe"},"bff":{"method":"GET","path":"/api/auth/me","files":{"pages":"functions/api/auth/me.js","nuxt":"server/api/auth/me.get.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"auth.profile","cloud":{"transport":"http","method":"PUT","path":"/v1/projects/:project_id/auth/me","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleUpdateMe"},"bff":{"method":"PUT","path":"/api/auth/me","files":{"pages":"functions/api/auth/me.js","nuxt":"server/api/auth/me.put.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"auth.permissions_check","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/permissions/check","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handlePermissionCheck"},"bff":{"method":"POST","path":"/api/auth/permissions/check","files":{"pages":"functions/api/auth/permissions/check.js","nuxt":"server/api/auth/permissions/check.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"auth.magic_link_request","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/magic-link/request","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleMagicLinkRequest"},"bff":{"method":"POST","path":"/api/auth/magic-link/request","files":{"pages":"functions/api/auth/magic-link/request.js","nuxt":"server/api/auth/magic-link/request.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.magic_link_consume","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/auth/magic-link/consume","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleMagicLinkConsume"},"bff":{"method":"GET","path":"/api/auth/magic-link/consume","files":{"pages":"functions/api/auth/magic-link/consume.js","nuxt":"server/api/auth/magic-link/consume.get.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.magic_link_verify","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/magic-link/verify","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleMagicLinkVerify"},"bff":{"method":"POST","path":"/api/auth/magic-link/verify","files":{"pages":"functions/api/auth/magic-link/verify.js","nuxt":"server/api/auth/magic-link/verify.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.otp_request","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/otp/request","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleOtpRequest"},"bff":{"method":"POST","path":"/api/auth/otp/request","files":{"pages":"functions/api/auth/otp/request.js","nuxt":"server/api/auth/otp/request.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.otp_verify","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/otp/verify","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleOtpVerify"},"bff":{"method":"POST","path":"/api/auth/otp/verify","files":{"pages":"functions/api/auth/otp/verify.js","nuxt":"server/api/auth/otp/verify.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.verify_email","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/verify-email","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleVerifyEmail"},"bff":{"method":"POST","path":"/api/auth/verify-email","files":{"pages":"functions/api/auth/verify-email.js","nuxt":"server/api/auth/verify-email.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.invite_accept","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/invite/accept","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleInviteAccept"},"bff":{"method":"POST","path":"/api/auth/invite/accept","files":{"pages":"functions/api/auth/invite/accept.js","nuxt":"server/api/auth/invite/accept.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.password_reset_request","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/password/reset-request","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handlePasswordResetRequest"},"bff":{"method":"POST","path":"/api/auth/forgot-password","files":{"pages":"functions/api/auth/forgot-password.js","nuxt":"server/api/auth/forgot-password.ts"},"adapter":"password","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.password_reset","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/password/reset","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handlePasswordReset"},"bff":{"method":"POST","path":"/api/auth/reset-password","files":{"pages":"functions/api/auth/reset-password.js","nuxt":"server/api/auth/reset-password.ts"},"adapter":"password","auth":"public"},"entitlement":"cloud"},{"port_id":"auth.users_list","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/auth/users","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleAdminRoutes"},"bff":{"method":"GET","path":"/api/admin/users","files":{"pages":"functions/api/admin/users.js","nuxt":"server/api/admin/users.ts"},"adapter":"users","auth":"staff"},"entitlement":"cloud"},{"port_id":"auth.users_create","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/users","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleAdminRoutes"},"bff":{"method":"POST","path":"/api/admin/users","files":{"pages":"functions/api/admin/users.js","nuxt":"server/api/admin/users.ts"},"adapter":"users","auth":"staff"},"entitlement":"cloud"},{"port_id":"auth.users_get","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/auth/users/:user_id","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleAdminRoutes"},"bff":{"method":"GET","path":"/api/admin/users/:user_id","files":{"pages":"functions/api/admin/users.js","nuxt":"server/api/admin/users.ts"},"adapter":"users","auth":"staff"},"entitlement":"cloud"},{"port_id":"auth.users_update","cloud":{"transport":"http","method":"PATCH","path":"/v1/projects/:project_id/auth/users/:user_id","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleAdminRoutes"},"bff":{"method":"PATCH","path":"/api/admin/users/:user_id","files":{"pages":"functions/api/admin/users.js","nuxt":"server/api/admin/users.ts"},"adapter":"users","auth":"staff"},"entitlement":"cloud"},{"port_id":"auth.users_delete","cloud":{"transport":"http","method":"DELETE","path":"/v1/projects/:project_id/auth/users/:user_id","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleAdminRoutes"},"bff":{"method":"DELETE","path":"/api/admin/users/:user_id","files":{"pages":"functions/api/admin/users.js","nuxt":"server/api/admin/users.ts"},"adapter":"users","auth":"staff"},"entitlement":"cloud"},{"port_id":"auth.users_set_password","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/users","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleAdminRoutes"},"bff":{"method":"PATCH","path":"/api/admin/users/:user_id/password","files":{"pages":"functions/api/admin/users.js","nuxt":"server/api/admin/users.ts"},"adapter":"users","auth":"staff"},"entitlement":"cloud"},{"port_id":"auth.mfa_totp","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/mfa","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleMfaRoute"},"bff":{"method":"POST","path":"/api/auth/mfa","files":{"pages":"functions/api/auth/mfa.js","nuxt":"server/api/auth/mfa.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"auth.passkey","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/passkey","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handlePasskeyRoute"},"bff":{"method":"POST","path":"/api/auth/passkey","files":{"pages":"functions/api/auth/passkey.js","nuxt":"server/api/auth/passkey.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"auth.mfa_totp_verify","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/auth/mfa/verify","source":"apps/pc-gateway/src/routes/auth.ts","handler":"handleTotpLoginVerify"},"bff":{"method":"POST","path":"/api/auth/mfa/verify","files":{"pages":"functions/api/auth/mfa/verify.js","nuxt":"server/api/auth/mfa/verify.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"records.search","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/search","source":"apps/pc-gateway/src/routes/record-search.ts","handler":"handleRecordSearchRoute"},"bff":{"method":"POST","path":"/api/records/search","files":{"pages":"functions/api/records/search.js","nuxt":"server/api/records/search.post.ts"},"adapter":"records","auth":"session"},"entitlement":"query_dsl_v1"},{"port_id":"records.query","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/query","source":"apps/pc-gateway/src/routes/record-operations.ts","handler":"handleProjectRecordsSection"},"bff":{"method":"POST","path":"/api/records/:entity/query","files":{"pages":"functions/api/records/[[path]].js","nuxt":"server/api/records/[...path].ts"},"adapter":"records","auth":"staff"},"entitlement":"query_dsl_v1"},{"port_id":"records.create","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/entities/:entity/records","source":"apps/pc-gateway/src/routes/records.ts","handler":"createRecordRoute"},"bff":{"method":"POST","path":"/api/records/:entity","files":{"pages":"functions/api/records/[[path]].js","nuxt":"server/api/records/[...path].ts"},"adapter":"records","auth":"staff"},"entitlement":"cloud"},{"port_id":"records.update","cloud":{"transport":"http","method":"PATCH","path":"/v1/projects/:project_id/entities/:entity/records/:id","source":"apps/pc-gateway/src/routes/records.ts","handler":"patchRecordRoute"},"bff":{"method":"PATCH","path":"/api/records/:entity/:id","files":{"pages":"functions/api/records/[[path]].js","nuxt":"server/api/records/[...path].ts"},"adapter":"records","auth":"staff"},"entitlement":"cloud"},{"port_id":"records.delete","cloud":{"transport":"http","method":"DELETE","path":"/v1/projects/:project_id/entities/:entity/records/:id","source":"apps/pc-gateway/src/routes/records.ts","handler":"deleteRecordRoute"},"bff":{"method":"DELETE","path":"/api/records/:entity/:id","files":{"pages":"functions/api/records/[[path]].js","nuxt":"server/api/records/[...path].ts"},"adapter":"records","auth":"staff"},"entitlement":"cloud"},{"port_id":"storage.presign_upload","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/storage/:bucket/presign","source":"apps/pc-gateway/src/routes/storage.ts","handler":"handlePresign"},"bff":{"method":"POST","path":"/api/storage/:bucket/presign","files":{"pages":"functions/api/storage/[bucket]/presign.js","nuxt":"server/api/storage/[bucket]/presign.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"storage.list","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/storage/:bucket/files","source":"apps/pc-gateway/src/routes/storage.ts","handler":"handleListFiles"},"bff":{"method":"GET","path":"/api/storage/:bucket/files","files":{"pages":"functions/api/storage/[bucket]/files.js","nuxt":"server/api/storage/[bucket]/files.get.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"storage.get","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/storage/:bucket/files/:fid","source":"apps/pc-gateway/src/routes/storage.ts","handler":"handleGetFile"},"bff":{"method":"GET","path":"/api/storage/:bucket/files/:fid","files":{"pages":"functions/api/storage/[bucket]/files/[fid].js","nuxt":"server/api/storage/[bucket]/files/[fid].get.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"storage.delete","cloud":{"transport":"http","method":"DELETE","path":"/v1/projects/:project_id/storage/:bucket/files/:fid","source":"apps/pc-gateway/src/routes/storage.ts","handler":"handleDeleteFile"},"bff":{"method":"DELETE","path":"/api/storage/:bucket/files/:fid","files":{"pages":"functions/api/storage/[bucket]/files/[fid].js","nuxt":"server/api/storage/[bucket]/files/[fid].delete.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"storage.confirm","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/storage/:bucket/files/:fid/confirm","source":"apps/pc-gateway/src/routes/storage.ts","handler":"handleConfirm"},"bff":{"method":"POST","path":"/api/storage/:bucket/files/:fid/confirm","files":{"pages":"functions/api/storage/[bucket]/files/[fid]/confirm.js","nuxt":"server/api/storage/[bucket]/files/[fid]/confirm.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"storage.presign_download","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/storage/:bucket/files/:fid/presign-download","source":"apps/pc-gateway/src/routes/storage.ts","handler":"handlePresignDownload"},"bff":{"method":"POST","path":"/api/storage/:bucket/files/:fid/presign-download","files":{"pages":"functions/api/storage/[bucket]/files/[fid]/presign-download.js","nuxt":"server/api/storage/[bucket]/files/[fid]/presign-download.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"storage.copy","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/storage/:bucket/files/:fid/copy","source":"apps/pc-gateway/src/routes/storage.ts","handler":"handleFileCopy"},"bff":{"method":"POST","path":"/api/storage/:bucket/files/:fid/copy","files":{"pages":"functions/api/storage/[bucket]/files/[fid]/copy.js","nuxt":"server/api/storage/[bucket]/files/[fid]/copy.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"storage.move","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/storage/:bucket/files/:fid/move","source":"apps/pc-gateway/src/routes/storage.ts","handler":"handleFileMove"},"bff":{"method":"POST","path":"/api/storage/:bucket/files/:fid/move","files":{"pages":"functions/api/storage/[bucket]/files/[fid]/move.js","nuxt":"server/api/storage/[bucket]/files/[fid]/move.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"storage.attach","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/storage/:bucket/files/:fid/attach","source":"apps/pc-gateway/src/routes/storage.ts","handler":"handleFileAttachToRecord"},"bff":{"method":"POST","path":"/api/storage/:bucket/files/:fid/attach","files":{"pages":"functions/api/storage/[bucket]/files/[fid]/attach.js","nuxt":"server/api/storage/[bucket]/files/[fid]/attach.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"storage.metadata","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/storage/:bucket/files/:fid/metadata","source":"apps/pc-gateway/src/routes/storage.ts","handler":"handleFileMetadata"},"bff":{"method":"GET","path":"/api/storage/:bucket/files/:fid/metadata","files":{"pages":"functions/api/storage/[bucket]/files/[fid]/metadata.js","nuxt":"server/api/storage/[bucket]/files/[fid]/metadata.get.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"bookings.list_resources","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/bookings/resources","source":"apps/pc-gateway/src/routes/bookings.ts","handler":"handleBookingRoutes"},"bff":{"method":"GET","path":"/api/bookings/resources","files":{"pages":"functions/api/bookings/resources.js","nuxt":"server/api/bookings/resources.get.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"bookings.upsert_resource","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/bookings/resources","source":"apps/pc-gateway/src/routes/bookings.ts","handler":"handleBookingRoutes"},"bff":{"method":"POST","path":"/api/bookings/resources","files":{"pages":"functions/api/bookings/resources.js","nuxt":"server/api/bookings/resources.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"bookings.availability","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/bookings/resources/:resource_key/availability","source":"apps/pc-gateway/src/routes/bookings.ts","handler":"handleBookingRoutes"},"bff":{"method":"GET","path":"/api/bookings/resources/:resource_key/availability","files":{"pages":"functions/api/bookings/resources/[resource_key]/availability.js","nuxt":"server/api/bookings/resources/[resource_key]/availability.get.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"bookings.reserve","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/bookings/reserve","source":"apps/pc-gateway/src/routes/bookings.ts","handler":"handleBookingRoutes"},"bff":{"method":"POST","path":"/api/bookings/reserve","files":{"pages":"functions/api/bookings/reserve.js","nuxt":"server/api/bookings/reserve.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"bookings.get","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/bookings/:reservation_id","source":"apps/pc-gateway/src/routes/bookings.ts","handler":"handleBookingRoutes"},"bff":{"method":"GET","path":"/api/bookings/:reservation_id","files":{"pages":"functions/api/bookings/[reservation_id].js","nuxt":"server/api/bookings/[reservation_id].get.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"bookings.cancel","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/bookings/:reservation_id/cancel","source":"apps/pc-gateway/src/routes/bookings.ts","handler":"handleBookingRoutes"},"bff":{"method":"POST","path":"/api/bookings/:reservation_id/cancel","files":{"pages":"functions/api/bookings/[reservation_id]/cancel.js","nuxt":"server/api/bookings/[reservation_id]/cancel.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.email_send","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"email.send"},"bff":{"method":"POST","path":"/api/jobs/email.send","files":{"pages":"functions/api/jobs/email.send.js","nuxt":"server/api/jobs/email.send.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"forms.submit","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/forms/:form_key/submissions","source":"apps/pc-gateway/src/routes/forms.ts","handler":"handleFormsRoutes"},"bff":{"method":"POST","path":"/api/forms/:form_key/submissions","files":{"pages":"functions/api/forms/[form_key]/submissions.js","nuxt":"server/api/forms/[form_key]/submissions.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"forms.file_upload","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/forms/:form_key/files","source":"apps/pc-gateway/src/routes/forms.ts","handler":"handleFormsRoutes"},"bff":{"method":"POST","path":"/api/forms/:form_key/files","files":{"pages":"functions/api/forms/[form_key]/files.js","nuxt":"server/api/forms/[form_key]/files.post.ts"},"adapter":"generic","auth":"public"},"entitlement":"cloud"},{"port_id":"jobs.form_forward","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"form.forward"},"bff":{"method":"POST","path":"/api/jobs/form.forward","files":{"pages":"functions/api/jobs/form.forward.js","nuxt":"server/api/jobs/form.forward.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.webhook_dispatch","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"webhook.dispatch"},"bff":{"method":"POST","path":"/api/jobs/webhook.dispatch","files":{"pages":"functions/api/jobs/webhook.dispatch.js","nuxt":"server/api/jobs/webhook.dispatch.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.integration_execute","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"integration.execute"},"bff":{"method":"POST","path":"/api/jobs/integration.execute","files":{"pages":"functions/api/jobs/integration.execute.js","nuxt":"server/api/jobs/integration.execute.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"integrations.execute"},{"port_id":"jobs.dropbox_import","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"dropbox.import"},"bff":{"method":"POST","path":"/api/jobs/dropbox.import","files":{"pages":"functions/api/jobs/dropbox.import.js","nuxt":"server/api/jobs/dropbox.import.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.storage_extract","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"storage.extract"},"bff":{"method":"POST","path":"/api/jobs/storage.extract","files":{"pages":"functions/api/jobs/storage.extract.js","nuxt":"server/api/jobs/storage.extract.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.booking_reserve","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"booking.reserve"},"bff":{"method":"POST","path":"/api/jobs/booking.reserve","files":{"pages":"functions/api/jobs/booking.reserve.js","nuxt":"server/api/jobs/booking.reserve.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.booking_cancel","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"booking.cancel"},"bff":{"method":"POST","path":"/api/jobs/booking.cancel","files":{"pages":"functions/api/jobs/booking.cancel.js","nuxt":"server/api/jobs/booking.cancel.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.inventory_reserve","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"inventory.reserve"},"bff":{"method":"POST","path":"/api/jobs/inventory.reserve","files":{"pages":"functions/api/jobs/inventory.reserve.js","nuxt":"server/api/jobs/inventory.reserve.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.inventory_release","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"inventory.release"},"bff":{"method":"POST","path":"/api/jobs/inventory.release","files":{"pages":"functions/api/jobs/inventory.release.js","nuxt":"server/api/jobs/inventory.release.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.inventory_commit","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"inventory.commit"},"bff":{"method":"POST","path":"/api/jobs/inventory.commit","files":{"pages":"functions/api/jobs/inventory.commit.js","nuxt":"server/api/jobs/inventory.commit.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.record_renew","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"record.renew"},"bff":{"method":"POST","path":"/api/jobs/record.renew","files":{"pages":"functions/api/jobs/record.renew.js","nuxt":"server/api/jobs/record.renew.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.workforce_shift_assign","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"workforce.shift_assign"},"bff":{"method":"POST","path":"/api/jobs/workforce.shift_assign","files":{"pages":"functions/api/jobs/workforce.shift_assign.js","nuxt":"server/api/jobs/workforce.shift_assign.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.workforce_shift_release","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"workforce.shift_release"},"bff":{"method":"POST","path":"/api/jobs/workforce.shift_release","files":{"pages":"functions/api/jobs/workforce.shift_release.js","nuxt":"server/api/jobs/workforce.shift_release.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"inventory.reservations.list","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/inventory/reservations","source":"apps/pc-gateway/src/routes/inventory-reservations.ts","handler":"handleInventoryReservationRoutes"},"bff":{"method":"GET","path":"/api/inventory/reservations","files":{"pages":"functions/api/inventory/reservations.js","nuxt":"server/api/inventory/reservations.get.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"inventory.reservations.get","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/inventory/reservations/:id","source":"apps/pc-gateway/src/routes/inventory-reservations.ts","handler":"handleInventoryReservationRoutes"},"bff":{"method":"GET","path":"/api/inventory/reservations/:id","files":{"pages":"functions/api/inventory/reservations/[id].js","nuxt":"server/api/inventory/reservations/[id].get.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"workforce.shifts.list","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/workforce/shifts","source":"apps/pc-gateway/src/routes/workforce-shifts.ts","handler":"handleWorkforceShiftRoutes"},"bff":{"method":"GET","path":"/api/workforce/shifts","files":{"pages":"functions/api/workforce/shifts.js","nuxt":"server/api/workforce/shifts.get.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"workforce.shifts.get","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/workforce/shifts/:id","source":"apps/pc-gateway/src/routes/workforce-shifts.ts","handler":"handleWorkforceShiftRoutes"},"bff":{"method":"GET","path":"/api/workforce/shifts/:id","files":{"pages":"functions/api/workforce/shifts/[id].js","nuxt":"server/api/workforce/shifts/[id].get.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.reminder_send","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"reminder.send"},"bff":{"method":"POST","path":"/api/jobs/reminder.send","files":{"pages":"functions/api/jobs/reminder.send.js","nuxt":"server/api/jobs/reminder.send.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.reminder_schedule","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"reminder.schedule"},"bff":{"method":"POST","path":"/api/jobs/reminder.schedule","files":{"pages":"functions/api/jobs/reminder.schedule.js","nuxt":"server/api/jobs/reminder.schedule.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.payment_checkout_create","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"payment.checkout.create"},"bff":{"method":"POST","path":"/api/jobs/payment.checkout.create","files":{"pages":"functions/api/jobs/payment.checkout.create.js","nuxt":"server/api/jobs/payment.checkout.create.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.payment_capture","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"payment.capture"},"bff":{"method":"POST","path":"/api/jobs/payment.capture","files":{"pages":"functions/api/jobs/payment.capture.js","nuxt":"server/api/jobs/payment.capture.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.payment_refund","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"payment.refund"},"bff":{"method":"POST","path":"/api/jobs/payment.refund","files":{"pages":"functions/api/jobs/payment.refund.js","nuxt":"server/api/jobs/payment.refund.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.payment_catalog_upsert","cloud":{"transport":"queue","method":"POST","path":"/v1/projects/:project_id/jobs","source":"apps/pc-gateway/src/routes/project-jobs.ts","handler":"createProjectJobRoute","request_type":"payment.catalog.upsert"},"bff":{"method":"POST","path":"/api/jobs/payment.catalog.upsert","files":{"pages":"functions/api/jobs/payment.catalog.upsert.js","nuxt":"server/api/jobs/payment.catalog.upsert.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.get","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/jobs/:job_id","source":"apps/pc-gateway/src/routes/requests.ts","handler":"getRequestStatus"},"bff":{"method":"GET","path":"/api/jobs/:job_id","files":{"pages":"functions/api/jobs/[job_id].js","nuxt":"server/api/jobs/[job_id].get.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.result","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/jobs/:job_id/result","source":"apps/pc-gateway/src/routes/requests.ts","handler":"getRequestResult"},"bff":{"method":"GET","path":"/api/jobs/:job_id/result","files":{"pages":"functions/api/jobs/[job_id]/result.js","nuxt":"server/api/jobs/[job_id]/result.get.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"jobs.cancel","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/jobs/:job_id/cancel","source":"apps/pc-gateway/src/routes/requests.ts","handler":"cancelRequest"},"bff":{"method":"POST","path":"/api/jobs/:job_id/cancel","files":{"pages":"functions/api/jobs/[job_id]/cancel.js","nuxt":"server/api/jobs/[job_id]/cancel.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"cloud"},{"port_id":"ai.embed","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/ai/embed","source":"apps/pc-gateway/src/routes/ai.ts","handler":"handleAiRoutes"},"bff":{"method":"POST","path":"/api/ai/embed","files":{"pages":"functions/api/ai/embed.js","nuxt":"server/api/ai/embed.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"ai"},{"port_id":"ai.search","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/ai/search","source":"apps/pc-gateway/src/routes/ai.ts","handler":"handleAiRoutes"},"bff":{"method":"POST","path":"/api/ai/search","files":{"pages":"functions/api/ai/search.js","nuxt":"server/api/ai/search.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"ai"},{"port_id":"ai.complete","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/ai/complete","source":"apps/pc-gateway/src/routes/ai.ts","handler":"handleAiRoutes"},"bff":{"method":"POST","path":"/api/ai/complete","files":{"pages":"functions/api/ai/complete.js","nuxt":"server/api/ai/complete.post.ts"},"adapter":"generic","auth":"session"},"entitlement":"ai"},{"port_id":"functions.invoke","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/fn/:slug","source":"apps/pc-gateway/src/routes/functions.ts","handler":"handleFunctionHttpTrigger"},"bff":{"method":"POST","path":"/api/fn/:slug","files":{"pages":"functions/api/fn/[slug].js","nuxt":"server/api/fn/[slug].post.ts"},"adapter":"generic","auth":"session"},"entitlement":"cloud"},{"port_id":"records.aggregate","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/aggregate","source":"apps/pc-gateway/src/routes/record-operations.ts","handler":"postRecordAggregateRoute"},"bff":{"method":"POST","path":"/api/records/:entity/aggregate","files":{"pages":"functions/api/records/[entity]/aggregate.js","nuxt":"server/api/records/[entity]/aggregate.post.ts"},"adapter":"generic","auth":"session","body_params":{"entity_key":"entity"}},"entitlement":"query_dsl_v1"},{"port_id":"records.facet","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/facet","source":"apps/pc-gateway/src/routes/record-operations.ts","handler":"postRecordFacetRoute"},"bff":{"method":"POST","path":"/api/records/:entity/facet","files":{"pages":"functions/api/records/[entity]/facet.js","nuxt":"server/api/records/[entity]/facet.post.ts"},"adapter":"generic","auth":"session","body_params":{"entity_key":"entity"}},"entitlement":"query_dsl_v1"},{"port_id":"records.bulk_update","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/bulk-update","source":"apps/pc-gateway/src/routes/record-operations.ts","handler":"postRecordBulkUpdateRoute"},"bff":{"method":"POST","path":"/api/records/:entity/bulk-update","files":{"pages":"functions/api/records/[entity]/bulk-update.js","nuxt":"server/api/records/[entity]/bulk-update.post.ts"},"adapter":"generic","auth":"session","body_params":{"entity_key":"entity"}},"entitlement":"query_dsl_v1"},{"port_id":"records.bulk_delete","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/bulk-delete","source":"apps/pc-gateway/src/routes/record-operations.ts","handler":"postRecordBulkDeleteRoute"},"bff":{"method":"POST","path":"/api/records/:entity/bulk-delete","files":{"pages":"functions/api/records/[entity]/bulk-delete.js","nuxt":"server/api/records/[entity]/bulk-delete.post.ts"},"adapter":"generic","auth":"session","body_params":{"entity_key":"entity"}},"entitlement":"query_dsl_v1"},{"port_id":"imports.create","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/imports/sessions","source":"apps/pc-gateway/src/routes/import-sessions.ts","handler":"postImportSessionCreateRoute"},"bff":{"method":"POST","path":"/api/imports","files":{"pages":"functions/api/imports.js","nuxt":"server/api/imports.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"bulk_import"},{"port_id":"imports.get","cloud":{"transport":"http","method":"GET","path":"/v1/projects/:project_id/records/imports/sessions/:session_id","source":"apps/pc-gateway/src/routes/import-sessions.ts","handler":"getImportSessionStatusRoute"},"bff":{"method":"GET","path":"/api/imports/:session_id","files":{"pages":"functions/api/imports/[session_id].js","nuxt":"server/api/imports/[session_id].get.ts"},"adapter":"generic","auth":"staff"},"entitlement":"bulk_import"},{"port_id":"imports.preview","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/imports/sessions/:session_id/preview","source":"apps/pc-gateway/src/routes/import-sessions.ts","handler":"postImportSessionPreviewRoute"},"bff":{"method":"POST","path":"/api/imports/:session_id/preview","files":{"pages":"functions/api/imports/[session_id]/preview.js","nuxt":"server/api/imports/[session_id]/preview.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"bulk_import"},{"port_id":"imports.map_fields","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/imports/sessions/:session_id/map-fields","source":"apps/pc-gateway/src/routes/import-sessions.ts","handler":"postImportSessionMapFieldsRoute"},"bff":{"method":"POST","path":"/api/imports/:session_id/map-fields","files":{"pages":"functions/api/imports/[session_id]/map-fields.js","nuxt":"server/api/imports/[session_id]/map-fields.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"bulk_import"},{"port_id":"imports.validate","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/imports/sessions/:session_id/validate","source":"apps/pc-gateway/src/routes/import-sessions.ts","handler":"postImportSessionValidateRoute"},"bff":{"method":"POST","path":"/api/imports/:session_id/validate","files":{"pages":"functions/api/imports/[session_id]/validate.js","nuxt":"server/api/imports/[session_id]/validate.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"bulk_import"},{"port_id":"imports.commit","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/imports/sessions/:session_id/commit","source":"apps/pc-gateway/src/routes/import-sessions.ts","handler":"postImportSessionCommitRoute"},"bff":{"method":"POST","path":"/api/imports/:session_id/commit","files":{"pages":"functions/api/imports/[session_id]/commit.js","nuxt":"server/api/imports/[session_id]/commit.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"bulk_import"},{"port_id":"imports.cancel","cloud":{"transport":"http","method":"POST","path":"/v1/projects/:project_id/records/imports/sessions/:session_id/cancel","source":"apps/pc-gateway/src/routes/import-sessions.ts","handler":"postImportSessionCancelRoute"},"bff":{"method":"POST","path":"/api/imports/:session_id/cancel","files":{"pages":"functions/api/imports/[session_id]/cancel.js","nuxt":"server/api/imports/[session_id]/cancel.post.ts"},"adapter":"generic","auth":"staff"},"entitlement":"bulk_import"}],"records":{"search":{"port_id":"records.search","method":"POST","path":"/api/records/search","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"query":{"type":"string"},"entity_key":{"type":"string"},"entity_keys":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"limit":{"type":"integer"}},"required":["query"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entity_key":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"updated_at":{"type":"string"},"score":{"type":"number"}},"required":["id","entity_key","title","slug","data","updated_at","score"],"additionalProperties":false}},"query":{"type":"string"},"entity_keys":{"type":"array","items":{"type":"string"}}},"required":["results","query","entity_keys"],"additionalProperties":false},"success_statuses":[200],"notes":["Search is cross-entity when entity_keys is supplied. Only indexed text-like fields plus title/slug are searched."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-search.ts"]}},"query":{"port_id":"records.query","method":"POST","path":"/api/records/:entity/query","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"where":{"$ref":"#/$defs/where"},"status":{"type":"string","enum":["active","archived","all"]},"order_by":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"type":"string","enum":["created_at","updated_at","title","slug"]},{"type":"object","properties":{"indexed_field":{"type":"string"}},"required":["indexed_field"],"additionalProperties":false}]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field","dir"],"additionalProperties":false}},"limit":{"type":"integer","minimum":1,"maximum":200},"cursor":{"type":"string"}},"required":[],"additionalProperties":false,"$defs":{"where":{"oneOf":[{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/where"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/$defs/where"},"maxItems":8}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/$defs/where"}},"required":["not"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","starts_with","between","is_null","field_exists"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},"required":["type","field","op"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"relation"},"direction":{"type":"string","enum":["from","to"]},"relation_key":{"type":"string"},"to_entity_key":{"type":"string"},"from_entity_key":{"type":"string"}},"required":["type","direction","relation_key"],"additionalProperties":false}]}}},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"data_json":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["id"],"additionalProperties":true}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["records","total","next_cursor"],"additionalProperties":false},"success_statuses":[200],"notes":["entity comes from the URL; do not include entity_key in the body. where depth maximum is 6. Records retain Cloud record envelopes; application data is in data_json."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-operations.ts"]}},"create":{"port_id":"records.create","method":"POST","path":"/api/records/:entity","auth":"staff","transport":"http","schema":{"request_body":{"anyOf":[{"type":"object","properties":{"data":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"parent_record_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data"],"additionalProperties":false},{"type":"object","additionalProperties":true,"description":"Shorthand application data; the adapter wraps it as data. Prefer the explicit data envelope."}]},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"record":{"type":"object","properties":{"id":{"type":"string"},"data_json":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["id"],"additionalProperties":true}},"required":["record"],"additionalProperties":false},"success_statuses":[200],"notes":["owner_user_id is accepted but ignored: Cloud always stamps the caller's own identity on rls_enabled/owner_managed entities for this staff-session auth path, and ignores it entirely otherwise. There is no way for the app to set another user's ownership through this route."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/records.ts"]}},"update":{"port_id":"records.update","method":"PATCH","path":"/api/records/:entity/:id","auth":"staff","transport":"http","schema":{"request_body":{"anyOf":[{"type":"object","properties":{"data":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"parent_record_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data"],"additionalProperties":false},{"type":"object","additionalProperties":true,"description":"Shorthand application data; the adapter wraps it as data. Prefer the explicit data envelope."}]},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"record":{"type":"object","properties":{"id":{"type":"string"},"data_json":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["id"],"additionalProperties":true}},"required":["record"],"additionalProperties":false},"success_statuses":[200],"notes":["owner_user_id is accepted but ignored: Cloud always stamps the caller's own identity on rls_enabled/owner_managed entities for this staff-session auth path, and ignores it entirely otherwise. There is no way for the app to set another user's ownership through this route."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"},"id":{"type":"string"}},"required":["entity","id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/records.ts"]}},"delete":{"port_id":"records.delete","method":"DELETE","path":"/api/records/:entity/:id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true}},"required":["success"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"},"id":{"type":"string"}},"required":["entity","id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/records.ts"]}},"aggregate":{"port_id":"records.aggregate","method":"POST","path":"/api/records/:entity/aggregate","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"where":{"$ref":"#/$defs/where"},"status":{"type":"string","enum":["active","archived","all"]},"group_by":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"}},"required":["type","field"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"date_bucket"},"field":{"anyOf":[{"type":"string"},{"type":"object","properties":{"indexed_date_field":{"type":"string"}},"required":["indexed_date_field"],"additionalProperties":false}]},"granularity":{"type":"string","enum":["day","month","year"]}},"required":["type","field","granularity"],"additionalProperties":false}]},"maxItems":6},"measures":{"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["count","sum","avg","min","max"]},"field":{"type":"string"},"alias":{"type":"string"}},"required":["op","alias"],"additionalProperties":false},"minItems":1,"maxItems":10},"max_groups":{"type":"integer"}},"required":["group_by","measures"],"additionalProperties":false,"$defs":{"where":{"oneOf":[{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/where"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/$defs/where"},"maxItems":8}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/$defs/where"}},"required":["not"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","starts_with","between","is_null","field_exists"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},"required":["type","field","op"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"relation"},"direction":{"type":"string","enum":["from","to"]},"relation_key":{"type":"string"},"to_entity_key":{"type":"string"},"from_entity_key":{"type":"string"}},"required":["type","direction","relation_key"],"additionalProperties":false}]}}},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."}},"query_api_version":{"const":"1"}},"required":["rows","query_api_version"],"additionalProperties":false},"success_statuses":[200],"notes":["entity comes from the URL; do not include entity_key in the body.","Only group_by[0] is evaluated; additional entries are silently ignored, not combined into a multi-level group-by."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-operations.ts"]}},"facet":{"port_id":"records.facet","method":"POST","path":"/api/records/:entity/facet","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"where":{"$ref":"#/$defs/where"},"status":{"type":"string","enum":["active","archived","all"]},"dimensions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"limit":{"type":"integer","maximum":200}},"required":["field"],"additionalProperties":false},"minItems":1,"maxItems":5}},"required":["dimensions"],"additionalProperties":false,"$defs":{"where":{"oneOf":[{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/where"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/$defs/where"},"maxItems":8}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/$defs/where"}},"required":["not"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","starts_with","between","is_null","field_exists"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},"required":["type","field","op"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"relation"},"direction":{"type":"string","enum":["from","to"]},"relation_key":{"type":"string"},"to_entity_key":{"type":"string"},"from_entity_key":{"type":"string"}},"required":["type","direction","relation_key"],"additionalProperties":false}]}}},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"facets":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"buckets":{"type":"array","items":{"type":"object","properties":{"bucket":{},"n":{"type":"number"}},"required":["bucket","n"],"additionalProperties":false}}},"required":["field","buckets"],"additionalProperties":false}},"query_api_version":{"const":"1"}},"required":["facets","query_api_version"],"additionalProperties":false},"success_statuses":[200],"notes":["entity comes from the URL; do not include entity_key in the body.","Each dimension's limit is silently capped at 200 server-side regardless of what is sent."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-operations.ts"]}},"bulk_update":{"port_id":"records.bulk_update","method":"POST","path":"/api/records/:entity/bulk-update","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"where":{"$ref":"#/$defs/where"},"ids":{"type":"array","items":{"type":"string"},"maxItems":500},"status_filter":{"type":"string","enum":["active","archived","all"]},"serialized":{"type":"boolean"},"patch":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"status":{"type":"string"}},"required":[],"additionalProperties":false}},"required":["patch"],"additionalProperties":false,"$defs":{"where":{"oneOf":[{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/where"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/$defs/where"},"maxItems":8}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/$defs/where"}},"required":["not"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","starts_with","between","is_null","field_exists"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},"required":["type","field","op"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"relation"},"direction":{"type":"string","enum":["from","to"]},"relation_key":{"type":"string"},"to_entity_key":{"type":"string"},"from_entity_key":{"type":"string"}},"required":["type","direction","relation_key"],"additionalProperties":false}]}}},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"updated":{"type":"integer"},"query_api_version":{"type":"string"}},"required":["updated"],"additionalProperties":false},"success_statuses":[200],"notes":["entity comes from the URL; do not include entity_key in the body.","Rejected with 403 when the entity is owner_managed and the caller is an app user (staff-issued service tokens are unaffected)."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-operations.ts"]}},"bulk_delete":{"port_id":"records.bulk_delete","method":"POST","path":"/api/records/:entity/bulk-delete","auth":"session","transport":"http","schema":{"request_body":{"type":"object","properties":{"where":{"$ref":"#/$defs/where"},"ids":{"type":"array","items":{"type":"string"},"maxItems":500},"status_filter":{"type":"string","enum":["active","archived","all"]},"serialized":{"type":"boolean"},"hard":{"type":"boolean"}},"required":[],"additionalProperties":false,"$defs":{"where":{"oneOf":[{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/where"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/$defs/where"},"maxItems":8}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/$defs/where"}},"required":["not"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"field"},"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","starts_with","between","is_null","field_exists"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},"required":["type","field","op"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"relation"},"direction":{"type":"string","enum":["from","to"]},"relation_key":{"type":"string"},"to_entity_key":{"type":"string"},"from_entity_key":{"type":"string"}},"required":["type","direction","relation_key"],"additionalProperties":false}]}}},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"deleted":{"type":"integer"},"query_api_version":{"type":"string"}},"required":["deleted","query_api_version"],"additionalProperties":false},"success_statuses":[200],"notes":["entity comes from the URL; do not include entity_key in the body.","Rejected with 403 when the entity is owner_managed and the caller is an app user (staff-issued service tokens are unaffected).","hard:true is not supported and always returns 400; omit hard or send false."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"entity":{"type":"string"}},"required":["entity"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/record-operations.ts"]}}},"auth_users":{"password_reset_request":{"port_id":"auth.password_reset_request","method":"POST","path":"/api/auth/forgot-password","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"email":{"type":"string"},"admin_only":{"type":"boolean"},"app_origin":{"type":"string"}},"required":["email"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false},"success_statuses":[200],"notes":["The installed adapter computes reset_path itself from admin_only (true → /admin/reset-password, false → /reset-password); it never reads a reset_path or link_path field from the request, so sending either has no effect.","Always returns 200 with a generic message whether or not the email exists, to avoid account enumeration.","app_origin is auto-populated by the installed adapter from the request's Origin/Referer header (or x-p2hs-public-origin); a generated app does not need to set it, and a same-origin request never needs to."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"password_reset":{"port_id":"auth.password_reset","method":"POST","path":"/api/auth/reset-password","auth":"public","transport":"http","schema":{"request_body":{"type":"object","properties":{"token":{"type":"string"},"password":{"type":"string","minLength":8}},"required":["token","password"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_list":{"port_id":"auth.users_list","method":"GET","path":"/api/admin/users","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{"page":{"type":"string"},"limit":{"type":"string"},"status":{"type":"string","enum":["all","active","inactive"]}},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","super_admin"]},"is_active":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_login_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name","role","is_active","created_at","last_login_at"],"additionalProperties":true}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success","data","pagination"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_create":{"port_id":"auth.users_create","method":"POST","path":"/api/admin/users","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"password":{"type":"string","minLength":8},"role":{"type":"string","enum":["member","admin"]},"is_active":{"const":true}},"required":["email"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","super_admin"]},"is_active":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_login_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name","role","is_active","created_at","last_login_at"],"additionalProperties":true}},"required":["success","data"],"additionalProperties":false},"success_statuses":[200,201],"notes":["Only super_admin may create users. Default role is admin. This is the installed BFF shape, not raw Cloud auth/users.","If email already belongs to an existing user, Cloud silently upserts instead of creating: it updates that user's role/password (and email_verified) and returns 200. A genuinely new user returns 201. Both cases return the same response shape."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_get":{"port_id":"auth.users_get","method":"GET","path":"/api/admin/users/:user_id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","super_admin"]},"is_active":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_login_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name","role","is_active","created_at","last_login_at"],"additionalProperties":true}},"required":["success","data"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"user_id":{"type":"string"}},"required":["user_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_update":{"port_id":"auth.users_update","method":"PATCH","path":"/api/admin/users/:user_id","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string","enum":["member","admin"]},"is_active":{"type":"boolean"}},"required":[],"additionalProperties":false,"minProperties":1},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","super_admin"]},"is_active":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_login_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name","role","is_active","created_at","last_login_at"],"additionalProperties":true}},"required":["success","data"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"user_id":{"type":"string"}},"required":["user_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_delete":{"port_id":"auth.users_delete","method":"DELETE","path":"/api/admin/users/:user_id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true}},"required":["success"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"user_id":{"type":"string"}},"required":["user_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}},"users_set_password":{"port_id":"auth.users_set_password","method":"PATCH","path":"/api/admin/users/:user_id/password","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"password":{"type":"string","minLength":8}},"required":["password"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"success":{"const":true}},"required":["success"],"additionalProperties":false},"success_statuses":[200],"notes":["Only super_admin may call this, and never against another super_admin. The installed adapter implements this by re-POSTing to the same Cloud endpoint as auth.users_create with the target user's existing email; Cloud upserts the password because the email already exists. This is the installed BFF shape, not a distinct raw Cloud route."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"user_id":{"type":"string"}},"required":["user_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/auth.ts"]}}}},"platform_sdk":{"version":"3.7.0","available":{"auth":true,"records":true,"storage":true,"bookings":true,"jobs":true,"forms":true,"inventory":true,"workforce":true,"ai":true,"functions":true,"imports":true}},"entitlements":{"plan":"staff","limits":{"edge_functions_max":3,"storage_gb_max":1,"auth_users_max":1000},"usage_this_period":{"credits_used":0,"credits_total":100,"pct":0}},"query_dsl":{"enabled":true,"version":"1","operators":{"comparison":["eq","neq","lt","lte","gt","gte"],"array":["in","notIn"],"string":["contains","startsWith"],"null":["isNull","isNotNull"],"range":["between"]},"logic":["AND","OR","NOT"],"relations":{"include":"eager-load related records alongside the query result","filter_by_related":"apply conditions on related record fields in the WHERE clause"},"aggregations":["count","sum","avg","min","max","group_by"],"bulk_operations":["updateWhere","deleteWhere"],"sorting":"multi-field, asc/desc per field","pagination":["limit_offset","cursor"],"d1_ceiling":{"optimal_max_rows":500000,"hard_ceiling_note":"The Cloud record engine is the only application store for generated apps. It works well up to ~500k rows. Do not create a local database or attach a customer origin. Customer-backend attach is a later platform feature.","use_external_connections_when":[]},"guidance":"If no customer backend is provided, use the Cloud record engine via the BFF /api/records adapter and this query DSL. Customer-backend attach is a later feature; most generated apps stay on P2HS Cloud. Do not generate Hyperdrive clients, local SQLite/KV, or a second store."},"data_import":{"enabled":true,"async_import":{"create":{"port_id":"imports.create","method":"POST","path":"/api/imports","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"const":"file"},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false},"destination":{"type":"object","properties":{"type":{"type":"string","enum":["records","external_table"]},"entity_key":{"type":"string"},"table":{"type":"string"},"connection_id":{"type":"string"}},"required":["type"],"additionalProperties":false},"options":{"type":"object","properties":{"mode":{"type":"string","enum":["insert","upsert"]},"delimiter":{"type":"string"},"has_header":{"type":"boolean"}},"required":[],"additionalProperties":true},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_type":{"type":"string","enum":["csv","json","sql"]}},"required":["source","destination"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"import_session_id":{"type":"string"},"status":{"type":"string"},"source_type":{"type":"string"},"destination_type":{"type":"string"}},"required":["import_session_id","status","source_type","destination_type"],"additionalProperties":false},"success_statuses":[201],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"get":{"port_id":"imports.get","method":"GET","path":"/api/imports/:session_id","auth":"staff","transport":"http","schema":{"request_body":null,"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"import_session_id":{"type":"string"},"status":{"type":"string"},"source_type":{"type":"string"},"destination_type":{"type":"string"},"mapping_json":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"options_json":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"preview_json":{"anyOf":[{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."},{"type":"null"}]},"total_rows":{"anyOf":[{"type":"integer"},{"type":"null"}]},"processed_rows":{"type":"integer"},"succeeded_rows":{"type":"integer"},"failed_rows":{"type":"integer"},"error_count":{"type":"integer"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"recent_errors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"row_number":{"anyOf":[{"type":"integer"},{"type":"null"}]},"column_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_message":{"type":"string"},"raw_row_json":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","error_message","created_at"],"additionalProperties":false}}},"required":["import_session_id","status"],"additionalProperties":true},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"preview":{"port_id":"imports.preview","method":"POST","path":"/api/imports/:session_id/preview","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"sample_rows":{"type":"integer"}},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"oneOf":[{"type":"object","properties":{"import_session_id":{"type":"string"},"kind":{"const":"sql"},"snippet_chars":{"type":"integer"},"total_chars_est":{"type":"integer"}},"required":["import_session_id","kind","snippet_chars","total_chars_est"],"additionalProperties":false},{"type":"object","properties":{"import_session_id":{"type":"string"},"kind":{"const":"json"},"row_count_sample":{"type":"integer"},"columns":{"type":"array","items":{"type":"string"}},"sample_rows":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."}}},"required":["import_session_id","kind","row_count_sample","columns","sample_rows"],"additionalProperties":false},{"type":"object","properties":{"import_session_id":{"type":"string"},"kind":{"const":"csv"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"inferred_type":{"type":"string"},"matches_schema_field":{"type":"boolean"}},"required":["name","inferred_type","matches_schema_field"],"additionalProperties":false}},"row_count_sample":{"type":"integer"},"sample_rows":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Application-defined fields; use the project entity/function schema."}},"entity_hint":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"inferred_type":{"type":"string"},"matches_schema_field":{"type":"boolean"}},"required":["name","inferred_type","matches_schema_field"],"additionalProperties":false}}},"required":["import_session_id","kind","columns","row_count_sample","sample_rows","entity_hint"],"additionalProperties":false}]},"success_statuses":[200],"notes":["The response shape depends on the session's source_type: sql returns only snippet_chars/total_chars_est; json returns columns as a plain string array; csv additionally returns entity_hint, which duplicates columns."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"map_fields":{"port_id":"imports.map_fields","method":"POST","path":"/api/imports/:session_id/map-fields","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"mapping":{"type":"object","additionalProperties":{"type":"string"}}},"required":["mapping"],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"import_session_id":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}},"required":["import_session_id","mapping"],"additionalProperties":false},"success_statuses":[200],"notes":["mapping values are not validated as strings server-side despite the declared shape; send strings anyway."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"validate":{"port_id":"imports.validate","method":"POST","path":"/api/imports/:session_id/validate","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"import_session_id":{"type":"string"},"valid":{"type":"boolean"},"validated":{"type":"integer"},"error_count":{"type":"integer"},"message":{"type":"string"}},"required":["import_session_id","valid","validated","error_count"],"additionalProperties":false},"success_statuses":[200],"notes":[],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"commit":{"port_id":"imports.commit","method":"POST","path":"/api/imports/:session_id/commit","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{"validate_only":{"type":"boolean"}},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"oneOf":[{"type":"object","properties":{"import_session_id":{"type":"string"},"message":{"const":"already validated; noop"}},"required":["import_session_id","message"],"additionalProperties":false},{"type":"object","properties":{"import_session_id":{"type":"string"},"job_id":{"type":"string"},"status":{"const":"running"},"message":{"type":"string"}},"required":["import_session_id","job_id","status","message"],"additionalProperties":false}]},"success_statuses":[200,202],"notes":["validate_only:true (200) short-circuits to {import_session_id, message} with no job_id/status; omitting it or sending false starts the real commit (202) with the full shape. Requires the session to be in status ready, else 400."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}},"cancel":{"port_id":"imports.cancel","method":"POST","path":"/api/imports/:session_id/cancel","auth":"staff","transport":"http","schema":{"request_body":{"type":"object","properties":{},"required":[],"additionalProperties":false},"query":{"type":"object","properties":{},"required":[],"additionalProperties":false},"response":{"type":"object","properties":{"import_session_id":{"type":"string"},"status":{"const":"cancelled"}},"required":["import_session_id","status"],"additionalProperties":false},"success_statuses":[200],"notes":["Only allowed from draft/previewed/validating/ready/running; any other current status returns 400."],"schema_version":"1","audience":"generated_app","path_parameters":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Authorization":{"type":"string","pattern":"^Bearer .+"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":true},"error_notes":["Non-2xx means failure; never replace with mock success. Framework transport may add error fields."],"source":["apps/pc-gateway/src/routes/import-sessions.ts"]}}},"batch_write":{},"pre_generation_question":"Use installed storage ports to upload a file, then installed import session ports. Poll the import session port; do not submit data.import as a queue request type. Application data remains in Cloud records. Do not invent a local database."},"email_templates":{"catalog":{"auth.verify_email":{"optional":false,"archetype":"security","default_profile":"neutral","protected_placeholders":["{{action_url}}"],"required_variables":["action_url"],"optional_variables":{"app_name":"Your application"},"description":"Sent when require_email_verify is on and a new user signs up."},"auth.otp_request":{"optional":false,"archetype":"security","default_profile":"neutral","protected_placeholders":["{{code}}"],"required_variables":["code"],"optional_variables":{"app_name":"Your application"},"description":"One-time sign-in code, expires in 10 minutes."},"auth.magic_link":{"optional":false,"archetype":"action","default_profile":"neutral","protected_placeholders":["{{action_url}}"],"required_variables":["action_url"],"optional_variables":{"app_name":"Your application"},"description":"Passwordless sign-in link, expires in 5 minutes."},"auth.password_reset":{"optional":false,"archetype":"security","default_profile":"neutral","protected_placeholders":["{{action_url}}"],"required_variables":["action_url"],"optional_variables":{"app_name":"Your application"},"description":"Password reset link, expires in 15 minutes."},"auth.invite":{"optional":false,"archetype":"action","default_profile":"neutral","protected_placeholders":["{{action_url}}"],"required_variables":["action_url"],"optional_variables":{"app_name":"Your application"},"description":"Staff invite accept link."},"contact_capture.admin_notify":{"optional":true,"archetype":"notification","default_profile":"neutral","protected_placeholders":[],"required_variables":[],"optional_variables":{"name":"a visitor","email":"","message":""},"description":"contact-capture pack: new-submission email to the site owner. Vars: name, email, message."},"contact_capture.confirmation":{"optional":true,"archetype":"confirmation","default_profile":"neutral","protected_placeholders":[],"required_variables":[],"optional_variables":{"name":"there"},"description":"contact-capture pack: confirmation email to the visitor who submitted. Vars: name."}},"current":[],"pre_generation_question":"To customize copy, write p2hs/email-templates.json as the complete override set (replace-all). Keys omitted from the file revert to the platform default; they are not retained. Omit the file entirely to leave Cloud state unchanged. An empty templates array clears all overrides. Every protected_placeholder listed in catalog[key] must still appear literally in source text_body (and html_body, if set) or Core rejects the whole file before Cloud is mutated. enabled:false on an optional (contact_capture.*) override means ignore that override and use the platform default — it does not skip sending. optional:false (auth.*) ignores enabled:false. Runtime variables in html_body are HTML-escaped at Cloud render; subject and text_body are not. Pass raw strings, not HTML fragments. Overrides may reference only the catalog variable vocabulary for that template_key; unknown {{placeholders}} are rejected."}}