@tickernelz/paperclip-pro-db 2026.925.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter-auth-sessions-schema.test.d.ts +2 -0
- package/dist/adapter-auth-sessions-schema.test.d.ts.map +1 -0
- package/dist/adapter-auth-sessions-schema.test.js +112 -0
- package/dist/adapter-auth-sessions-schema.test.js.map +1 -0
- package/dist/agent-chat-migration.test.d.ts +2 -0
- package/dist/agent-chat-migration.test.d.ts.map +1 -0
- package/dist/agent-chat-migration.test.js +111 -0
- package/dist/agent-chat-migration.test.js.map +1 -0
- package/dist/agent-wakeup-requests-schema.test.d.ts +2 -0
- package/dist/agent-wakeup-requests-schema.test.d.ts.map +1 -0
- package/dist/agent-wakeup-requests-schema.test.js +24 -0
- package/dist/agent-wakeup-requests-schema.test.js.map +1 -0
- package/dist/backup-lib.d.ts +42 -0
- package/dist/backup-lib.d.ts.map +1 -0
- package/dist/backup-lib.js +921 -0
- package/dist/backup-lib.js.map +1 -0
- package/dist/backup-lib.test.d.ts +2 -0
- package/dist/backup-lib.test.d.ts.map +1 -0
- package/dist/backup-lib.test.js +502 -0
- package/dist/backup-lib.test.js.map +1 -0
- package/dist/backup.d.ts +2 -0
- package/dist/backup.d.ts.map +1 -0
- package/dist/backup.js +77 -0
- package/dist/backup.js.map +1 -0
- package/dist/better-auth-account-issuer-migration.test.d.ts +9 -0
- package/dist/better-auth-account-issuer-migration.test.d.ts.map +1 -0
- package/dist/better-auth-account-issuer-migration.test.js +113 -0
- package/dist/better-auth-account-issuer-migration.test.js.map +1 -0
- package/dist/built-in-agent-unique-marker-migration.test.d.ts +2 -0
- package/dist/built-in-agent-unique-marker-migration.test.d.ts.map +1 -0
- package/dist/built-in-agent-unique-marker-migration.test.js +102 -0
- package/dist/built-in-agent-unique-marker-migration.test.js.map +1 -0
- package/dist/chat-github-migration.test.d.ts +2 -0
- package/dist/chat-github-migration.test.d.ts.map +1 -0
- package/dist/chat-github-migration.test.js +34 -0
- package/dist/chat-github-migration.test.js.map +1 -0
- package/dist/chat-identity-migration-reconciliation.test.d.ts +2 -0
- package/dist/chat-identity-migration-reconciliation.test.d.ts.map +1 -0
- package/dist/chat-identity-migration-reconciliation.test.js +531 -0
- package/dist/chat-identity-migration-reconciliation.test.js.map +1 -0
- package/dist/chat-telegram-draft-ids-migration.test.d.ts +2 -0
- package/dist/chat-telegram-draft-ids-migration.test.d.ts.map +1 -0
- package/dist/chat-telegram-draft-ids-migration.test.js +71 -0
- package/dist/chat-telegram-draft-ids-migration.test.js.map +1 -0
- package/dist/chat-tenant-foreign-keys.test.d.ts +2 -0
- package/dist/chat-tenant-foreign-keys.test.d.ts.map +1 -0
- package/dist/chat-tenant-foreign-keys.test.js +140 -0
- package/dist/chat-tenant-foreign-keys.test.js.map +1 -0
- package/dist/check-migration-numbering.d.ts +2 -0
- package/dist/check-migration-numbering.d.ts.map +1 -0
- package/dist/check-migration-numbering.js +64 -0
- package/dist/check-migration-numbering.js.map +1 -0
- package/dist/check-migration-safety.d.ts +27 -0
- package/dist/check-migration-safety.d.ts.map +1 -0
- package/dist/check-migration-safety.js +811 -0
- package/dist/check-migration-safety.js.map +1 -0
- package/dist/check-migration-safety.test.d.ts +2 -0
- package/dist/check-migration-safety.test.d.ts.map +1 -0
- package/dist/check-migration-safety.test.js +391 -0
- package/dist/check-migration-safety.test.js.map +1 -0
- package/dist/client-options.test.d.ts +2 -0
- package/dist/client-options.test.d.ts.map +1 -0
- package/dist/client-options.test.js +88 -0
- package/dist/client-options.test.js.map +1 -0
- package/dist/client-teardown-registry.test.d.ts +2 -0
- package/dist/client-teardown-registry.test.d.ts.map +1 -0
- package/dist/client-teardown-registry.test.js +100 -0
- package/dist/client-teardown-registry.test.js.map +1 -0
- package/dist/client.d.ts +111 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +883 -0
- package/dist/client.js.map +1 -0
- package/dist/client.test.d.ts +2 -0
- package/dist/client.test.d.ts.map +1 -0
- package/dist/client.test.js +1759 -0
- package/dist/client.test.js.map +1 -0
- package/dist/company-secret-proposals-migration.test.d.ts +2 -0
- package/dist/company-secret-proposals-migration.test.d.ts.map +1 -0
- package/dist/company-secret-proposals-migration.test.js +40 -0
- package/dist/company-secret-proposals-migration.test.js.map +1 -0
- package/dist/connection-grants-phase2-migration.test.d.ts +2 -0
- package/dist/connection-grants-phase2-migration.test.d.ts.map +1 -0
- package/dist/connection-grants-phase2-migration.test.js +30 -0
- package/dist/connection-grants-phase2-migration.test.js.map +1 -0
- package/dist/connection-grants-phase4-migration.test.d.ts +2 -0
- package/dist/connection-grants-phase4-migration.test.d.ts.map +1 -0
- package/dist/connection-grants-phase4-migration.test.js +300 -0
- package/dist/connection-grants-phase4-migration.test.js.map +1 -0
- package/dist/connections-v3-schema-core-migration.test.d.ts +2 -0
- package/dist/connections-v3-schema-core-migration.test.d.ts.map +1 -0
- package/dist/connections-v3-schema-core-migration.test.js +98 -0
- package/dist/connections-v3-schema-core-migration.test.js.map +1 -0
- package/dist/decision-queue-migrations.test.d.ts +2 -0
- package/dist/decision-queue-migrations.test.d.ts.map +1 -0
- package/dist/decision-queue-migrations.test.js +78 -0
- package/dist/decision-queue-migrations.test.js.map +1 -0
- package/dist/embedded-postgres-error.d.ts +9 -0
- package/dist/embedded-postgres-error.d.ts.map +1 -0
- package/dist/embedded-postgres-error.js +73 -0
- package/dist/embedded-postgres-error.js.map +1 -0
- package/dist/embedded-postgres-error.test.d.ts +2 -0
- package/dist/embedded-postgres-error.test.d.ts.map +1 -0
- package/dist/embedded-postgres-error.test.js +25 -0
- package/dist/embedded-postgres-error.test.js.map +1 -0
- package/dist/embedded-postgres-lifecycle.d.ts +16 -0
- package/dist/embedded-postgres-lifecycle.d.ts.map +1 -0
- package/dist/embedded-postgres-lifecycle.js +43 -0
- package/dist/embedded-postgres-lifecycle.js.map +1 -0
- package/dist/embedded-postgres-lifecycle.test.d.ts +2 -0
- package/dist/embedded-postgres-lifecycle.test.d.ts.map +1 -0
- package/dist/embedded-postgres-lifecycle.test.js +64 -0
- package/dist/embedded-postgres-lifecycle.test.js.map +1 -0
- package/dist/embedded-postgres-native.d.ts +3 -0
- package/dist/embedded-postgres-native.d.ts.map +1 -0
- package/dist/embedded-postgres-native.js +83 -0
- package/dist/embedded-postgres-native.js.map +1 -0
- package/dist/embedded-postgres-native.test.d.ts +2 -0
- package/dist/embedded-postgres-native.test.d.ts.map +1 -0
- package/dist/embedded-postgres-native.test.js +49 -0
- package/dist/embedded-postgres-native.test.js.map +1 -0
- package/dist/environment-custom-images-schema.test.d.ts +2 -0
- package/dist/environment-custom-images-schema.test.d.ts.map +1 -0
- package/dist/environment-custom-images-schema.test.js +26 -0
- package/dist/environment-custom-images-schema.test.js.map +1 -0
- package/dist/external-objects-schema.test.d.ts +2 -0
- package/dist/external-objects-schema.test.d.ts.map +1 -0
- package/dist/external-objects-schema.test.js +46 -0
- package/dist/external-objects-schema.test.js.map +1 -0
- package/dist/heartbeat-context-snapshot-index-migration.test.d.ts +2 -0
- package/dist/heartbeat-context-snapshot-index-migration.test.d.ts.map +1 -0
- package/dist/heartbeat-context-snapshot-index-migration.test.js +60 -0
- package/dist/heartbeat-context-snapshot-index-migration.test.js.map +1 -0
- package/dist/inbox-archive-agent-policies-migration.test.d.ts +2 -0
- package/dist/inbox-archive-agent-policies-migration.test.d.ts.map +1 -0
- package/dist/inbox-archive-agent-policies-migration.test.js +155 -0
- package/dist/inbox-archive-agent-policies-migration.test.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/issue-comment-derived-attribution-migration.test.d.ts +2 -0
- package/dist/issue-comment-derived-attribution-migration.test.d.ts.map +1 -0
- package/dist/issue-comment-derived-attribution-migration.test.js +287 -0
- package/dist/issue-comment-derived-attribution-migration.test.js.map +1 -0
- package/dist/issue-comment-on-behalf-migration.test.d.ts +2 -0
- package/dist/issue-comment-on-behalf-migration.test.d.ts.map +1 -0
- package/dist/issue-comment-on-behalf-migration.test.js +146 -0
- package/dist/issue-comment-on-behalf-migration.test.js.map +1 -0
- package/dist/issue-thread-interaction-resolver-policy-migration.test.d.ts +2 -0
- package/dist/issue-thread-interaction-resolver-policy-migration.test.d.ts.map +1 -0
- package/dist/issue-thread-interaction-resolver-policy-migration.test.js +146 -0
- package/dist/issue-thread-interaction-resolver-policy-migration.test.js.map +1 -0
- package/dist/migrate.d.ts +2 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrate.js +25 -0
- package/dist/migrate.js.map +1 -0
- package/dist/migration-runtime.d.ts +7 -0
- package/dist/migration-runtime.d.ts.map +1 -0
- package/dist/migration-runtime.js +159 -0
- package/dist/migration-runtime.js.map +1 -0
- package/dist/migration-safety-baseline.d.ts +135 -0
- package/dist/migration-safety-baseline.d.ts.map +1 -0
- package/dist/migration-safety-baseline.js +150 -0
- package/dist/migration-safety-baseline.js.map +1 -0
- package/dist/migration-snapshot-drift.test.d.ts +2 -0
- package/dist/migration-snapshot-drift.test.d.ts.map +1 -0
- package/dist/migration-snapshot-drift.test.js +55 -0
- package/dist/migration-snapshot-drift.test.js.map +1 -0
- package/dist/migration-status.d.ts +2 -0
- package/dist/migration-status.d.ts.map +1 -0
- package/dist/migration-status.js +55 -0
- package/dist/migration-status.js.map +1 -0
- package/dist/migrations/0000_mature_masked_marvel.sql +208 -0
- package/dist/migrations/0001_fast_northstar.sql +87 -0
- package/dist/migrations/0002_big_zaladane.sql +1 -0
- package/dist/migrations/0003_shallow_quentin_quire.sql +5 -0
- package/dist/migrations/0004_issue_identifiers.sql +28 -0
- package/dist/migrations/0005_chief_luke_cage.sql +19 -0
- package/dist/migrations/0006_overjoyed_mister_sinister.sql +36 -0
- package/dist/migrations/0007_new_quentin_quire.sql +20 -0
- package/dist/migrations/0008_amused_zzzax.sql +1 -0
- package/dist/migrations/0009_fast_jackal.sql +36 -0
- package/dist/migrations/0010_stale_justin_hammer.sql +37 -0
- package/dist/migrations/0011_windy_corsair.sql +18 -0
- package/dist/migrations/0012_perpetual_ser_duncan.sql +2 -0
- package/dist/migrations/0013_dashing_wasp.sql +4 -0
- package/dist/migrations/0014_many_mikhail_rasputin.sql +135 -0
- package/dist/migrations/0015_project_color_archived.sql +2 -0
- package/dist/migrations/0016_agent_icon.sql +1 -0
- package/dist/migrations/0017_tiresome_gabe_jones.sql +51 -0
- package/dist/migrations/0018_flat_sleepwalker.sql +26 -0
- package/dist/migrations/0019_public_victor_mancha.sql +18 -0
- package/dist/migrations/0020_white_anita_blake.sql +1 -0
- package/dist/migrations/0021_chief_vindicator.sql +1 -0
- package/dist/migrations/0022_company_brand_color.sql +1 -0
- package/dist/migrations/0023_fair_lethal_legion.sql +3 -0
- package/dist/migrations/0024_far_beast.sql +2 -0
- package/dist/migrations/0025_nasty_salo.sql +15 -0
- package/dist/migrations/0026_lying_pete_wisdom.sql +39 -0
- package/dist/migrations/0027_tranquil_tenebrous.sql +2 -0
- package/dist/migrations/0028_harsh_goliath.sql +54 -0
- package/dist/migrations/0029_plugin_tables.sql +177 -0
- package/dist/migrations/0030_rich_magneto.sql +12 -0
- package/dist/migrations/0031_zippy_magma.sql +51 -0
- package/dist/migrations/0032_pretty_doctor_octopus.sql +102 -0
- package/dist/migrations/0033_shiny_black_tarantula.sql +2 -0
- package/dist/migrations/0034_fat_dormammu.sql +2 -0
- package/dist/migrations/0035_marvelous_satana.sql +91 -0
- package/dist/migrations/0036_cheerful_nitro.sql +9 -0
- package/dist/migrations/0037_friendly_eddie_brock.sql +29 -0
- package/dist/migrations/0038_careless_iron_monger.sql +5 -0
- package/dist/migrations/0039_fat_magneto.sql +161 -0
- package/dist/migrations/0040_eager_shotgun.sql +5 -0
- package/dist/migrations/0041_curly_maria_hill.sql +1 -0
- package/dist/migrations/0042_spotty_the_renegades.sql +26 -0
- package/dist/migrations/0043_reflective_captain_universe.sql +6 -0
- package/dist/migrations/0044_illegal_toad.sql +56 -0
- package/dist/migrations/0045_workable_shockwave.sql +17 -0
- package/dist/migrations/0046_smooth_sentinels.sql +11 -0
- package/dist/migrations/0047_overjoyed_groot.sql +102 -0
- package/dist/migrations/0048_flashy_marrow.sql +1 -0
- package/dist/migrations/0049_flawless_abomination.sql +21 -0
- package/dist/migrations/0050_stiff_luckman.sql +1 -0
- package/dist/migrations/0051_young_korg.sql +5 -0
- package/dist/migrations/0052_mushy_trauma.sql +26 -0
- package/dist/migrations/0053_sharp_wild_child.sql +18 -0
- package/dist/migrations/0054_draft_routines.sql +2 -0
- package/dist/migrations/0055_kind_weapon_omega.sql +1 -0
- package/dist/migrations/0056_spooky_ultragirl.sql +22 -0
- package/dist/migrations/0057_tidy_join_requests.sql +57 -0
- package/dist/migrations/0058_wealthy_starbolt.sql +6 -0
- package/dist/migrations/0059_plugin_database_namespaces.sql +41 -0
- package/dist/migrations/0060_orange_annihilus.sql +50 -0
- package/dist/migrations/0061_lively_thor_girl.sql +3 -0
- package/dist/migrations/0062_routine_run_dispatch_fingerprint.sql +9 -0
- package/dist/migrations/0063_issue_thread_interactions.sql +65 -0
- package/dist/migrations/0064_issue_thread_interaction_idempotency.sql +4 -0
- package/dist/migrations/0065_environments.sql +50 -0
- package/dist/migrations/0066_issue_tree_holds.sql +107 -0
- package/dist/migrations/0067_agent_default_environment.sql +3 -0
- package/dist/migrations/0068_environment_local_driver_unique.sql +2 -0
- package/dist/migrations/0069_liveness_recovery_dedupe.sql +13 -0
- package/dist/migrations/0070_active_run_output_watchdog.sql +70 -0
- package/dist/migrations/0071_default_hire_approval_off.sql +1 -0
- package/dist/migrations/0072_large_sandman.sql +6 -0
- package/dist/migrations/0073_shiny_salo.sql +1 -0
- package/dist/migrations/0074_striped_genesis.sql +4 -0
- package/dist/migrations/0075_cultured_sebastian_shaw.sql +7 -0
- package/dist/migrations/0076_useful_elektra.sql +29 -0
- package/dist/migrations/0077_unusual_karnak.sql +140 -0
- package/dist/migrations/0078_white_darwin.sql +3 -0
- package/dist/migrations/0079_company_search_document_indexes.sql +2 -0
- package/dist/migrations/0080_company_search_fuzzystrmatch.sql +1 -0
- package/dist/migrations/0081_optimal_dormammu.sql +1 -0
- package/dist/migrations/0082_dry_vision.sql +124 -0
- package/dist/migrations/0083_company_secret_provider_configs.sql +51 -0
- package/dist/migrations/0084_issue_recovery_actions.sql +64 -0
- package/dist/migrations/0085_tranquil_the_executioner.sql +8 -0
- package/dist/migrations/0086_routine_env_runtime_contract.sql +8 -0
- package/dist/migrations/0087_backfill_environment_manage_human_defaults.sql +29 -0
- package/dist/migrations/0088_backfill_principal_access_compatibility.sql +75 -0
- package/dist/migrations/0089_cloud_upstreams.sql +71 -0
- package/dist/migrations/0090_resource_memberships.sql +55 -0
- package/dist/migrations/0091_old_swarm.sql +189 -0
- package/dist/migrations/0092_mighty_puma.sql +28 -0
- package/dist/migrations/0093_giant_green_goblin.sql +6 -0
- package/dist/migrations/0094_backfill_archived_company_agent_pauses.sql +10 -0
- package/dist/migrations/0095_issue_comment_tombstones.sql +15 -0
- package/dist/migrations/0096_document_annotation_issue_comment_links.sql +7 -0
- package/dist/migrations/0097_low_trust_source_trust.sql +4 -0
- package/dist/migrations/0098_project_icon.sql +1 -0
- package/dist/migrations/0099_skills_store_foundation.sql +121 -0
- package/dist/migrations/0100_skill_install_count_backfill.sql +3 -0
- package/dist/migrations/0101_plugin_company_id_tenant_isolation.sql +14 -0
- package/dist/migrations/0102_managed_sandbox_dedup_index.sql +33 -0
- package/dist/migrations/0103_agent_error_reason.sql +1 -0
- package/dist/migrations/0104_issue_watchdogs.sql +90 -0
- package/dist/migrations/0105_instance_scoped_environments.sql +170 -0
- package/dist/migrations/0106_external_object_references.sql +106 -0
- package/dist/migrations/0107_external_object_display_metadata.sql +5 -0
- package/dist/migrations/0108_workspace_operations_issue_id.sql +41 -0
- package/dist/migrations/0109_routine_description_annotations.sql +170 -0
- package/dist/migrations/0110_document_company_cascade.sql +31 -0
- package/dist/migrations/0111_backfill_skill_create_human_defaults.sql +29 -0
- package/dist/migrations/0112_rename_skill_create_permission_key.sql +30 -0
- package/dist/migrations/0113_pipeline_foundation.sql +335 -0
- package/dist/migrations/0114_pipeline_case_issue_unlinked_event.sql +3 -0
- package/dist/migrations/0115_pipeline_routine_origin.sql +3 -0
- package/dist/migrations/0116_pipeline_upstream_drift_event.sql +3 -0
- package/dist/migrations/0117_pipeline_transition_forced_event.sql +3 -0
- package/dist/migrations/0118_pipeline_case_agent_fanout.sql +3 -0
- package/dist/migrations/0119_pipeline_drift_acknowledged_event.sql +3 -0
- package/dist/migrations/0120_pipeline_stage_working_primitives.sql +19 -0
- package/dist/migrations/0121_pipeline_automation_retry_effects.sql +43 -0
- package/dist/migrations/0122_pipeline_case_documents.sql +28 -0
- package/dist/migrations/0123_document_annotation_source_trust.sql +1 -0
- package/dist/migrations/0124_agent_api_key_scope_config.sql +1 -0
- package/dist/migrations/0125_environment_custom_image_templates.sql +147 -0
- package/dist/migrations/0127_environment_custom_images_instance_scoped.sql +106 -0
- package/dist/migrations/0128_user_specific_secrets.sql +178 -0
- package/dist/migrations/0129_agent_api_key_responsible_user.sql +41 -0
- package/dist/migrations/0131_repair_run_responsible_user_context_refs.sql +67 -0
- package/dist/migrations/0132_issue_comment_derived_attribution_fast.sql +82 -0
- package/dist/migrations/0133_resource_membership_stars.sql +7 -0
- package/dist/migrations/0134_run_responsible_user_invariant.sql +211 -0
- package/dist/migrations/0135_repair_run_responsible_user_updated_at_sweep.sql +84 -0
- package/dist/migrations/0136_acpx_default_engine_migration.sql +97 -0
- package/dist/migrations/0137_skill_studio_server_foundation.sql +76 -0
- package/dist/migrations/0138_skill_studio_run_retention.sql +5 -0
- package/dist/migrations/0139_skill_studio_run_templates.sql +44 -0
- package/dist/migrations/0140_built_in_managed_resources.sql +43 -0
- package/dist/migrations/0141_heartbeat_runs_company_created_at_index.sql +2 -0
- package/dist/migrations/0142_company_search_sort_indexes.sql +3 -0
- package/dist/migrations/0143_cases_foundation.sql +248 -0
- package/dist/migrations/0144_case_document_annotations.sql +31 -0
- package/dist/migrations/0145_inbox_dismissal_snooze_kind.sql +15 -0
- package/dist/migrations/0146_routine_activity_gate.sql +3 -0
- package/dist/migrations/0147_cost_event_status.sql +1 -0
- package/dist/migrations/0148_tool_access_mcp_connections.sql +126 -0
- package/dist/migrations/0149_agent_access_phase2_contracts.sql +612 -0
- package/dist/migrations/0150_tool_invocation_catalog_snapshots.sql +2 -0
- package/dist/migrations/0151_tool_gateway_sessions.sql +38 -0
- package/dist/migrations/0152_tool_connection_application_no_cascade.sql +18 -0
- package/dist/migrations/0153_tool_stdio_command_templates.sql +32 -0
- package/dist/migrations/0154_tool_oauth_states.sql +36 -0
- package/dist/migrations/0155_tool_oauth_state_actor_binding.sql +5 -0
- package/dist/migrations/0156_tool_oauth_state_session_binding.sql +1 -0
- package/dist/migrations/0157_tool_profile_new_tools_review.sql +1 -0
- package/dist/migrations/0158_tool_invocation_connected_mcp_metadata.sql +4 -0
- package/dist/migrations/0159_named_mcp_gateways.sql +72 -0
- package/dist/migrations/0160_mcp_gateway_contract_expansion.sql +176 -0
- package/dist/migrations/0161_environment_custom_image_company_scope_repair.sql +8 -0
- package/dist/migrations/0162_tool_runtime_metric_counters.sql +27 -0
- package/dist/migrations/0163_secret_binding_projection_class.sql +2 -0
- package/dist/migrations/0164_plugin_config_company_scope.sql +117 -0
- package/dist/migrations/0165_connection_token_issuances.sql +64 -0
- package/dist/migrations/0166_smoke_lab_results.sql +51 -0
- package/dist/migrations/0167_environment_custom_image_instance_scope_cleanup.sql +32 -0
- package/dist/migrations/0168_tool_connection_installs.sql +56 -0
- package/dist/migrations/0169_tool_gateway_protocol_rate_limit_counters.sql +43 -0
- package/dist/migrations/0170_company_skill_policies.sql +12 -0
- package/dist/migrations/0171_issue_create_idempotency_keys.sql +19 -0
- package/dist/migrations/0172_inbox_archive_agent_policies.sql +42 -0
- package/dist/migrations/0173_inbox_policy_agent_cleanup.sql +22 -0
- package/dist/migrations/0174_folders.sql +46 -0
- package/dist/migrations/0175_nested_skill_folders.sql +232 -0
- package/dist/migrations/0176_issue_create_idempotency_key_expiry.sql +2 -0
- package/dist/migrations/0177_activity_log_responsible_user.sql +10 -0
- package/dist/migrations/0178_summary_slots.sql +37 -0
- package/dist/migrations/0179_summary_slot_failure_reason.sql +1 -0
- package/dist/migrations/0180_decision_training_examples.sql +23 -0
- package/dist/migrations/0181_decision_training_retention_policy.sql +2 -0
- package/dist/migrations/0182_connections_v3_schema_core.sql +74 -0
- package/dist/migrations/0183_connection_user_authorization_state.sql +6 -0
- package/dist/migrations/0184_routable_blocked.sql +3 -0
- package/dist/migrations/0185_status_cards.sql +111 -0
- package/dist/migrations/0186_status_card_compile_provenance.sql +3 -0
- package/dist/migrations/0187_status_card_pending_change_hash.sql +1 -0
- package/dist/migrations/0188_status_card_generation_issue_index.sql +1 -0
- package/dist/migrations/0189_status_card_agent.sql +6 -0
- package/dist/migrations/0190_status_card_single_prompt.sql +2 -0
- package/dist/migrations/0191_status_card_mentioned_issue_ids.sql +1 -0
- package/dist/migrations/0192_task_watchdog_stop_snapshots.sql +2 -0
- package/dist/migrations/0193_document_memberships.sql +15 -0
- package/dist/migrations/0194_company_skill_releases.sql +4 -0
- package/dist/migrations/0195_built_in_agent_unique_marker.sql +53 -0
- package/dist/migrations/0196_drop_cloud_upstream_tables.sql +9 -0
- package/dist/migrations/0197_decisions_v1.sql +106 -0
- package/dist/migrations/0198_decision_queues_and_triage.sql +161 -0
- package/dist/migrations/0199_decision_queue_composite_key.sql +10 -0
- package/dist/migrations/0200_yellow_maria_hill.sql +64 -0
- package/dist/migrations/0201_concerned_captain_midlands.sql +1 -0
- package/dist/migrations/0202_eminent_marvel_zombies.sql +1 -0
- package/dist/migrations/0203_interaction_resolver_governance.sql +8 -0
- package/dist/migrations/0204_interaction_addressee.sql +6 -0
- package/dist/migrations/0205_narrow_shiva.sql +10 -0
- package/dist/migrations/0206_review_path_recovery_idempotency_index.sql +2 -0
- package/dist/migrations/0207_moaning_amazoness.sql +94 -0
- package/dist/migrations/0208_keen_sharon_carter.sql +1 -0
- package/dist/migrations/0209_heartbeat_context_snapshot_indexes.sql +4 -0
- package/dist/migrations/0210_heartbeat_context_taskkey_index.sql +1 -0
- package/dist/migrations/0211_bright_morg.sql +1 -0
- package/dist/migrations/0212_onboarding_first_task_unique.sql +3 -0
- package/dist/migrations/0213_complete_mystique.sql +24 -0
- package/dist/migrations/0214_lively_lord_tyger.sql +22 -0
- package/dist/migrations/0215_flat_daimon_hellstrom.sql +1 -0
- package/dist/migrations/0216_company_onboarding_seeds.sql +42 -0
- package/dist/migrations/0217_yielding_starbolt.sql +21 -0
- package/dist/migrations/0218_mushy_jack_murdock.sql +38 -0
- package/dist/migrations/0219_runtime_service_exposure.sql +3 -0
- package/dist/migrations/0220_execution_workspace_runtime_leases.sql +26 -0
- package/dist/migrations/0221_swift_justin_hammer.sql +20 -0
- package/dist/migrations/0222_orphan_cleanup_env_reference_survives_delete.sql +4 -0
- package/dist/migrations/0223_robust_zaladane.sql +6 -0
- package/dist/migrations/0224_unified_adapter_auth_sessions.sql +18 -0
- package/dist/migrations/0225_drop_claude_setup_token_sessions.sql +5 -0
- package/dist/migrations/0226_tan_colossus.sql +2 -0
- package/dist/migrations/0227_modern_pandemic.sql +410 -0
- package/dist/migrations/0228_nasty_grim_reaper.sql +59 -0
- package/dist/migrations/0229_drop_company_brand_color_and_attachment_max_bytes.sql +7 -0
- package/dist/migrations/0230_better_auth_account_issuer.sql +23 -0
- package/dist/migrations/0231_remove_app_connection_wide_includes.sql +10 -0
- package/dist/migrations/0232_fixed_hannibal_king.sql +202 -0
- package/dist/migrations/0233_living_dreaming_celestial.sql +13 -0
- package/dist/migrations/0234_provider_trace_records.sql +31 -0
- package/dist/migrations/0235_heartbeat_run_event_sequence_uniqueness.sql +28 -0
- package/dist/migrations/0236_remove_cheap_model_profiles.sql +108 -0
- package/dist/migrations/0237_clammy_colonel_america.sql +52 -0
- package/dist/migrations/0238_graceful_infant_terrible.sql +7 -0
- package/dist/migrations/0239_sturdy_santa_claus.sql +38 -0
- package/dist/migrations/0240_pink_fantastic_four.sql +25 -0
- package/dist/migrations/0241_conscious_adam_destine.sql +1 -0
- package/dist/migrations/0242_wide_lightspeed.sql +1 -0
- package/dist/migrations/0243_sleepy_metal_master.sql +1 -0
- package/dist/migrations/0244_organic_meltdown.sql +1 -0
- package/dist/migrations/0245_misty_nightshade.sql +3 -0
- package/dist/migrations/0246_nostalgic_medusa.sql +19 -0
- package/dist/migrations/0247_even_moon_knight.sql +2 -0
- package/dist/migrations/0248_small_manta.sql +36 -0
- package/dist/migrations/0249_fast_silverclaw.sql +33 -0
- package/dist/migrations/0250_exotic_dakota_north.sql +2 -0
- package/dist/migrations/0251_narrow_mastermind.sql +1 -0
- package/dist/migrations/0252_friendly_kate_bishop.sql +1 -0
- package/dist/migrations/0253_real_firebrand.sql +1 -0
- package/dist/migrations/0254_military_calypso.sql +3 -0
- package/dist/migrations/0255_previous_captain_america.sql +290 -0
- package/dist/migrations/0256_married_king_cobra.sql +3 -0
- package/dist/migrations/0257_bizarre_the_hunter.sql +8 -0
- package/dist/migrations/0258_typical_sauron.sql +2 -0
- package/dist/migrations/0259_tan_chat.sql +1 -0
- package/dist/migrations/0260_chat_interaction_wakeup_idempotency.sql +106 -0
- package/dist/migrations/0261_faulty_iceman.sql +4 -0
- package/dist/migrations/0262_lying_avengers.sql +3 -0
- package/dist/migrations/0263_nebulous_iron_lad.sql +3 -0
- package/dist/migrations/0264_cynical_hellcat.sql +3 -0
- package/dist/migrations/0265_chat_interaction_wakeup_provenance.sql +80 -0
- package/dist/migrations/0266_brave_living_mummy.sql +56 -0
- package/dist/migrations/0267_warm_wild_child.sql +8 -0
- package/dist/migrations/0268_lively_runaways.sql +1 -0
- package/dist/migrations/0269_fearless_young_avengers.sql +15 -0
- package/dist/migrations/0270_harsh_queen_noir.sql +12 -0
- package/dist/migrations/0271_woozy_silver_surfer.sql +1 -0
- package/dist/migrations/0272_light_kate_bishop.sql +98 -0
- package/dist/migrations/0273_aromatic_moondragon.sql +3 -0
- package/dist/migrations/0274_agent_chat.sql +33 -0
- package/dist/migrations/0275_easy_dragon_man.sql +5 -0
- package/dist/migrations/0276_hard_mandroid.sql +77 -0
- package/dist/migrations/0277_uneven_lady_deathstrike.sql +47 -0
- package/dist/migrations/0278_nappy_colonel_america.sql +6 -0
- package/dist/migrations/0279_tired_deathstrike.sql +3 -0
- package/dist/migrations/0280_unique_genesis.sql +11 -0
- package/dist/migrations/0281_true_boom_boom.sql +14 -0
- package/dist/migrations/0282_colossal_shocker.sql +2 -0
- package/dist/migrations/0283_jittery_psynapse.sql +81 -0
- package/dist/migrations/meta/_journal.json +1980 -0
- package/dist/native-runner-recovery-migration.test.d.ts +2 -0
- package/dist/native-runner-recovery-migration.test.d.ts.map +1 -0
- package/dist/native-runner-recovery-migration.test.js +121 -0
- package/dist/native-runner-recovery-migration.test.js.map +1 -0
- package/dist/nested-skill-folders-migration.test.d.ts +2 -0
- package/dist/nested-skill-folders-migration.test.d.ts.map +1 -0
- package/dist/nested-skill-folders-migration.test.js +106 -0
- package/dist/nested-skill-folders-migration.test.js.map +1 -0
- package/dist/pipelines-schema.test.d.ts +2 -0
- package/dist/pipelines-schema.test.d.ts.map +1 -0
- package/dist/pipelines-schema.test.js +205 -0
- package/dist/pipelines-schema.test.js.map +1 -0
- package/dist/postgres-connection-recovery.test.d.ts +2 -0
- package/dist/postgres-connection-recovery.test.d.ts.map +1 -0
- package/dist/postgres-connection-recovery.test.js +35 -0
- package/dist/postgres-connection-recovery.test.js.map +1 -0
- package/dist/question-response-delivery-migration.test.d.ts +2 -0
- package/dist/question-response-delivery-migration.test.d.ts.map +1 -0
- package/dist/question-response-delivery-migration.test.js +62 -0
- package/dist/question-response-delivery-migration.test.js.map +1 -0
- package/dist/run-event-payload.d.ts +30 -0
- package/dist/run-event-payload.d.ts.map +1 -0
- package/dist/run-event-payload.js +57 -0
- package/dist/run-event-payload.js.map +1 -0
- package/dist/run-event-payload.test.d.ts +2 -0
- package/dist/run-event-payload.test.d.ts.map +1 -0
- package/dist/run-event-payload.test.js +46 -0
- package/dist/run-event-payload.test.js.map +1 -0
- package/dist/run-identity-migration.test.d.ts +2 -0
- package/dist/run-identity-migration.test.d.ts.map +1 -0
- package/dist/run-identity-migration.test.js +60 -0
- package/dist/run-identity-migration.test.js.map +1 -0
- package/dist/runtime-config.d.ts +16 -0
- package/dist/runtime-config.d.ts.map +1 -0
- package/dist/runtime-config.js +168 -0
- package/dist/runtime-config.js.map +1 -0
- package/dist/runtime-config.test.d.ts +2 -0
- package/dist/runtime-config.test.d.ts.map +1 -0
- package/dist/runtime-config.test.js +111 -0
- package/dist/runtime-config.test.js.map +1 -0
- package/dist/schema/activity_log.d.ts +214 -0
- package/dist/schema/activity_log.d.ts.map +1 -0
- package/dist/schema/activity_log.js +25 -0
- package/dist/schema/activity_log.js.map +1 -0
- package/dist/schema/adapter_auth_sessions.d.ts +377 -0
- package/dist/schema/adapter_auth_sessions.d.ts.map +1 -0
- package/dist/schema/adapter_auth_sessions.js +88 -0
- package/dist/schema/adapter_auth_sessions.js.map +1 -0
- package/dist/schema/agent_api_keys.d.ts +204 -0
- package/dist/schema/agent_api_keys.d.ts.map +1 -0
- package/dist/schema/agent_api_keys.js +19 -0
- package/dist/schema/agent_api_keys.js.map +1 -0
- package/dist/schema/agent_config_revisions.d.ts +201 -0
- package/dist/schema/agent_config_revisions.d.ts.map +1 -0
- package/dist/schema/agent_config_revisions.js +20 -0
- package/dist/schema/agent_config_revisions.js.map +1 -0
- package/dist/schema/agent_memberships.d.ts +144 -0
- package/dist/schema/agent_memberships.d.ts.map +1 -0
- package/dist/schema/agent_memberships.js +19 -0
- package/dist/schema/agent_memberships.js.map +1 -0
- package/dist/schema/agent_runtime_state.d.ts +248 -0
- package/dist/schema/agent_runtime_state.d.ts.map +1 -0
- package/dist/schema/agent_runtime_state.js +23 -0
- package/dist/schema/agent_runtime_state.js.map +1 -0
- package/dist/schema/agent_task_sessions.d.ts +569 -0
- package/dist/schema/agent_task_sessions.d.ts.map +1 -0
- package/dist/schema/agent_task_sessions.js +51 -0
- package/dist/schema/agent_task_sessions.js.map +1 -0
- package/dist/schema/agent_wakeup_requests.d.ts +333 -0
- package/dist/schema/agent_wakeup_requests.d.ts.map +1 -0
- package/dist/schema/agent_wakeup_requests.js +56 -0
- package/dist/schema/agent_wakeup_requests.js.map +1 -0
- package/dist/schema/agents.d.ts +434 -0
- package/dist/schema/agents.d.ts.map +1 -0
- package/dist/schema/agents.js +35 -0
- package/dist/schema/agents.js.map +1 -0
- package/dist/schema/ai_connection_defaults.d.ts +132 -0
- package/dist/schema/ai_connection_defaults.d.ts.map +1 -0
- package/dist/schema/ai_connection_defaults.js +28 -0
- package/dist/schema/ai_connection_defaults.js.map +1 -0
- package/dist/schema/ai_provider_defaults.d.ts +114 -0
- package/dist/schema/ai_provider_defaults.d.ts.map +1 -0
- package/dist/schema/ai_provider_defaults.js +19 -0
- package/dist/schema/ai_provider_defaults.js.map +1 -0
- package/dist/schema/announcement_dismissals.d.ts +83 -0
- package/dist/schema/announcement_dismissals.d.ts.map +1 -0
- package/dist/schema/announcement_dismissals.js +15 -0
- package/dist/schema/announcement_dismissals.js.map +1 -0
- package/dist/schema/approval_comments.d.ts +144 -0
- package/dist/schema/approval_comments.d.ts.map +1 -0
- package/dist/schema/approval_comments.js +19 -0
- package/dist/schema/approval_comments.js.map +1 -0
- package/dist/schema/approvals.d.ts +214 -0
- package/dist/schema/approvals.d.ts.map +1 -0
- package/dist/schema/approvals.js +20 -0
- package/dist/schema/approvals.js.map +1 -0
- package/dist/schema/assets.d.ts +212 -0
- package/dist/schema/assets.d.ts.map +1 -0
- package/dist/schema/assets.js +22 -0
- package/dist/schema/assets.js.map +1 -0
- package/dist/schema/auth.d.ts +638 -0
- package/dist/schema/auth.d.ts.map +1 -0
- package/dist/schema/auth.js +61 -0
- package/dist/schema/auth.js.map +1 -0
- package/dist/schema/board_api_keys.d.ts +144 -0
- package/dist/schema/board_api_keys.d.ts.map +1 -0
- package/dist/schema/board_api_keys.js +16 -0
- package/dist/schema/board_api_keys.js.map +1 -0
- package/dist/schema/budget_incidents.d.ts +297 -0
- package/dist/schema/budget_incidents.d.ts.map +1 -0
- package/dist/schema/budget_incidents.js +29 -0
- package/dist/schema/budget_incidents.js.map +1 -0
- package/dist/schema/budget_policies.d.ts +263 -0
- package/dist/schema/budget_policies.d.ts.map +1 -0
- package/dist/schema/budget_policies.js +24 -0
- package/dist/schema/budget_policies.js.map +1 -0
- package/dist/schema/built_in_managed_resources.d.ts +197 -0
- package/dist/schema/built_in_managed_resources.d.ts.map +1 -0
- package/dist/schema/built_in_managed_resources.js +22 -0
- package/dist/schema/built_in_managed_resources.js.map +1 -0
- package/dist/schema/cases.d.ts +982 -0
- package/dist/schema/cases.d.ts.map +1 -0
- package/dist/schema/cases.js +122 -0
- package/dist/schema/cases.js.map +1 -0
- package/dist/schema/chat_channels.d.ts +3035 -0
- package/dist/schema/chat_channels.d.ts.map +1 -0
- package/dist/schema/chat_channels.js +605 -0
- package/dist/schema/chat_channels.js.map +1 -0
- package/dist/schema/chat_discord_command_owners.d.ts +93 -0
- package/dist/schema/chat_discord_command_owners.d.ts.map +1 -0
- package/dist/schema/chat_discord_command_owners.js +19 -0
- package/dist/schema/chat_discord_command_owners.js.map +1 -0
- package/dist/schema/chat_github.d.ts +730 -0
- package/dist/schema/chat_github.d.ts.map +1 -0
- package/dist/schema/chat_github.js +110 -0
- package/dist/schema/chat_github.js.map +1 -0
- package/dist/schema/chat_teams_file_transfers.d.ts +639 -0
- package/dist/schema/chat_teams_file_transfers.d.ts.map +1 -0
- package/dist/schema/chat_teams_file_transfers.js +86 -0
- package/dist/schema/chat_teams_file_transfers.js.map +1 -0
- package/dist/schema/chat_telegram_draft_ids.d.ts +2 -0
- package/dist/schema/chat_telegram_draft_ids.d.ts.map +1 -0
- package/dist/schema/chat_telegram_draft_ids.js +14 -0
- package/dist/schema/chat_telegram_draft_ids.js.map +1 -0
- package/dist/schema/cli_auth_challenges.d.ts +263 -0
- package/dist/schema/cli_auth_challenges.d.ts.map +1 -0
- package/dist/schema/cli_auth_challenges.js +26 -0
- package/dist/schema/cli_auth_challenges.js.map +1 -0
- package/dist/schema/companies.d.ts +333 -0
- package/dist/schema/companies.d.ts.map +1 -0
- package/dist/schema/companies.js +32 -0
- package/dist/schema/companies.js.map +1 -0
- package/dist/schema/company_logos.d.ts +93 -0
- package/dist/schema/company_logos.d.ts.map +1 -0
- package/dist/schema/company_logos.js +14 -0
- package/dist/schema/company_logos.js.map +1 -0
- package/dist/schema/company_memberships.d.ts +144 -0
- package/dist/schema/company_memberships.d.ts.map +1 -0
- package/dist/schema/company_memberships.js +17 -0
- package/dist/schema/company_memberships.js.map +1 -0
- package/dist/schema/company_onboarding_seeds.d.ts +257 -0
- package/dist/schema/company_onboarding_seeds.d.ts.map +1 -0
- package/dist/schema/company_onboarding_seeds.js +35 -0
- package/dist/schema/company_onboarding_seeds.js.map +1 -0
- package/dist/schema/company_secret_bindings.d.ts +229 -0
- package/dist/schema/company_secret_bindings.d.ts.map +1 -0
- package/dist/schema/company_secret_bindings.js +24 -0
- package/dist/schema/company_secret_bindings.js.map +1 -0
- package/dist/schema/company_secret_proposals.d.ts +575 -0
- package/dist/schema/company_secret_proposals.d.ts.map +1 -0
- package/dist/schema/company_secret_proposals.js +69 -0
- package/dist/schema/company_secret_proposals.js.map +1 -0
- package/dist/schema/company_secret_provider_configs.d.ts +284 -0
- package/dist/schema/company_secret_provider_configs.d.ts.map +1 -0
- package/dist/schema/company_secret_provider_configs.js +29 -0
- package/dist/schema/company_secret_provider_configs.js.map +1 -0
- package/dist/schema/company_secret_versions.d.ts +231 -0
- package/dist/schema/company_secret_versions.d.ts.map +1 -0
- package/dist/schema/company_secret_versions.js +24 -0
- package/dist/schema/company_secret_versions.js.map +1 -0
- package/dist/schema/company_secrets.d.ts +384 -0
- package/dist/schema/company_secrets.d.ts.map +1 -0
- package/dist/schema/company_secrets.js +56 -0
- package/dist/schema/company_secrets.js.map +1 -0
- package/dist/schema/company_skill_policies.d.ts +131 -0
- package/dist/schema/company_skill_policies.d.ts.map +1 -0
- package/dist/schema/company_skill_policies.js +12 -0
- package/dist/schema/company_skill_policies.js.map +1 -0
- package/dist/schema/company_skills.d.ts +1858 -0
- package/dist/schema/company_skills.d.ts.map +1 -0
- package/dist/schema/company_skills.js +157 -0
- package/dist/schema/company_skills.js.map +1 -0
- package/dist/schema/company_transfer_runs.d.ts +297 -0
- package/dist/schema/company_transfer_runs.d.ts.map +1 -0
- package/dist/schema/company_transfer_runs.js +42 -0
- package/dist/schema/company_transfer_runs.js.map +1 -0
- package/dist/schema/company_user_sidebar_preferences.d.ts +112 -0
- package/dist/schema/company_user_sidebar_preferences.d.ts.map +1 -0
- package/dist/schema/company_user_sidebar_preferences.js +15 -0
- package/dist/schema/company_user_sidebar_preferences.js.map +1 -0
- package/dist/schema/completion_contracts.d.ts +265 -0
- package/dist/schema/completion_contracts.d.ts.map +1 -0
- package/dist/schema/completion_contracts.js +35 -0
- package/dist/schema/completion_contracts.js.map +1 -0
- package/dist/schema/connection_event_deliveries.d.ts +291 -0
- package/dist/schema/connection_event_deliveries.d.ts.map +1 -0
- package/dist/schema/connection_event_deliveries.js +31 -0
- package/dist/schema/connection_event_deliveries.js.map +1 -0
- package/dist/schema/connection_intent_deliveries.d.ts +94 -0
- package/dist/schema/connection_intent_deliveries.d.ts.map +1 -0
- package/dist/schema/connection_intent_deliveries.js +12 -0
- package/dist/schema/connection_intent_deliveries.js.map +1 -0
- package/dist/schema/cost_events.d.ts +331 -0
- package/dist/schema/cost_events.d.ts.map +1 -0
- package/dist/schema/cost_events.js +35 -0
- package/dist/schema/cost_events.js.map +1 -0
- package/dist/schema/decision_queues.d.ts +1510 -0
- package/dist/schema/decision_queues.d.ts.map +1 -0
- package/dist/schema/decision_queues.js +161 -0
- package/dist/schema/decision_queues.js.map +1 -0
- package/dist/schema/decision_training_examples.d.ts +255 -0
- package/dist/schema/decision_training_examples.d.ts.map +1 -0
- package/dist/schema/decision_training_examples.js +27 -0
- package/dist/schema/decision_training_examples.js.map +1 -0
- package/dist/schema/decisions.d.ts +824 -0
- package/dist/schema/decisions.d.ts.map +1 -0
- package/dist/schema/decisions.js +78 -0
- package/dist/schema/decisions.js.map +1 -0
- package/dist/schema/document_annotation_anchor_snapshots.d.ts +255 -0
- package/dist/schema/document_annotation_anchor_snapshots.d.ts.map +1 -0
- package/dist/schema/document_annotation_anchor_snapshots.js +25 -0
- package/dist/schema/document_annotation_anchor_snapshots.js.map +1 -0
- package/dist/schema/document_annotation_comments.d.ts +285 -0
- package/dist/schema/document_annotation_comments.d.ts.map +1 -0
- package/dist/schema/document_annotation_comments.js +39 -0
- package/dist/schema/document_annotation_comments.js.map +1 -0
- package/dist/schema/document_annotation_threads.d.ts +510 -0
- package/dist/schema/document_annotation_threads.d.ts.map +1 -0
- package/dist/schema/document_annotation_threads.js +52 -0
- package/dist/schema/document_annotation_threads.js.map +1 -0
- package/dist/schema/document_memberships.d.ts +127 -0
- package/dist/schema/document_memberships.d.ts.map +1 -0
- package/dist/schema/document_memberships.js +16 -0
- package/dist/schema/document_memberships.js.map +1 -0
- package/dist/schema/document_revisions.d.ts +212 -0
- package/dist/schema/document_revisions.d.ts.map +1 -0
- package/dist/schema/document_revisions.js +23 -0
- package/dist/schema/document_revisions.js.map +1 -0
- package/dist/schema/documents.d.ts +300 -0
- package/dist/schema/documents.d.ts.map +1 -0
- package/dist/schema/documents.js +28 -0
- package/dist/schema/documents.js.map +1 -0
- package/dist/schema/email.d.ts +550 -0
- package/dist/schema/email.d.ts.map +1 -0
- package/dist/schema/email.js +80 -0
- package/dist/schema/email.js.map +1 -0
- package/dist/schema/environment_custom_image_setup_sessions.d.ts +351 -0
- package/dist/schema/environment_custom_image_setup_sessions.d.ts.map +1 -0
- package/dist/schema/environment_custom_image_setup_sessions.js +39 -0
- package/dist/schema/environment_custom_image_setup_sessions.js.map +1 -0
- package/dist/schema/environment_custom_image_templates.d.ts +284 -0
- package/dist/schema/environment_custom_image_templates.d.ts.map +1 -0
- package/dist/schema/environment_custom_image_templates.js +32 -0
- package/dist/schema/environment_custom_image_templates.js.map +1 -0
- package/dist/schema/environment_leases.d.ts +333 -0
- package/dist/schema/environment_leases.d.ts.map +1 -0
- package/dist/schema/environment_leases.js +42 -0
- package/dist/schema/environment_leases.js.map +1 -0
- package/dist/schema/environments.d.ts +184 -0
- package/dist/schema/environments.d.ts.map +1 -0
- package/dist/schema/environments.js +24 -0
- package/dist/schema/environments.js.map +1 -0
- package/dist/schema/execution_workspace_runtime_leases.d.ts +248 -0
- package/dist/schema/execution_workspace_runtime_leases.d.ts.map +1 -0
- package/dist/schema/execution_workspace_runtime_leases.js +35 -0
- package/dist/schema/execution_workspace_runtime_leases.js.map +1 -0
- package/dist/schema/execution_workspaces.d.ts +418 -0
- package/dist/schema/execution_workspaces.d.ts.map +1 -0
- package/dist/schema/execution_workspaces.js +39 -0
- package/dist/schema/execution_workspaces.js.map +1 -0
- package/dist/schema/external_object_mentions.d.ts +337 -0
- package/dist/schema/external_object_mentions.d.ts.map +1 -0
- package/dist/schema/external_object_mentions.js +34 -0
- package/dist/schema/external_object_mentions.js.map +1 -0
- package/dist/schema/external_objects.d.ts +543 -0
- package/dist/schema/external_objects.d.ts.map +1 -0
- package/dist/schema/external_objects.js +43 -0
- package/dist/schema/external_objects.js.map +1 -0
- package/dist/schema/feedback_exports.d.ts +450 -0
- package/dist/schema/feedback_exports.d.ts.map +1 -0
- package/dist/schema/feedback_exports.js +41 -0
- package/dist/schema/feedback_exports.js.map +1 -0
- package/dist/schema/feedback_votes.d.ts +246 -0
- package/dist/schema/feedback_votes.d.ts.map +1 -0
- package/dist/schema/feedback_votes.js +25 -0
- package/dist/schema/feedback_votes.js.map +1 -0
- package/dist/schema/finance_events.d.ts +469 -0
- package/dist/schema/finance_events.d.ts.map +1 -0
- package/dist/schema/finance_events.js +45 -0
- package/dist/schema/finance_events.js.map +1 -0
- package/dist/schema/folders.d.ts +198 -0
- package/dist/schema/folders.d.ts.map +1 -0
- package/dist/schema/folders.js +29 -0
- package/dist/schema/folders.js.map +1 -0
- package/dist/schema/goals.d.ts +178 -0
- package/dist/schema/goals.d.ts.map +1 -0
- package/dist/schema/goals.js +18 -0
- package/dist/schema/goals.js.map +1 -0
- package/dist/schema/heartbeat_run_events.d.ts +299 -0
- package/dist/schema/heartbeat_run_events.d.ts.map +1 -0
- package/dist/schema/heartbeat_run_events.js +36 -0
- package/dist/schema/heartbeat_run_events.js.map +1 -0
- package/dist/schema/heartbeat_run_watchdog_decisions.d.ts +195 -0
- package/dist/schema/heartbeat_run_watchdog_decisions.d.ts.map +1 -0
- package/dist/schema/heartbeat_run_watchdog_decisions.js +22 -0
- package/dist/schema/heartbeat_run_watchdog_decisions.js.map +1 -0
- package/dist/schema/heartbeat_runs.d.ts +1206 -0
- package/dist/schema/heartbeat_runs.d.ts.map +1 -0
- package/dist/schema/heartbeat_runs.js +103 -0
- package/dist/schema/heartbeat_runs.js.map +1 -0
- package/dist/schema/inbox_dismissals.d.ts +163 -0
- package/dist/schema/inbox_dismissals.d.ts.map +1 -0
- package/dist/schema/inbox_dismissals.js +18 -0
- package/dist/schema/inbox_dismissals.js.map +1 -0
- package/dist/schema/index.d.ts +138 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +138 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/instance_settings.d.ts +131 -0
- package/dist/schema/instance_settings.d.ts.map +1 -0
- package/dist/schema/instance_settings.js +14 -0
- package/dist/schema/instance_settings.js.map +1 -0
- package/dist/schema/instance_user_roles.d.ts +93 -0
- package/dist/schema/instance_user_roles.d.ts.map +1 -0
- package/dist/schema/instance_user_roles.js +12 -0
- package/dist/schema/instance_user_roles.js.map +1 -0
- package/dist/schema/invites.d.ts +214 -0
- package/dist/schema/invites.d.ts.map +1 -0
- package/dist/schema/invites.js +20 -0
- package/dist/schema/invites.js.map +1 -0
- package/dist/schema/issue_approvals.d.ts +110 -0
- package/dist/schema/issue_approvals.d.ts.map +1 -0
- package/dist/schema/issue_approvals.js +19 -0
- package/dist/schema/issue_approvals.js.map +1 -0
- package/dist/schema/issue_attachments.d.ts +144 -0
- package/dist/schema/issue_attachments.d.ts.map +1 -0
- package/dist/schema/issue_attachments.js +24 -0
- package/dist/schema/issue_attachments.js.map +1 -0
- package/dist/schema/issue_comments.d.ts +429 -0
- package/dist/schema/issue_comments.d.ts.map +1 -0
- package/dist/schema/issue_comments.js +45 -0
- package/dist/schema/issue_comments.js.map +1 -0
- package/dist/schema/issue_create_idempotency_keys.d.ts +93 -0
- package/dist/schema/issue_create_idempotency_keys.d.ts.map +1 -0
- package/dist/schema/issue_create_idempotency_keys.js +15 -0
- package/dist/schema/issue_create_idempotency_keys.js.map +1 -0
- package/dist/schema/issue_documents.d.ts +127 -0
- package/dist/schema/issue_documents.d.ts.map +1 -0
- package/dist/schema/issue_documents.js +18 -0
- package/dist/schema/issue_documents.js.map +1 -0
- package/dist/schema/issue_execution_decisions.d.ts +212 -0
- package/dist/schema/issue_execution_decisions.d.ts.map +1 -0
- package/dist/schema/issue_execution_decisions.js +23 -0
- package/dist/schema/issue_execution_decisions.js.map +1 -0
- package/dist/schema/issue_inbox_archives.d.ts +180 -0
- package/dist/schema/issue_inbox_archives.d.ts.map +1 -0
- package/dist/schema/issue_inbox_archives.js +25 -0
- package/dist/schema/issue_inbox_archives.js.map +1 -0
- package/dist/schema/issue_labels.d.ts +76 -0
- package/dist/schema/issue_labels.d.ts.map +1 -0
- package/dist/schema/issue_labels.js +16 -0
- package/dist/schema/issue_labels.js.map +1 -0
- package/dist/schema/issue_plan_decompositions.d.ts +284 -0
- package/dist/schema/issue_plan_decompositions.d.ts.map +1 -0
- package/dist/schema/issue_plan_decompositions.js +36 -0
- package/dist/schema/issue_plan_decompositions.js.map +1 -0
- package/dist/schema/issue_question_response_deliveries.d.ts +320 -0
- package/dist/schema/issue_question_response_deliveries.d.ts.map +1 -0
- package/dist/schema/issue_question_response_deliveries.js +42 -0
- package/dist/schema/issue_question_response_deliveries.js.map +1 -0
- package/dist/schema/issue_read_states.d.ts +127 -0
- package/dist/schema/issue_read_states.d.ts.map +1 -0
- package/dist/schema/issue_read_states.js +17 -0
- package/dist/schema/issue_read_states.js.map +1 -0
- package/dist/schema/issue_recovery_actions.d.ts +456 -0
- package/dist/schema/issue_recovery_actions.d.ts.map +1 -0
- package/dist/schema/issue_recovery_actions.js +44 -0
- package/dist/schema/issue_recovery_actions.js.map +1 -0
- package/dist/schema/issue_reference_mentions.d.ts +180 -0
- package/dist/schema/issue_reference_mentions.d.ts.map +1 -0
- package/dist/schema/issue_reference_mentions.js +23 -0
- package/dist/schema/issue_reference_mentions.js.map +1 -0
- package/dist/schema/issue_relations.d.ts +163 -0
- package/dist/schema/issue_relations.d.ts.map +1 -0
- package/dist/schema/issue_relations.js +21 -0
- package/dist/schema/issue_relations.js.map +1 -0
- package/dist/schema/issue_thread_interactions.d.ts +516 -0
- package/dist/schema/issue_thread_interactions.d.ts.map +1 -0
- package/dist/schema/issue_thread_interactions.js +61 -0
- package/dist/schema/issue_thread_interactions.js.map +1 -0
- package/dist/schema/issue_tree_hold_members.d.ts +280 -0
- package/dist/schema/issue_tree_hold_members.d.ts.map +1 -0
- package/dist/schema/issue_tree_hold_members.js +29 -0
- package/dist/schema/issue_tree_hold_members.js.map +1 -0
- package/dist/schema/issue_tree_holds.d.ts +352 -0
- package/dist/schema/issue_tree_holds.d.ts.map +1 -0
- package/dist/schema/issue_tree_holds.js +31 -0
- package/dist/schema/issue_tree_holds.js.map +1 -0
- package/dist/schema/issue_watchdogs.d.ts +382 -0
- package/dist/schema/issue_watchdogs.d.ts.map +1 -0
- package/dist/schema/issue_watchdogs.js +38 -0
- package/dist/schema/issue_watchdogs.js.map +1 -0
- package/dist/schema/issue_work_products.d.ts +370 -0
- package/dist/schema/issue_work_products.d.ts.map +1 -0
- package/dist/schema/issue_work_products.js +38 -0
- package/dist/schema/issue_work_products.js.map +1 -0
- package/dist/schema/issues.d.ts +1062 -0
- package/dist/schema/issues.d.ts.map +1 -0
- package/dist/schema/issues.js +158 -0
- package/dist/schema/issues.js.map +1 -0
- package/dist/schema/join_requests.d.ts +384 -0
- package/dist/schema/join_requests.d.ts.map +1 -0
- package/dist/schema/join_requests.js +39 -0
- package/dist/schema/join_requests.js.map +1 -0
- package/dist/schema/labels.d.ts +110 -0
- package/dist/schema/labels.d.ts.map +1 -0
- package/dist/schema/labels.js +14 -0
- package/dist/schema/labels.js.map +1 -0
- package/dist/schema/managed_agent_profiles.d.ts +339 -0
- package/dist/schema/managed_agent_profiles.d.ts.map +1 -0
- package/dist/schema/managed_agent_profiles.js +44 -0
- package/dist/schema/managed_agent_profiles.js.map +1 -0
- package/dist/schema/native_run_finalizations.d.ts +403 -0
- package/dist/schema/native_run_finalizations.d.ts.map +1 -0
- package/dist/schema/native_run_finalizations.js +91 -0
- package/dist/schema/native_run_finalizations.js.map +1 -0
- package/dist/schema/native_run_results.d.ts +248 -0
- package/dist/schema/native_run_results.d.ts.map +1 -0
- package/dist/schema/native_run_results.js +56 -0
- package/dist/schema/native_run_results.js.map +1 -0
- package/dist/schema/pipeline_case_events.d.ts +231 -0
- package/dist/schema/pipeline_case_events.d.ts.map +1 -0
- package/dist/schema/pipeline_case_events.js +52 -0
- package/dist/schema/pipeline_case_events.js.map +1 -0
- package/dist/schema/pipeline_cases.d.ts +1388 -0
- package/dist/schema/pipeline_cases.d.ts.map +1 -0
- package/dist/schema/pipeline_cases.js +138 -0
- package/dist/schema/pipeline_cases.js.map +1 -0
- package/dist/schema/pipelines.d.ts +500 -0
- package/dist/schema/pipelines.d.ts.map +1 -0
- package/dist/schema/pipelines.js +52 -0
- package/dist/schema/pipelines.js.map +1 -0
- package/dist/schema/plugin_company_settings.d.ts +159 -0
- package/dist/schema/plugin_company_settings.d.ts.map +1 -0
- package/dist/schema/plugin_company_settings.js +35 -0
- package/dist/schema/plugin_company_settings.js.map +1 -0
- package/dist/schema/plugin_config.d.ts +139 -0
- package/dist/schema/plugin_config.d.ts.map +1 -0
- package/dist/schema/plugin_config.js +29 -0
- package/dist/schema/plugin_config.js.map +1 -0
- package/dist/schema/plugin_database.d.ts +357 -0
- package/dist/schema/plugin_database.d.ts.map +1 -0
- package/dist/schema/plugin_database.js +51 -0
- package/dist/schema/plugin_database.js.map +1 -0
- package/dist/schema/plugin_entities.d.ts +230 -0
- package/dist/schema/plugin_entities.d.ts.map +1 -0
- package/dist/schema/plugin_entities.js +52 -0
- package/dist/schema/plugin_entities.js.map +1 -0
- package/dist/schema/plugin_jobs.d.ts +409 -0
- package/dist/schema/plugin_jobs.d.ts.map +1 -0
- package/dist/schema/plugin_jobs.js +87 -0
- package/dist/schema/plugin_jobs.js.map +1 -0
- package/dist/schema/plugin_logs.d.ts +142 -0
- package/dist/schema/plugin_logs.d.ts.map +1 -0
- package/dist/schema/plugin_logs.js +33 -0
- package/dist/schema/plugin_logs.js.map +1 -0
- package/dist/schema/plugin_managed_resources.d.ts +180 -0
- package/dist/schema/plugin_managed_resources.d.ts.map +1 -0
- package/dist/schema/plugin_managed_resources.js +25 -0
- package/dist/schema/plugin_managed_resources.js.map +1 -0
- package/dist/schema/plugin_state.d.ts +169 -0
- package/dist/schema/plugin_state.d.ts.map +1 -0
- package/dist/schema/plugin_state.js +68 -0
- package/dist/schema/plugin_state.js.map +1 -0
- package/dist/schema/plugin_webhooks.d.ts +256 -0
- package/dist/schema/plugin_webhooks.d.ts.map +1 -0
- package/dist/schema/plugin_webhooks.js +56 -0
- package/dist/schema/plugin_webhooks.js.map +1 -0
- package/dist/schema/plugins.d.ts +246 -0
- package/dist/schema/plugins.d.ts.map +1 -0
- package/dist/schema/plugins.js +31 -0
- package/dist/schema/plugins.js.map +1 -0
- package/dist/schema/principal_permission_grants.d.ts +163 -0
- package/dist/schema/principal_permission_grants.d.ts.map +1 -0
- package/dist/schema/principal_permission_grants.js +17 -0
- package/dist/schema/principal_permission_grants.js.map +1 -0
- package/dist/schema/project_goals.d.ts +93 -0
- package/dist/schema/project_goals.d.ts.map +1 -0
- package/dist/schema/project_goals.js +17 -0
- package/dist/schema/project_goals.js.map +1 -0
- package/dist/schema/project_memberships.d.ts +144 -0
- package/dist/schema/project_memberships.d.ts.map +1 -0
- package/dist/schema/project_memberships.js +19 -0
- package/dist/schema/project_memberships.js.map +1 -0
- package/dist/schema/project_workspaces.d.ts +333 -0
- package/dist/schema/project_workspaces.d.ts.map +1 -0
- package/dist/schema/project_workspaces.js +32 -0
- package/dist/schema/project_workspaces.js.map +1 -0
- package/dist/schema/projects.d.ts +302 -0
- package/dist/schema/projects.d.ts.map +1 -0
- package/dist/schema/projects.js +26 -0
- package/dist/schema/projects.js.map +1 -0
- package/dist/schema/provider_trace_records.d.ts +264 -0
- package/dist/schema/provider_trace_records.d.ts.map +1 -0
- package/dist/schema/provider_trace_records.js +34 -0
- package/dist/schema/provider_trace_records.js.map +1 -0
- package/dist/schema/remote_agent_profiles.d.ts +238 -0
- package/dist/schema/remote_agent_profiles.d.ts.map +1 -0
- package/dist/schema/remote_agent_profiles.js +31 -0
- package/dist/schema/remote_agent_profiles.js.map +1 -0
- package/dist/schema/routine_documents.d.ts +127 -0
- package/dist/schema/routine_documents.d.ts.map +1 -0
- package/dist/schema/routine_documents.js +18 -0
- package/dist/schema/routine_documents.js.map +1 -0
- package/dist/schema/routines.d.ts +1611 -0
- package/dist/schema/routines.d.ts.map +1 -0
- package/dist/schema/routines.js +140 -0
- package/dist/schema/routines.js.map +1 -0
- package/dist/schema/run_identity_contexts.d.ts +248 -0
- package/dist/schema/run_identity_contexts.d.ts.map +1 -0
- package/dist/schema/run_identity_contexts.js +29 -0
- package/dist/schema/run_identity_contexts.js.map +1 -0
- package/dist/schema/secret_access_events.d.ts +382 -0
- package/dist/schema/secret_access_events.d.ts.map +1 -0
- package/dist/schema/secret_access_events.js +39 -0
- package/dist/schema/secret_access_events.js.map +1 -0
- package/dist/schema/smoke_lab.d.ts +367 -0
- package/dist/schema/smoke_lab.d.ts.map +1 -0
- package/dist/schema/smoke_lab.js +33 -0
- package/dist/schema/smoke_lab.js.map +1 -0
- package/dist/schema/status_cards.d.ts +949 -0
- package/dist/schema/status_cards.d.ts.map +1 -0
- package/dist/schema/status_cards.js +70 -0
- package/dist/schema/status_cards.js.map +1 -0
- package/dist/schema/status_decision_effects.d.ts +299 -0
- package/dist/schema/status_decision_effects.d.ts.map +1 -0
- package/dist/schema/status_decision_effects.js +37 -0
- package/dist/schema/status_decision_effects.js.map +1 -0
- package/dist/schema/status_decisions.d.ts +282 -0
- package/dist/schema/status_decisions.d.ts.map +1 -0
- package/dist/schema/status_decisions.js +49 -0
- package/dist/schema/status_decisions.js.map +1 -0
- package/dist/schema/summary_slots.d.ts +252 -0
- package/dist/schema/summary_slots.d.ts.map +1 -0
- package/dist/schema/summary_slots.js +32 -0
- package/dist/schema/summary_slots.js.map +1 -0
- package/dist/schema/tool_access.d.ts +8382 -0
- package/dist/schema/tool_access.d.ts.map +1 -0
- package/dist/schema/tool_access.js +735 -0
- package/dist/schema/tool_access.js.map +1 -0
- package/dist/schema/tool_action_deliveries.d.ts +111 -0
- package/dist/schema/tool_action_deliveries.d.ts.map +1 -0
- package/dist/schema/tool_action_deliveries.js +27 -0
- package/dist/schema/tool_action_deliveries.js.map +1 -0
- package/dist/schema/user_inbox_agent_policies.d.ts +131 -0
- package/dist/schema/user_inbox_agent_policies.d.ts.map +1 -0
- package/dist/schema/user_inbox_agent_policies.js +17 -0
- package/dist/schema/user_inbox_agent_policies.js.map +1 -0
- package/dist/schema/user_secret_declarations.d.ts +229 -0
- package/dist/schema/user_secret_declarations.d.ts.map +1 -0
- package/dist/schema/user_secret_declarations.js +31 -0
- package/dist/schema/user_secret_declarations.js.map +1 -0
- package/dist/schema/user_secret_definitions.d.ts +316 -0
- package/dist/schema/user_secret_definitions.d.ts.map +1 -0
- package/dist/schema/user_secret_definitions.js +33 -0
- package/dist/schema/user_secret_definitions.js.map +1 -0
- package/dist/schema/user_sidebar_preferences.d.ts +95 -0
- package/dist/schema/user_sidebar_preferences.d.ts.map +1 -0
- package/dist/schema/user_sidebar_preferences.js +11 -0
- package/dist/schema/user_sidebar_preferences.js.map +1 -0
- package/dist/schema/work_assessments.d.ts +333 -0
- package/dist/schema/work_assessments.d.ts.map +1 -0
- package/dist/schema/work_assessments.js +67 -0
- package/dist/schema/work_assessments.js.map +1 -0
- package/dist/schema/workspace_operations.d.ts +384 -0
- package/dist/schema/workspace_operations.d.ts.map +1 -0
- package/dist/schema/workspace_operations.js +40 -0
- package/dist/schema/workspace_operations.js.map +1 -0
- package/dist/schema/workspace_runtime_services.d.ts +523 -0
- package/dist/schema/workspace_runtime_services.d.ts.map +1 -0
- package/dist/schema/workspace_runtime_services.js +53 -0
- package/dist/schema/workspace_runtime_services.js.map +1 -0
- package/dist/seed.d.ts +2 -0
- package/dist/seed.d.ts.map +1 -0
- package/dist/seed.js +91 -0
- package/dist/seed.js.map +1 -0
- package/dist/session-goal-migration.test.d.ts +2 -0
- package/dist/session-goal-migration.test.d.ts.map +1 -0
- package/dist/session-goal-migration.test.js +47 -0
- package/dist/session-goal-migration.test.js.map +1 -0
- package/dist/status-card-migrations.test.d.ts +2 -0
- package/dist/status-card-migrations.test.d.ts.map +1 -0
- package/dist/status-card-migrations.test.js +34 -0
- package/dist/status-card-migrations.test.js.map +1 -0
- package/dist/summary-slots-schema.test.d.ts +2 -0
- package/dist/summary-slots-schema.test.d.ts.map +1 -0
- package/dist/summary-slots-schema.test.js +62 -0
- package/dist/summary-slots-schema.test.js.map +1 -0
- package/dist/table-size-estimates.d.ts +366 -0
- package/dist/table-size-estimates.d.ts.map +1 -0
- package/dist/table-size-estimates.js +153 -0
- package/dist/table-size-estimates.js.map +1 -0
- package/dist/test-embedded-postgres.d.ts +37 -0
- package/dist/test-embedded-postgres.d.ts.map +1 -0
- package/dist/test-embedded-postgres.js +240 -0
- package/dist/test-embedded-postgres.js.map +1 -0
- package/dist/test-embedded-postgres.test.d.ts +2 -0
- package/dist/test-embedded-postgres.test.d.ts.map +1 -0
- package/dist/test-embedded-postgres.test.js +76 -0
- package/dist/test-embedded-postgres.test.js.map +1 -0
- package/dist/transient-write-retry.d.ts +4 -0
- package/dist/transient-write-retry.d.ts.map +1 -0
- package/dist/transient-write-retry.js +79 -0
- package/dist/transient-write-retry.js.map +1 -0
- package/dist/transient-write-retry.test.d.ts +2 -0
- package/dist/transient-write-retry.test.d.ts.map +1 -0
- package/dist/transient-write-retry.test.js +166 -0
- package/dist/transient-write-retry.test.js.map +1 -0
- package/dist/vercel-connect-credential-source-migration.test.d.ts +2 -0
- package/dist/vercel-connect-credential-source-migration.test.d.ts.map +1 -0
- package/dist/vercel-connect-credential-source-migration.test.js +71 -0
- package/dist/vercel-connect-credential-source-migration.test.js.map +1 -0
- package/node_modules/async-exit-hook/index.js +171 -0
- package/node_modules/async-exit-hook/license +21 -0
- package/node_modules/async-exit-hook/package.json +66 -0
- package/node_modules/async-exit-hook/readme.md +118 -0
- package/node_modules/embedded-postgres/LICENSE.md +9 -0
- package/node_modules/embedded-postgres/README.md +191 -0
- package/node_modules/embedded-postgres/dist/binary.d.ts +7 -0
- package/node_modules/embedded-postgres/dist/binary.js +41 -0
- package/node_modules/embedded-postgres/dist/index.d.ts +58 -0
- package/node_modules/embedded-postgres/dist/index.js +366 -0
- package/node_modules/embedded-postgres/dist/types.d.ts +54 -0
- package/node_modules/embedded-postgres/dist/types.js +1 -0
- package/node_modules/embedded-postgres/package.json +59 -0
- package/node_modules/pg/LICENSE +21 -0
- package/node_modules/pg/README.md +96 -0
- package/node_modules/pg/esm/index.mjs +20 -0
- package/node_modules/pg/lib/client.js +828 -0
- package/node_modules/pg/lib/connection-parameters.js +184 -0
- package/node_modules/pg/lib/connection.js +243 -0
- package/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
- package/node_modules/pg/lib/crypto/sasl.js +262 -0
- package/node_modules/pg/lib/crypto/utils.js +89 -0
- package/node_modules/pg/lib/defaults.js +94 -0
- package/node_modules/pg/lib/index.js +73 -0
- package/node_modules/pg/lib/native/client.js +420 -0
- package/node_modules/pg/lib/native/index.js +2 -0
- package/node_modules/pg/lib/native/query.js +165 -0
- package/node_modules/pg/lib/query.js +259 -0
- package/node_modules/pg/lib/result.js +109 -0
- package/node_modules/pg/lib/stream.js +83 -0
- package/node_modules/pg/lib/type-overrides.js +35 -0
- package/node_modules/pg/lib/utils.js +207 -0
- package/node_modules/pg/package.json +76 -0
- package/node_modules/pg-cloudflare/LICENSE +21 -0
- package/node_modules/pg-cloudflare/README.md +112 -0
- package/node_modules/pg-cloudflare/dist/empty.d.ts +2 -0
- package/node_modules/pg-cloudflare/dist/empty.js +6 -0
- package/node_modules/pg-cloudflare/dist/empty.js.map +1 -0
- package/node_modules/pg-cloudflare/dist/index.d.ts +31 -0
- package/node_modules/pg-cloudflare/dist/index.js +154 -0
- package/node_modules/pg-cloudflare/dist/index.js.map +1 -0
- package/node_modules/pg-cloudflare/esm/index.mjs +3 -0
- package/node_modules/pg-cloudflare/package.json +39 -0
- package/node_modules/pg-cloudflare/src/empty.ts +3 -0
- package/node_modules/pg-cloudflare/src/index.ts +169 -0
- package/node_modules/pg-cloudflare/src/types.d.ts +25 -0
- package/node_modules/pg-connection-string/LICENSE +21 -0
- package/node_modules/pg-connection-string/README.md +105 -0
- package/node_modules/pg-connection-string/esm/index.mjs +8 -0
- package/node_modules/pg-connection-string/index.d.ts +37 -0
- package/node_modules/pg-connection-string/index.js +237 -0
- package/node_modules/pg-connection-string/package.json +52 -0
- package/node_modules/pg-int8/LICENSE +13 -0
- package/node_modules/pg-int8/README.md +16 -0
- package/node_modules/pg-int8/index.js +100 -0
- package/node_modules/pg-int8/package.json +24 -0
- package/node_modules/pg-pool/LICENSE +21 -0
- package/node_modules/pg-pool/README.md +357 -0
- package/node_modules/pg-pool/esm/index.mjs +5 -0
- package/node_modules/pg-pool/index.js +517 -0
- package/node_modules/pg-pool/package.json +51 -0
- package/node_modules/pg-protocol/LICENSE +21 -0
- package/node_modules/pg-protocol/README.md +3 -0
- package/node_modules/pg-protocol/dist/b.d.ts +1 -0
- package/node_modules/pg-protocol/dist/b.js +23 -0
- package/node_modules/pg-protocol/dist/b.js.map +1 -0
- package/node_modules/pg-protocol/dist/buffer-reader.d.ts +14 -0
- package/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
- package/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -0
- package/node_modules/pg-protocol/dist/buffer-writer.d.ts +17 -0
- package/node_modules/pg-protocol/dist/buffer-writer.js +104 -0
- package/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -0
- package/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +1 -0
- package/node_modules/pg-protocol/dist/inbound-parser.test.js +538 -0
- package/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -0
- package/node_modules/pg-protocol/dist/index.d.ts +5 -0
- package/node_modules/pg-protocol/dist/index.js +15 -0
- package/node_modules/pg-protocol/dist/index.js.map +1 -0
- package/node_modules/pg-protocol/dist/messages.d.ts +161 -0
- package/node_modules/pg-protocol/dist/messages.js +160 -0
- package/node_modules/pg-protocol/dist/messages.js.map +1 -0
- package/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +1 -0
- package/node_modules/pg-protocol/dist/outbound-serializer.test.js +325 -0
- package/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -0
- package/node_modules/pg-protocol/dist/parser.d.ts +22 -0
- package/node_modules/pg-protocol/dist/parser.js +325 -0
- package/node_modules/pg-protocol/dist/parser.js.map +1 -0
- package/node_modules/pg-protocol/dist/serializer.d.ts +42 -0
- package/node_modules/pg-protocol/dist/serializer.js +196 -0
- package/node_modules/pg-protocol/dist/serializer.js.map +1 -0
- package/node_modules/pg-protocol/esm/index.js +11 -0
- package/node_modules/pg-protocol/package.json +44 -0
- package/node_modules/pg-protocol/src/b.ts +25 -0
- package/node_modules/pg-protocol/src/buffer-reader.ts +58 -0
- package/node_modules/pg-protocol/src/buffer-writer.ts +110 -0
- package/node_modules/pg-protocol/src/inbound-parser.test.ts +585 -0
- package/node_modules/pg-protocol/src/index.ts +11 -0
- package/node_modules/pg-protocol/src/messages.ts +262 -0
- package/node_modules/pg-protocol/src/outbound-serializer.test.ts +356 -0
- package/node_modules/pg-protocol/src/parser.ts +414 -0
- package/node_modules/pg-protocol/src/serializer.ts +280 -0
- package/node_modules/pg-protocol/src/testing/buffer-list.ts +67 -0
- package/node_modules/pg-protocol/src/testing/test-buffers.ts +166 -0
- package/node_modules/pg-types/.travis.yml +7 -0
- package/node_modules/pg-types/Makefile +14 -0
- package/node_modules/pg-types/README.md +75 -0
- package/node_modules/pg-types/index.d.ts +137 -0
- package/node_modules/pg-types/index.js +47 -0
- package/node_modules/pg-types/index.test-d.ts +21 -0
- package/node_modules/pg-types/lib/arrayParser.js +11 -0
- package/node_modules/pg-types/lib/binaryParsers.js +257 -0
- package/node_modules/pg-types/lib/builtins.js +73 -0
- package/node_modules/pg-types/lib/textParsers.js +215 -0
- package/node_modules/pg-types/package.json +42 -0
- package/node_modules/pg-types/test/index.js +24 -0
- package/node_modules/pg-types/test/types.js +597 -0
- package/node_modules/pgpass/README.md +74 -0
- package/node_modules/pgpass/lib/helper.js +233 -0
- package/node_modules/pgpass/lib/index.js +23 -0
- package/node_modules/pgpass/package.json +41 -0
- package/node_modules/postgres-array/index.d.ts +4 -0
- package/node_modules/postgres-array/index.js +97 -0
- package/node_modules/postgres-array/license +21 -0
- package/node_modules/postgres-array/package.json +35 -0
- package/node_modules/postgres-array/readme.md +43 -0
- package/node_modules/postgres-bytea/index.js +33 -0
- package/node_modules/postgres-bytea/license +21 -0
- package/node_modules/postgres-bytea/package.json +34 -0
- package/node_modules/postgres-bytea/readme.md +34 -0
- package/node_modules/postgres-date/index.js +116 -0
- package/node_modules/postgres-date/license +21 -0
- package/node_modules/postgres-date/package.json +33 -0
- package/node_modules/postgres-date/readme.md +49 -0
- package/node_modules/postgres-interval/index.d.ts +20 -0
- package/node_modules/postgres-interval/index.js +125 -0
- package/node_modules/postgres-interval/license +21 -0
- package/node_modules/postgres-interval/package.json +36 -0
- package/node_modules/postgres-interval/readme.md +48 -0
- package/node_modules/split2/LICENSE +13 -0
- package/node_modules/split2/README.md +85 -0
- package/node_modules/split2/bench.js +27 -0
- package/node_modules/split2/index.js +141 -0
- package/node_modules/split2/package.json +39 -0
- package/node_modules/split2/test.js +409 -0
- package/node_modules/xtend/.jshintrc +30 -0
- package/node_modules/xtend/LICENSE +20 -0
- package/node_modules/xtend/README.md +32 -0
- package/node_modules/xtend/immutable.js +19 -0
- package/node_modules/xtend/mutable.js +17 -0
- package/node_modules/xtend/package.json +55 -0
- package/node_modules/xtend/test.js +103 -0
- package/package.json +69 -0
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
const nodeUtils = require('util')
|
|
2
|
+
// eslint-disable-next-line
|
|
3
|
+
var Native
|
|
4
|
+
// eslint-disable-next-line no-useless-catch
|
|
5
|
+
try {
|
|
6
|
+
// Wrap this `require()` in a try-catch to avoid upstream bundlers from complaining that this might not be available since it is an optional import
|
|
7
|
+
Native = require('pg-native')
|
|
8
|
+
} catch (e) {
|
|
9
|
+
throw e
|
|
10
|
+
}
|
|
11
|
+
const TypeOverrides = require('../type-overrides')
|
|
12
|
+
const EventEmitter = require('events').EventEmitter
|
|
13
|
+
const util = require('util')
|
|
14
|
+
const ConnectionParameters = require('../connection-parameters')
|
|
15
|
+
|
|
16
|
+
const NativeQuery = require('./query')
|
|
17
|
+
|
|
18
|
+
const queryQueueLengthDeprecationNotice = nodeUtils.deprecate(
|
|
19
|
+
() => {},
|
|
20
|
+
'Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead.'
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
const Client = (module.exports = function (config) {
|
|
24
|
+
EventEmitter.call(this)
|
|
25
|
+
config = config || {}
|
|
26
|
+
|
|
27
|
+
this._Promise = config.Promise || global.Promise
|
|
28
|
+
this._types = new TypeOverrides(config.types)
|
|
29
|
+
|
|
30
|
+
this.native = new Native({
|
|
31
|
+
types: this._types,
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
this._queryQueue = []
|
|
35
|
+
this._ending = false
|
|
36
|
+
this._connecting = false
|
|
37
|
+
this._connected = false
|
|
38
|
+
this._queryable = true
|
|
39
|
+
this.pipeline = Boolean(config.pipeline)
|
|
40
|
+
this._pipelineInFlight = false
|
|
41
|
+
|
|
42
|
+
// keep these on the object for legacy reasons
|
|
43
|
+
// for the time being. TODO: deprecate all this jazz
|
|
44
|
+
const cp = (this.connectionParameters = new ConnectionParameters(config))
|
|
45
|
+
if (config.nativeConnectionString) cp.nativeConnectionString = config.nativeConnectionString
|
|
46
|
+
this.user = cp.user
|
|
47
|
+
|
|
48
|
+
// "hiding" the password so it doesn't show up in stack traces
|
|
49
|
+
// or if the client is console.logged
|
|
50
|
+
Object.defineProperty(this, 'password', {
|
|
51
|
+
configurable: true,
|
|
52
|
+
enumerable: false,
|
|
53
|
+
writable: true,
|
|
54
|
+
value: cp.password,
|
|
55
|
+
})
|
|
56
|
+
this.database = cp.database
|
|
57
|
+
this.host = cp.host
|
|
58
|
+
this.port = cp.port
|
|
59
|
+
|
|
60
|
+
// a hash to hold named queries
|
|
61
|
+
this.namedQueries = {}
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
Client.Query = NativeQuery
|
|
65
|
+
|
|
66
|
+
util.inherits(Client, EventEmitter)
|
|
67
|
+
|
|
68
|
+
Client.prototype._errorAllQueries = function (err) {
|
|
69
|
+
const enqueueError = (query) => {
|
|
70
|
+
process.nextTick(() => {
|
|
71
|
+
query.native = this.native
|
|
72
|
+
query.handleError(err)
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (this._hasActiveQuery()) {
|
|
77
|
+
enqueueError(this._activeQuery)
|
|
78
|
+
this._activeQuery = null
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
this._queryQueue.forEach(enqueueError)
|
|
82
|
+
this._queryQueue.length = 0
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// connect to the backend
|
|
86
|
+
// pass an optional callback to be called once connected
|
|
87
|
+
// or with an error if there was a connection error
|
|
88
|
+
Client.prototype._connect = function (cb) {
|
|
89
|
+
const self = this
|
|
90
|
+
|
|
91
|
+
if (this._connecting) {
|
|
92
|
+
process.nextTick(() => cb(new Error('Client has already been connected. You cannot reuse a client.')))
|
|
93
|
+
return
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
this._connecting = true
|
|
97
|
+
|
|
98
|
+
this.connectionParameters.getLibpqConnectionString(function (err, conString) {
|
|
99
|
+
if (self.connectionParameters.nativeConnectionString) conString = self.connectionParameters.nativeConnectionString
|
|
100
|
+
if (err) return cb(err)
|
|
101
|
+
self.native.connect(conString, function (err) {
|
|
102
|
+
if (err) {
|
|
103
|
+
self.native.end()
|
|
104
|
+
return cb(err)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// set internal states to connected
|
|
108
|
+
self._connected = true
|
|
109
|
+
|
|
110
|
+
// handle connection errors from the native layer
|
|
111
|
+
self.native.on('error', function (err) {
|
|
112
|
+
self._queryable = false
|
|
113
|
+
self._errorAllQueries(err)
|
|
114
|
+
self.emit('error', err)
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
self.native.on('notification', function (msg) {
|
|
118
|
+
self.emit('notification', {
|
|
119
|
+
channel: msg.relname,
|
|
120
|
+
payload: msg.extra,
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
// signal we are connected now
|
|
125
|
+
self.emit('connect')
|
|
126
|
+
self._pulseQueryQueue(true)
|
|
127
|
+
|
|
128
|
+
cb(null, this)
|
|
129
|
+
})
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
Client.prototype.connect = function (callback) {
|
|
134
|
+
if (callback) {
|
|
135
|
+
this._connect(callback)
|
|
136
|
+
return
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return new this._Promise((resolve, reject) => {
|
|
140
|
+
this._connect((error) => {
|
|
141
|
+
if (error) {
|
|
142
|
+
reject(error)
|
|
143
|
+
} else {
|
|
144
|
+
resolve(this)
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// send a query to the server
|
|
151
|
+
// this method is highly overloaded to take
|
|
152
|
+
// 1) string query, optional array of parameters, optional function callback
|
|
153
|
+
// 2) object query with {
|
|
154
|
+
// string query
|
|
155
|
+
// optional array values,
|
|
156
|
+
// optional function callback instead of as a separate parameter
|
|
157
|
+
// optional string name to name & cache the query plan
|
|
158
|
+
// optional string rowMode = 'array' for an array of results
|
|
159
|
+
// }
|
|
160
|
+
Client.prototype.query = function (config, values, callback) {
|
|
161
|
+
let query
|
|
162
|
+
let result
|
|
163
|
+
let readTimeout
|
|
164
|
+
let readTimeoutTimer
|
|
165
|
+
let queryCallback
|
|
166
|
+
|
|
167
|
+
if (config === null || config === undefined) {
|
|
168
|
+
throw new TypeError('Client was passed a null or undefined query')
|
|
169
|
+
} else if (typeof config.submit === 'function') {
|
|
170
|
+
readTimeout = config.query_timeout || this.connectionParameters.query_timeout
|
|
171
|
+
result = query = config
|
|
172
|
+
// accept query(new Query(...), (err, res) => { }) style
|
|
173
|
+
if (typeof values === 'function') {
|
|
174
|
+
config.callback = values
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
readTimeout = config.query_timeout || this.connectionParameters.query_timeout
|
|
178
|
+
query = new NativeQuery(config, values, callback)
|
|
179
|
+
if (!query.callback) {
|
|
180
|
+
let resolveOut, rejectOut
|
|
181
|
+
result = new this._Promise((resolve, reject) => {
|
|
182
|
+
resolveOut = resolve
|
|
183
|
+
rejectOut = reject
|
|
184
|
+
}).catch((err) => {
|
|
185
|
+
Error.captureStackTrace(err)
|
|
186
|
+
throw err
|
|
187
|
+
})
|
|
188
|
+
query.callback = (err, res) => (err ? rejectOut(err) : resolveOut(res))
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (readTimeout) {
|
|
193
|
+
queryCallback = query.callback || (() => {})
|
|
194
|
+
|
|
195
|
+
readTimeoutTimer = setTimeout(() => {
|
|
196
|
+
const error = new Error('Query read timeout')
|
|
197
|
+
|
|
198
|
+
process.nextTick(() => {
|
|
199
|
+
query.handleError(error, this.connection)
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
queryCallback(error)
|
|
203
|
+
|
|
204
|
+
// we already returned an error,
|
|
205
|
+
// just do nothing if query completes
|
|
206
|
+
query.callback = () => {}
|
|
207
|
+
|
|
208
|
+
// Remove from queue
|
|
209
|
+
const index = this._queryQueue.indexOf(query)
|
|
210
|
+
if (index > -1) {
|
|
211
|
+
this._queryQueue.splice(index, 1)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
this._pulseQueryQueue()
|
|
215
|
+
}, readTimeout)
|
|
216
|
+
|
|
217
|
+
query.callback = (err, res) => {
|
|
218
|
+
clearTimeout(readTimeoutTimer)
|
|
219
|
+
queryCallback(err, res)
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (!this._queryable) {
|
|
224
|
+
query.native = this.native
|
|
225
|
+
process.nextTick(() => {
|
|
226
|
+
query.handleError(new Error('Client has encountered a connection error and is not queryable'))
|
|
227
|
+
})
|
|
228
|
+
return result
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (this._ending) {
|
|
232
|
+
query.native = this.native
|
|
233
|
+
process.nextTick(() => {
|
|
234
|
+
query.handleError(new Error('Client was closed and is not queryable'))
|
|
235
|
+
})
|
|
236
|
+
return result
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (this._queryQueue.length > 0 && !this.pipeline) {
|
|
240
|
+
queryQueueLengthDeprecationNotice()
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
this._queryQueue.push(query)
|
|
244
|
+
this._pulseQueryQueue()
|
|
245
|
+
return result
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// disconnect from the backend server
|
|
249
|
+
Client.prototype.end = function (cb) {
|
|
250
|
+
const self = this
|
|
251
|
+
|
|
252
|
+
this._ending = true
|
|
253
|
+
|
|
254
|
+
if (this._connecting && !this._connected) {
|
|
255
|
+
this.once('connect', () => {
|
|
256
|
+
this.end(() => {})
|
|
257
|
+
})
|
|
258
|
+
}
|
|
259
|
+
let result
|
|
260
|
+
if (!cb) {
|
|
261
|
+
result = new this._Promise(function (resolve, reject) {
|
|
262
|
+
cb = (err) => (err ? reject(err) : resolve())
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const doEnd = function () {
|
|
267
|
+
self.native.end(function () {
|
|
268
|
+
self._connected = false
|
|
269
|
+
|
|
270
|
+
self._errorAllQueries(new Error('Connection terminated'))
|
|
271
|
+
|
|
272
|
+
process.nextTick(() => {
|
|
273
|
+
self.emit('end')
|
|
274
|
+
if (cb) cb()
|
|
275
|
+
})
|
|
276
|
+
})
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// If pipeline has in-flight or queued queries, wait for them to drain before closing
|
|
280
|
+
if (this.pipeline && (this._pipelineInFlight || this._queryQueue.length > 0)) {
|
|
281
|
+
this.once('drain', doEnd)
|
|
282
|
+
} else {
|
|
283
|
+
doEnd()
|
|
284
|
+
}
|
|
285
|
+
return result
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
Client.prototype._hasActiveQuery = function () {
|
|
289
|
+
return this._activeQuery && this._activeQuery.state !== 'error' && this._activeQuery.state !== 'end'
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
Client.prototype._pulseQueryQueue = function (initialConnection) {
|
|
293
|
+
if (!this._connected) {
|
|
294
|
+
return
|
|
295
|
+
}
|
|
296
|
+
if (this.pipeline && !initialConnection) {
|
|
297
|
+
return this._pulsePipelinedQueryQueue()
|
|
298
|
+
}
|
|
299
|
+
if (this._hasActiveQuery()) {
|
|
300
|
+
return
|
|
301
|
+
}
|
|
302
|
+
const query = this._queryQueue.shift()
|
|
303
|
+
if (!query) {
|
|
304
|
+
if (!initialConnection) {
|
|
305
|
+
this.emit('drain')
|
|
306
|
+
}
|
|
307
|
+
return
|
|
308
|
+
}
|
|
309
|
+
this._activeQuery = query
|
|
310
|
+
query.submit(this)
|
|
311
|
+
const self = this
|
|
312
|
+
query.once('_done', function () {
|
|
313
|
+
self._pulseQueryQueue()
|
|
314
|
+
})
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
Client.prototype._pulsePipelinedQueryQueue = function () {
|
|
318
|
+
if (!this._connected || this._pipelineInFlight) {
|
|
319
|
+
return
|
|
320
|
+
}
|
|
321
|
+
if (this._queryQueue.length === 0) {
|
|
322
|
+
if (this.hasExecuted) {
|
|
323
|
+
this.emit('drain')
|
|
324
|
+
}
|
|
325
|
+
return
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
this._pipelineInFlight = true
|
|
329
|
+
const self = this
|
|
330
|
+
const queries = []
|
|
331
|
+
const nativeQueries = []
|
|
332
|
+
const utils = require('../utils')
|
|
333
|
+
|
|
334
|
+
while (this._queryQueue.length > 0) {
|
|
335
|
+
const query = this._queryQueue.shift()
|
|
336
|
+
this.hasExecuted = true
|
|
337
|
+
nativeQueries.push(query)
|
|
338
|
+
|
|
339
|
+
const values = query.values ? query.values.map(utils.prepareValue) : null
|
|
340
|
+
const pipelineEntry = { text: query.text, name: query.name }
|
|
341
|
+
if (values) {
|
|
342
|
+
pipelineEntry.values = values
|
|
343
|
+
}
|
|
344
|
+
if (query.name && this.namedQueries[query.name]) {
|
|
345
|
+
pipelineEntry._alreadyPrepared = true
|
|
346
|
+
}
|
|
347
|
+
queries.push(pipelineEntry)
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
this.native.pipeline(queries, function (err, results) {
|
|
351
|
+
self._pipelineInFlight = false
|
|
352
|
+
|
|
353
|
+
if (err) {
|
|
354
|
+
// Total pipeline failure — error all queries
|
|
355
|
+
for (let i = 0; i < nativeQueries.length; i++) {
|
|
356
|
+
const q = nativeQueries[i]
|
|
357
|
+
q.native = self.native
|
|
358
|
+
q.handleError(err)
|
|
359
|
+
}
|
|
360
|
+
self._pulsePipelinedQueryQueue()
|
|
361
|
+
return
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// Deliver results to each query
|
|
365
|
+
for (let i = 0; i < nativeQueries.length; i++) {
|
|
366
|
+
const q = nativeQueries[i]
|
|
367
|
+
const r = results[i]
|
|
368
|
+
q.native = self.native
|
|
369
|
+
|
|
370
|
+
if (r.err) {
|
|
371
|
+
q.handleError(r.err)
|
|
372
|
+
} else {
|
|
373
|
+
// Track named queries on success
|
|
374
|
+
if (q.name) {
|
|
375
|
+
self.namedQueries[q.name] = q.text
|
|
376
|
+
}
|
|
377
|
+
q.state = 'end'
|
|
378
|
+
q.emit('end', r.result)
|
|
379
|
+
if (q.callback) {
|
|
380
|
+
q.callback(null, r.result)
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
setImmediate(function () {
|
|
385
|
+
q.emit('_done')
|
|
386
|
+
})
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// Process any queries that arrived while we were reading
|
|
390
|
+
self._pulsePipelinedQueryQueue()
|
|
391
|
+
})
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// attempt to cancel an in-progress query
|
|
395
|
+
Client.prototype.cancel = function (query) {
|
|
396
|
+
if (this._activeQuery === query) {
|
|
397
|
+
this.native.cancel(function () {})
|
|
398
|
+
} else if (this._queryQueue.indexOf(query) !== -1) {
|
|
399
|
+
this._queryQueue.splice(this._queryQueue.indexOf(query), 1)
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
Client.prototype.ref = function () {}
|
|
404
|
+
Client.prototype.unref = function () {}
|
|
405
|
+
|
|
406
|
+
Client.prototype.setTypeParser = function (oid, format, parseFn) {
|
|
407
|
+
return this._types.setTypeParser(oid, format, parseFn)
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
Client.prototype.getTypeParser = function (oid, format) {
|
|
411
|
+
return this._types.getTypeParser(oid, format)
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
Client.prototype.isConnected = function () {
|
|
415
|
+
return this._connected
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
Client.prototype.getTransactionStatus = function () {
|
|
419
|
+
return this.native.getTransactionStatus()
|
|
420
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const EventEmitter = require('events').EventEmitter
|
|
4
|
+
const util = require('util')
|
|
5
|
+
const utils = require('../utils')
|
|
6
|
+
|
|
7
|
+
const NativeQuery = (module.exports = function (config, values, callback) {
|
|
8
|
+
EventEmitter.call(this)
|
|
9
|
+
config = utils.normalizeQueryConfig(config, values, callback)
|
|
10
|
+
this.text = config.text
|
|
11
|
+
this.values = config.values
|
|
12
|
+
this.name = config.name
|
|
13
|
+
this.queryMode = config.queryMode
|
|
14
|
+
this.callback = config.callback
|
|
15
|
+
this.state = 'new'
|
|
16
|
+
this._arrayMode = config.rowMode === 'array'
|
|
17
|
+
|
|
18
|
+
// if the 'row' event is listened for
|
|
19
|
+
// then emit them as they come in
|
|
20
|
+
// without setting singleRowMode to true
|
|
21
|
+
// this has almost no meaning because libpq
|
|
22
|
+
// reads all rows into memory before returning any
|
|
23
|
+
this._emitRowEvents = false
|
|
24
|
+
this.on(
|
|
25
|
+
'newListener',
|
|
26
|
+
function (event) {
|
|
27
|
+
if (event === 'row') this._emitRowEvents = true
|
|
28
|
+
}.bind(this)
|
|
29
|
+
)
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
util.inherits(NativeQuery, EventEmitter)
|
|
33
|
+
|
|
34
|
+
const errorFieldMap = {
|
|
35
|
+
sqlState: 'code',
|
|
36
|
+
statementPosition: 'position',
|
|
37
|
+
messagePrimary: 'message',
|
|
38
|
+
context: 'where',
|
|
39
|
+
schemaName: 'schema',
|
|
40
|
+
tableName: 'table',
|
|
41
|
+
columnName: 'column',
|
|
42
|
+
dataTypeName: 'dataType',
|
|
43
|
+
constraintName: 'constraint',
|
|
44
|
+
sourceFile: 'file',
|
|
45
|
+
sourceLine: 'line',
|
|
46
|
+
sourceFunction: 'routine',
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
NativeQuery.prototype.handleError = function (err) {
|
|
50
|
+
// copy pq error fields into the error object
|
|
51
|
+
const fields = this.native && this.native.pq.resultErrorFields()
|
|
52
|
+
if (fields) {
|
|
53
|
+
for (const key in fields) {
|
|
54
|
+
const normalizedFieldName = errorFieldMap[key] || key
|
|
55
|
+
err[normalizedFieldName] = fields[key]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (this.callback) {
|
|
59
|
+
this.callback(err)
|
|
60
|
+
} else {
|
|
61
|
+
this.emit('error', err)
|
|
62
|
+
}
|
|
63
|
+
this.state = 'error'
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
NativeQuery.prototype.then = function (onSuccess, onFailure) {
|
|
67
|
+
return this._getPromise().then(onSuccess, onFailure)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
NativeQuery.prototype.catch = function (callback) {
|
|
71
|
+
return this._getPromise().catch(callback)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
NativeQuery.prototype._getPromise = function () {
|
|
75
|
+
if (this._promise) return this._promise
|
|
76
|
+
this._promise = new Promise(
|
|
77
|
+
function (resolve, reject) {
|
|
78
|
+
this._once('end', resolve)
|
|
79
|
+
this._once('error', reject)
|
|
80
|
+
}.bind(this)
|
|
81
|
+
)
|
|
82
|
+
return this._promise
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
NativeQuery.prototype.submit = function (client) {
|
|
86
|
+
this.state = 'running'
|
|
87
|
+
const self = this
|
|
88
|
+
this.native = client.native
|
|
89
|
+
client.native.arrayMode = this._arrayMode
|
|
90
|
+
|
|
91
|
+
let after = function (err, rows, results) {
|
|
92
|
+
client.native.arrayMode = false
|
|
93
|
+
setImmediate(function () {
|
|
94
|
+
self.emit('_done')
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
// handle possible query error
|
|
98
|
+
if (err) {
|
|
99
|
+
return self.handleError(err)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// emit row events for each row in the result
|
|
103
|
+
if (self._emitRowEvents) {
|
|
104
|
+
if (results.length > 1) {
|
|
105
|
+
rows.forEach((rowOfRows, i) => {
|
|
106
|
+
rowOfRows.forEach((row) => {
|
|
107
|
+
self.emit('row', row, results[i])
|
|
108
|
+
})
|
|
109
|
+
})
|
|
110
|
+
} else {
|
|
111
|
+
rows.forEach(function (row) {
|
|
112
|
+
self.emit('row', row, results)
|
|
113
|
+
})
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// handle successful result
|
|
118
|
+
self.state = 'end'
|
|
119
|
+
self.emit('end', results)
|
|
120
|
+
if (self.callback) {
|
|
121
|
+
self.callback(null, results)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (process.domain) {
|
|
126
|
+
after = process.domain.bind(after)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// named query
|
|
130
|
+
if (this.name) {
|
|
131
|
+
if (this.name.length > 63) {
|
|
132
|
+
console.error('Warning! Postgres only supports 63 characters for query names.')
|
|
133
|
+
console.error('You supplied %s (%s)', this.name, this.name.length)
|
|
134
|
+
console.error('This can cause conflicts and silent errors executing queries')
|
|
135
|
+
}
|
|
136
|
+
const values = (this.values || []).map(utils.prepareValue)
|
|
137
|
+
|
|
138
|
+
// check if the client has already executed this named query
|
|
139
|
+
// if so...just execute it again - skip the planning phase
|
|
140
|
+
if (client.namedQueries[this.name]) {
|
|
141
|
+
if (this.text && client.namedQueries[this.name] !== this.text) {
|
|
142
|
+
const err = new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`)
|
|
143
|
+
return after(err)
|
|
144
|
+
}
|
|
145
|
+
return client.native.execute(this.name, values, after)
|
|
146
|
+
}
|
|
147
|
+
// plan the named query the first time, then execute it
|
|
148
|
+
return client.native.prepare(this.name, this.text, values.length, function (err) {
|
|
149
|
+
if (err) return after(err)
|
|
150
|
+
client.namedQueries[self.name] = self.text
|
|
151
|
+
return self.native.execute(self.name, values, after)
|
|
152
|
+
})
|
|
153
|
+
} else if (this.values) {
|
|
154
|
+
if (!Array.isArray(this.values)) {
|
|
155
|
+
const err = new Error('Query values must be an array')
|
|
156
|
+
return after(err)
|
|
157
|
+
}
|
|
158
|
+
const vals = this.values.map(utils.prepareValue)
|
|
159
|
+
client.native.query(this.text, vals, after)
|
|
160
|
+
} else if (this.queryMode === 'extended') {
|
|
161
|
+
client.native.query(this.text, [], after)
|
|
162
|
+
} else {
|
|
163
|
+
client.native.query(this.text, after)
|
|
164
|
+
}
|
|
165
|
+
}
|