betterstack-alchemy 0.0.0-stage → 0.1.0-beta.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/LICENSE +21 -0
- package/LICENSES/Apache-2.0.txt +201 -0
- package/NOTICE +182 -0
- package/README.md +165 -2
- package/lib/Account/Reference.d.ts +89 -0
- package/lib/Account/Reference.d.ts.map +1 -0
- package/lib/Account/Reference.js +90 -0
- package/lib/Account/Reference.js.map +1 -0
- package/lib/Account/Team.d.ts +69 -0
- package/lib/Account/Team.d.ts.map +1 -0
- package/lib/Account/Team.js +74 -0
- package/lib/Account/Team.js.map +1 -0
- package/lib/Account/TeamMember.d.ts +78 -0
- package/lib/Account/TeamMember.d.ts.map +1 -0
- package/lib/Account/TeamMember.js +159 -0
- package/lib/Account/TeamMember.js.map +1 -0
- package/lib/Account/index.d.ts +25 -0
- package/lib/Account/index.d.ts.map +1 -0
- package/lib/Account/index.js +25 -0
- package/lib/Account/index.js.map +1 -0
- package/lib/AuthProvider.d.ts +38 -0
- package/lib/AuthProvider.d.ts.map +1 -0
- package/lib/AuthProvider.js +134 -0
- package/lib/AuthProvider.js.map +1 -0
- package/lib/BetterStackBindings.d.ts +227 -0
- package/lib/BetterStackBindings.d.ts.map +1 -0
- package/lib/BetterStackBindings.js +223 -0
- package/lib/BetterStackBindings.js.map +1 -0
- package/lib/Cloud/Bootstrap.d.ts +20 -0
- package/lib/Cloud/Bootstrap.d.ts.map +1 -0
- package/lib/Cloud/Bootstrap.js +85 -0
- package/lib/Cloud/Bootstrap.js.map +1 -0
- package/lib/Cloud/Certificate.d.ts +97 -0
- package/lib/Cloud/Certificate.d.ts.map +1 -0
- package/lib/Cloud/Certificate.js +96 -0
- package/lib/Cloud/Certificate.js.map +1 -0
- package/lib/Cloud/ClickHouse.d.ts +184 -0
- package/lib/Cloud/ClickHouse.d.ts.map +1 -0
- package/lib/Cloud/ClickHouse.js +179 -0
- package/lib/Cloud/ClickHouse.js.map +1 -0
- package/lib/Cloud/ClickHouseScheduledSnapshot.d.ts +77 -0
- package/lib/Cloud/ClickHouseScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/ClickHouseScheduledSnapshot.js +76 -0
- package/lib/Cloud/ClickHouseScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/ClickHouseSnapshot.d.ts +107 -0
- package/lib/Cloud/ClickHouseSnapshot.d.ts.map +1 -0
- package/lib/Cloud/ClickHouseSnapshot.js +78 -0
- package/lib/Cloud/ClickHouseSnapshot.js.map +1 -0
- package/lib/Cloud/Firewall.d.ts +134 -0
- package/lib/Cloud/Firewall.d.ts.map +1 -0
- package/lib/Cloud/Firewall.js +169 -0
- package/lib/Cloud/Firewall.js.map +1 -0
- package/lib/Cloud/FirewallRule.d.ts +114 -0
- package/lib/Cloud/FirewallRule.d.ts.map +1 -0
- package/lib/Cloud/FirewallRule.js +130 -0
- package/lib/Cloud/FirewallRule.js.map +1 -0
- package/lib/Cloud/InferEnv.d.ts +28 -0
- package/lib/Cloud/InferEnv.d.ts.map +1 -0
- package/lib/Cloud/InferEnv.js +1 -0
- package/lib/Cloud/InferEnv.js.map +1 -0
- package/lib/Cloud/Kafka.d.ts +204 -0
- package/lib/Cloud/Kafka.d.ts.map +1 -0
- package/lib/Cloud/Kafka.js +194 -0
- package/lib/Cloud/Kafka.js.map +1 -0
- package/lib/Cloud/KafkaTopic.d.ts +90 -0
- package/lib/Cloud/KafkaTopic.d.ts.map +1 -0
- package/lib/Cloud/KafkaTopic.js +83 -0
- package/lib/Cloud/KafkaTopic.js.map +1 -0
- package/lib/Cloud/KafkaUser.d.ts +121 -0
- package/lib/Cloud/KafkaUser.d.ts.map +1 -0
- package/lib/Cloud/KafkaUser.js +103 -0
- package/lib/Cloud/KafkaUser.js.map +1 -0
- package/lib/Cloud/KubernetesCluster.d.ts +204 -0
- package/lib/Cloud/KubernetesCluster.d.ts.map +1 -0
- package/lib/Cloud/KubernetesCluster.js +190 -0
- package/lib/Cloud/KubernetesCluster.js.map +1 -0
- package/lib/Cloud/KubernetesNodePool.d.ts +100 -0
- package/lib/Cloud/KubernetesNodePool.d.ts.map +1 -0
- package/lib/Cloud/KubernetesNodePool.js +133 -0
- package/lib/Cloud/KubernetesNodePool.js.map +1 -0
- package/lib/Cloud/KubernetesScheduledSnapshot.d.ts +73 -0
- package/lib/Cloud/KubernetesScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/KubernetesScheduledSnapshot.js +78 -0
- package/lib/Cloud/KubernetesScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/LoadBalancer.d.ts +187 -0
- package/lib/Cloud/LoadBalancer.d.ts.map +1 -0
- package/lib/Cloud/LoadBalancer.js +228 -0
- package/lib/Cloud/LoadBalancer.js.map +1 -0
- package/lib/Cloud/LoadBalancerService.d.ts +116 -0
- package/lib/Cloud/LoadBalancerService.d.ts.map +1 -0
- package/lib/Cloud/LoadBalancerService.js +132 -0
- package/lib/Cloud/LoadBalancerService.js.map +1 -0
- package/lib/Cloud/LoadBalancerTarget.d.ts +110 -0
- package/lib/Cloud/LoadBalancerTarget.d.ts.map +1 -0
- package/lib/Cloud/LoadBalancerTarget.js +138 -0
- package/lib/Cloud/LoadBalancerTarget.js.map +1 -0
- package/lib/Cloud/MountVolume.d.ts +109 -0
- package/lib/Cloud/MountVolume.d.ts.map +1 -0
- package/lib/Cloud/MountVolume.js +59 -0
- package/lib/Cloud/MountVolume.js.map +1 -0
- package/lib/Cloud/MySQL.d.ts +285 -0
- package/lib/Cloud/MySQL.d.ts.map +1 -0
- package/lib/Cloud/MySQL.js +225 -0
- package/lib/Cloud/MySQL.js.map +1 -0
- package/lib/Cloud/MySQLScheduledSnapshot.d.ts +74 -0
- package/lib/Cloud/MySQLScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/MySQLScheduledSnapshot.js +73 -0
- package/lib/Cloud/MySQLScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/MySQLSnapshot.d.ts +107 -0
- package/lib/Cloud/MySQLSnapshot.d.ts.map +1 -0
- package/lib/Cloud/MySQLSnapshot.js +78 -0
- package/lib/Cloud/MySQLSnapshot.js.map +1 -0
- package/lib/Cloud/Network.d.ts +69 -0
- package/lib/Cloud/Network.d.ts.map +1 -0
- package/lib/Cloud/Network.js +80 -0
- package/lib/Cloud/Network.js.map +1 -0
- package/lib/Cloud/ObjectCache.d.ts +226 -0
- package/lib/Cloud/ObjectCache.d.ts.map +1 -0
- package/lib/Cloud/ObjectCache.js +258 -0
- package/lib/Cloud/ObjectCache.js.map +1 -0
- package/lib/Cloud/ObjectCacheBucket.d.ts +112 -0
- package/lib/Cloud/ObjectCacheBucket.d.ts.map +1 -0
- package/lib/Cloud/ObjectCacheBucket.js +123 -0
- package/lib/Cloud/ObjectCacheBucket.js.map +1 -0
- package/lib/Cloud/Otlp.d.ts +93 -0
- package/lib/Cloud/Otlp.d.ts.map +1 -0
- package/lib/Cloud/Otlp.js +79 -0
- package/lib/Cloud/Otlp.js.map +1 -0
- package/lib/Cloud/PlacementGroup.d.ts +85 -0
- package/lib/Cloud/PlacementGroup.d.ts.map +1 -0
- package/lib/Cloud/PlacementGroup.js +86 -0
- package/lib/Cloud/PlacementGroup.js.map +1 -0
- package/lib/Cloud/Postgres.d.ts +331 -0
- package/lib/Cloud/Postgres.d.ts.map +1 -0
- package/lib/Cloud/Postgres.js +255 -0
- package/lib/Cloud/Postgres.js.map +1 -0
- package/lib/Cloud/PostgresDatabase.d.ts +77 -0
- package/lib/Cloud/PostgresDatabase.d.ts.map +1 -0
- package/lib/Cloud/PostgresDatabase.js +79 -0
- package/lib/Cloud/PostgresDatabase.js.map +1 -0
- package/lib/Cloud/PostgresScheduledSnapshot.d.ts +74 -0
- package/lib/Cloud/PostgresScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/PostgresScheduledSnapshot.js +73 -0
- package/lib/Cloud/PostgresScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/PostgresSnapshot.d.ts +107 -0
- package/lib/Cloud/PostgresSnapshot.d.ts.map +1 -0
- package/lib/Cloud/PostgresSnapshot.js +78 -0
- package/lib/Cloud/PostgresSnapshot.js.map +1 -0
- package/lib/Cloud/PostgresUser.d.ts +118 -0
- package/lib/Cloud/PostgresUser.d.ts.map +1 -0
- package/lib/Cloud/PostgresUser.js +102 -0
- package/lib/Cloud/PostgresUser.js.map +1 -0
- package/lib/Cloud/Reference.d.ts +508 -0
- package/lib/Cloud/Reference.d.ts.map +1 -0
- package/lib/Cloud/Reference.js +542 -0
- package/lib/Cloud/Reference.js.map +1 -0
- package/lib/Cloud/ReservedIp.d.ts +113 -0
- package/lib/Cloud/ReservedIp.d.ts.map +1 -0
- package/lib/Cloud/ReservedIp.js +146 -0
- package/lib/Cloud/ReservedIp.js.map +1 -0
- package/lib/Cloud/ScheduledSnapshot.d.ts +49 -0
- package/lib/Cloud/ScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/ScheduledSnapshot.js +43 -0
- package/lib/Cloud/ScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/ScheduledVolumeSnapshot.d.ts +48 -0
- package/lib/Cloud/ScheduledVolumeSnapshot.d.ts.map +1 -0
- package/lib/Cloud/ScheduledVolumeSnapshot.js +42 -0
- package/lib/Cloud/ScheduledVolumeSnapshot.js.map +1 -0
- package/lib/Cloud/Server.d.ts +375 -0
- package/lib/Cloud/Server.d.ts.map +1 -0
- package/lib/Cloud/Server.js +966 -0
- package/lib/Cloud/Server.js.map +1 -0
- package/lib/Cloud/ServerPool.d.ts +64 -0
- package/lib/Cloud/ServerPool.d.ts.map +1 -0
- package/lib/Cloud/ServerPool.js +59 -0
- package/lib/Cloud/ServerPool.js.map +1 -0
- package/lib/Cloud/ServerPrivateIp.d.ts +62 -0
- package/lib/Cloud/ServerPrivateIp.d.ts.map +1 -0
- package/lib/Cloud/ServerPrivateIp.js +68 -0
- package/lib/Cloud/ServerPrivateIp.js.map +1 -0
- package/lib/Cloud/Service.d.ts +554 -0
- package/lib/Cloud/Service.d.ts.map +1 -0
- package/lib/Cloud/Service.js +765 -0
- package/lib/Cloud/Service.js.map +1 -0
- package/lib/Cloud/ServiceHandler.d.ts +10 -0
- package/lib/Cloud/ServiceHandler.d.ts.map +1 -0
- package/lib/Cloud/ServiceHandler.js +102 -0
- package/lib/Cloud/ServiceHandler.js.map +1 -0
- package/lib/Cloud/Snapshot.d.ts +103 -0
- package/lib/Cloud/Snapshot.d.ts.map +1 -0
- package/lib/Cloud/Snapshot.js +96 -0
- package/lib/Cloud/Snapshot.js.map +1 -0
- package/lib/Cloud/Ssh.d.ts +241 -0
- package/lib/Cloud/Ssh.d.ts.map +1 -0
- package/lib/Cloud/Ssh.js +292 -0
- package/lib/Cloud/Ssh.js.map +1 -0
- package/lib/Cloud/SshKey.d.ts +120 -0
- package/lib/Cloud/SshKey.d.ts.map +1 -0
- package/lib/Cloud/SshKey.js +161 -0
- package/lib/Cloud/SshKey.js.map +1 -0
- package/lib/Cloud/Valkey.d.ts +212 -0
- package/lib/Cloud/Valkey.d.ts.map +1 -0
- package/lib/Cloud/Valkey.js +155 -0
- package/lib/Cloud/Valkey.js.map +1 -0
- package/lib/Cloud/ValkeyScheduledSnapshot.d.ts +75 -0
- package/lib/Cloud/ValkeyScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/ValkeyScheduledSnapshot.js +74 -0
- package/lib/Cloud/ValkeyScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/ValkeySnapshot.d.ts +107 -0
- package/lib/Cloud/ValkeySnapshot.d.ts.map +1 -0
- package/lib/Cloud/ValkeySnapshot.js +80 -0
- package/lib/Cloud/ValkeySnapshot.js.map +1 -0
- package/lib/Cloud/Volume.d.ts +133 -0
- package/lib/Cloud/Volume.d.ts.map +1 -0
- package/lib/Cloud/Volume.js +329 -0
- package/lib/Cloud/Volume.js.map +1 -0
- package/lib/Cloud/VolumeSnapshot.d.ts +95 -0
- package/lib/Cloud/VolumeSnapshot.d.ts.map +1 -0
- package/lib/Cloud/VolumeSnapshot.js +88 -0
- package/lib/Cloud/VolumeSnapshot.js.map +1 -0
- package/lib/Cloud/Webhook.d.ts +93 -0
- package/lib/Cloud/Webhook.d.ts.map +1 -0
- package/lib/Cloud/Webhook.js +92 -0
- package/lib/Cloud/Webhook.js.map +1 -0
- package/lib/Cloud/Website/Astro.d.ts +106 -0
- package/lib/Cloud/Website/Astro.d.ts.map +1 -0
- package/lib/Cloud/Website/Astro.js +76 -0
- package/lib/Cloud/Website/Astro.js.map +1 -0
- package/lib/Cloud/Website/Foldkit.d.ts +70 -0
- package/lib/Cloud/Website/Foldkit.d.ts.map +1 -0
- package/lib/Cloud/Website/Foldkit.js +67 -0
- package/lib/Cloud/Website/Foldkit.js.map +1 -0
- package/lib/Cloud/Website/FrameworkSite.d.ts +277 -0
- package/lib/Cloud/Website/FrameworkSite.d.ts.map +1 -0
- package/lib/Cloud/Website/FrameworkSite.js +245 -0
- package/lib/Cloud/Website/FrameworkSite.js.map +1 -0
- package/lib/Cloud/Website/Nextjs.d.ts +70 -0
- package/lib/Cloud/Website/Nextjs.d.ts.map +1 -0
- package/lib/Cloud/Website/Nextjs.js +66 -0
- package/lib/Cloud/Website/Nextjs.js.map +1 -0
- package/lib/Cloud/Website/Nuxt.d.ts +71 -0
- package/lib/Cloud/Website/Nuxt.d.ts.map +1 -0
- package/lib/Cloud/Website/Nuxt.js +60 -0
- package/lib/Cloud/Website/Nuxt.js.map +1 -0
- package/lib/Cloud/Website/Octane.d.ts +64 -0
- package/lib/Cloud/Website/Octane.d.ts.map +1 -0
- package/lib/Cloud/Website/Octane.js +58 -0
- package/lib/Cloud/Website/Octane.js.map +1 -0
- package/lib/Cloud/Website/Providers.d.ts +16 -0
- package/lib/Cloud/Website/Providers.d.ts.map +1 -0
- package/lib/Cloud/Website/Providers.js +16 -0
- package/lib/Cloud/Website/Providers.js.map +1 -0
- package/lib/Cloud/Website/ReactRouter.d.ts +96 -0
- package/lib/Cloud/Website/ReactRouter.d.ts.map +1 -0
- package/lib/Cloud/Website/ReactRouter.js +90 -0
- package/lib/Cloud/Website/ReactRouter.js.map +1 -0
- package/lib/Cloud/Website/SolidStart.d.ts +108 -0
- package/lib/Cloud/Website/SolidStart.d.ts.map +1 -0
- package/lib/Cloud/Website/SolidStart.js +90 -0
- package/lib/Cloud/Website/SolidStart.js.map +1 -0
- package/lib/Cloud/Website/StaticSite.d.ts +170 -0
- package/lib/Cloud/Website/StaticSite.d.ts.map +1 -0
- package/lib/Cloud/Website/StaticSite.js +193 -0
- package/lib/Cloud/Website/StaticSite.js.map +1 -0
- package/lib/Cloud/Website/SvelteKit.d.ts +70 -0
- package/lib/Cloud/Website/SvelteKit.d.ts.map +1 -0
- package/lib/Cloud/Website/SvelteKit.js +59 -0
- package/lib/Cloud/Website/SvelteKit.js.map +1 -0
- package/lib/Cloud/Website/TanStackStart.d.ts +91 -0
- package/lib/Cloud/Website/TanStackStart.d.ts.map +1 -0
- package/lib/Cloud/Website/TanStackStart.js +85 -0
- package/lib/Cloud/Website/TanStackStart.js.map +1 -0
- package/lib/Cloud/Website/Vinext.d.ts +80 -0
- package/lib/Cloud/Website/Vinext.d.ts.map +1 -0
- package/lib/Cloud/Website/Vinext.js +75 -0
- package/lib/Cloud/Website/Vinext.js.map +1 -0
- package/lib/Cloud/Website/Vite.d.ts +114 -0
- package/lib/Cloud/Website/Vite.d.ts.map +1 -0
- package/lib/Cloud/Website/Vite.js +112 -0
- package/lib/Cloud/Website/Vite.js.map +1 -0
- package/lib/Cloud/Website/Vocs.d.ts +67 -0
- package/lib/Cloud/Website/Vocs.d.ts.map +1 -0
- package/lib/Cloud/Website/Vocs.js +56 -0
- package/lib/Cloud/Website/Vocs.js.map +1 -0
- package/lib/Cloud/Website/Waku.d.ts +71 -0
- package/lib/Cloud/Website/Waku.d.ts.map +1 -0
- package/lib/Cloud/Website/Waku.js +59 -0
- package/lib/Cloud/Website/Waku.js.map +1 -0
- package/lib/Cloud/Website/index.d.ts +16 -0
- package/lib/Cloud/Website/index.d.ts.map +1 -0
- package/lib/Cloud/Website/index.js +17 -0
- package/lib/Cloud/Website/index.js.map +1 -0
- package/lib/Cloud/hosted.d.ts +324 -0
- package/lib/Cloud/hosted.d.ts.map +1 -0
- package/lib/Cloud/hosted.js +750 -0
- package/lib/Cloud/hosted.js.map +1 -0
- package/lib/Cloud/index.d.ts +111 -0
- package/lib/Cloud/index.d.ts.map +1 -0
- package/lib/Cloud/index.js +156 -0
- package/lib/Cloud/index.js.map +1 -0
- package/lib/Contributions.d.ts +12 -0
- package/lib/Contributions.d.ts.map +1 -0
- package/lib/Contributions.js +12 -0
- package/lib/Contributions.js.map +1 -0
- package/lib/Credentials.d.ts +25 -0
- package/lib/Credentials.d.ts.map +1 -0
- package/lib/Credentials.js +35 -0
- package/lib/Credentials.js.map +1 -0
- package/lib/Errors/Application.d.ts +136 -0
- package/lib/Errors/Application.d.ts.map +1 -0
- package/lib/Errors/Application.js +146 -0
- package/lib/Errors/Application.js.map +1 -0
- package/lib/Errors/ApplicationGroup.d.ts +67 -0
- package/lib/Errors/ApplicationGroup.d.ts.map +1 -0
- package/lib/Errors/ApplicationGroup.js +72 -0
- package/lib/Errors/ApplicationGroup.js.map +1 -0
- package/lib/Errors/Dsn.d.ts +87 -0
- package/lib/Errors/Dsn.d.ts.map +1 -0
- package/lib/Errors/Dsn.js +34 -0
- package/lib/Errors/Dsn.js.map +1 -0
- package/lib/Errors/JiraIntegration.d.ts +69 -0
- package/lib/Errors/JiraIntegration.d.ts.map +1 -0
- package/lib/Errors/JiraIntegration.js +64 -0
- package/lib/Errors/JiraIntegration.js.map +1 -0
- package/lib/Errors/LinearIntegration.d.ts +71 -0
- package/lib/Errors/LinearIntegration.d.ts.map +1 -0
- package/lib/Errors/LinearIntegration.js +66 -0
- package/lib/Errors/LinearIntegration.js.map +1 -0
- package/lib/Errors/MicrosoftTeamsIntegration.d.ts +75 -0
- package/lib/Errors/MicrosoftTeamsIntegration.d.ts.map +1 -0
- package/lib/Errors/MicrosoftTeamsIntegration.js +72 -0
- package/lib/Errors/MicrosoftTeamsIntegration.js.map +1 -0
- package/lib/Errors/Reference.d.ts +133 -0
- package/lib/Errors/Reference.d.ts.map +1 -0
- package/lib/Errors/Reference.js +123 -0
- package/lib/Errors/Reference.js.map +1 -0
- package/lib/Errors/RegisterRelease.d.ts +66 -0
- package/lib/Errors/RegisterRelease.d.ts.map +1 -0
- package/lib/Errors/RegisterRelease.js +3 -0
- package/lib/Errors/RegisterRelease.js.map +1 -0
- package/lib/Errors/RegisterReleaseHttp.d.ts +13 -0
- package/lib/Errors/RegisterReleaseHttp.d.ts.map +1 -0
- package/lib/Errors/RegisterReleaseHttp.js +29 -0
- package/lib/Errors/RegisterReleaseHttp.js.map +1 -0
- package/lib/Errors/Release.d.ts +97 -0
- package/lib/Errors/Release.d.ts.map +1 -0
- package/lib/Errors/Release.js +161 -0
- package/lib/Errors/Release.js.map +1 -0
- package/lib/Errors/SlackIntegration.d.ts +66 -0
- package/lib/Errors/SlackIntegration.d.ts.map +1 -0
- package/lib/Errors/SlackIntegration.js +61 -0
- package/lib/Errors/SlackIntegration.js.map +1 -0
- package/lib/Errors/index.d.ts +38 -0
- package/lib/Errors/index.d.ts.map +1 -0
- package/lib/Errors/index.js +46 -0
- package/lib/Errors/index.js.map +1 -0
- package/lib/Incidents/AcknowledgeIncident.d.ts +61 -0
- package/lib/Incidents/AcknowledgeIncident.d.ts.map +1 -0
- package/lib/Incidents/AcknowledgeIncident.js +3 -0
- package/lib/Incidents/AcknowledgeIncident.js.map +1 -0
- package/lib/Incidents/AcknowledgeIncidentHttp.d.ts +12 -0
- package/lib/Incidents/AcknowledgeIncidentHttp.d.ts.map +1 -0
- package/lib/Incidents/AcknowledgeIncidentHttp.js +19 -0
- package/lib/Incidents/AcknowledgeIncidentHttp.js.map +1 -0
- package/lib/Incidents/AmazonSnsIntegration.d.ts +83 -0
- package/lib/Incidents/AmazonSnsIntegration.d.ts.map +1 -0
- package/lib/Incidents/AmazonSnsIntegration.js +91 -0
- package/lib/Incidents/AmazonSnsIntegration.js.map +1 -0
- package/lib/Incidents/AwsCloudWatchIntegration.d.ts +64 -0
- package/lib/Incidents/AwsCloudWatchIntegration.d.ts.map +1 -0
- package/lib/Incidents/AwsCloudWatchIntegration.js +64 -0
- package/lib/Incidents/AwsCloudWatchIntegration.js.map +1 -0
- package/lib/Incidents/AzureIntegration.d.ts +63 -0
- package/lib/Incidents/AzureIntegration.d.ts.map +1 -0
- package/lib/Incidents/AzureIntegration.js +63 -0
- package/lib/Incidents/AzureIntegration.js.map +1 -0
- package/lib/Incidents/BindingHttp.d.ts +28 -0
- package/lib/Incidents/BindingHttp.d.ts.map +1 -0
- package/lib/Incidents/BindingHttp.js +28 -0
- package/lib/Incidents/BindingHttp.js.map +1 -0
- package/lib/Incidents/CatalogRecord.d.ts +69 -0
- package/lib/Incidents/CatalogRecord.d.ts.map +1 -0
- package/lib/Incidents/CatalogRecord.js +69 -0
- package/lib/Incidents/CatalogRecord.js.map +1 -0
- package/lib/Incidents/CatalogRelation.d.ts +78 -0
- package/lib/Incidents/CatalogRelation.d.ts.map +1 -0
- package/lib/Incidents/CatalogRelation.js +79 -0
- package/lib/Incidents/CatalogRelation.js.map +1 -0
- package/lib/Incidents/CreateIncident.d.ts +67 -0
- package/lib/Incidents/CreateIncident.d.ts.map +1 -0
- package/lib/Incidents/CreateIncident.js +3 -0
- package/lib/Incidents/CreateIncident.js.map +1 -0
- package/lib/Incidents/CreateIncidentHttp.d.ts +12 -0
- package/lib/Incidents/CreateIncidentHttp.d.ts.map +1 -0
- package/lib/Incidents/CreateIncidentHttp.js +19 -0
- package/lib/Incidents/CreateIncidentHttp.js.map +1 -0
- package/lib/Incidents/CreateStatusReport.d.ts +71 -0
- package/lib/Incidents/CreateStatusReport.d.ts.map +1 -0
- package/lib/Incidents/CreateStatusReport.js +3 -0
- package/lib/Incidents/CreateStatusReport.js.map +1 -0
- package/lib/Incidents/CreateStatusReportHttp.d.ts +12 -0
- package/lib/Incidents/CreateStatusReportHttp.d.ts.map +1 -0
- package/lib/Incidents/CreateStatusReportHttp.js +27 -0
- package/lib/Incidents/CreateStatusReportHttp.js.map +1 -0
- package/lib/Incidents/CreateStatusUpdate.d.ts +67 -0
- package/lib/Incidents/CreateStatusUpdate.d.ts.map +1 -0
- package/lib/Incidents/CreateStatusUpdate.js +3 -0
- package/lib/Incidents/CreateStatusUpdate.js.map +1 -0
- package/lib/Incidents/CreateStatusUpdateHttp.d.ts +12 -0
- package/lib/Incidents/CreateStatusUpdateHttp.d.ts.map +1 -0
- package/lib/Incidents/CreateStatusUpdateHttp.js +27 -0
- package/lib/Incidents/CreateStatusUpdateHttp.js.map +1 -0
- package/lib/Incidents/DatadogIntegration.d.ts +70 -0
- package/lib/Incidents/DatadogIntegration.d.ts.map +1 -0
- package/lib/Incidents/DatadogIntegration.js +70 -0
- package/lib/Incidents/DatadogIntegration.js.map +1 -0
- package/lib/Incidents/ElasticIntegration.d.ts +62 -0
- package/lib/Incidents/ElasticIntegration.d.ts.map +1 -0
- package/lib/Incidents/ElasticIntegration.js +62 -0
- package/lib/Incidents/ElasticIntegration.js.map +1 -0
- package/lib/Incidents/EscalationPolicy.d.ts +106 -0
- package/lib/Incidents/EscalationPolicy.d.ts.map +1 -0
- package/lib/Incidents/EscalationPolicy.js +103 -0
- package/lib/Incidents/EscalationPolicy.js.map +1 -0
- package/lib/Incidents/EscalationPolicyGroup.d.ts +49 -0
- package/lib/Incidents/EscalationPolicyGroup.d.ts.map +1 -0
- package/lib/Incidents/EscalationPolicyGroup.js +48 -0
- package/lib/Incidents/EscalationPolicyGroup.js.map +1 -0
- package/lib/Incidents/FailHeartbeat.d.ts +49 -0
- package/lib/Incidents/FailHeartbeat.d.ts.map +1 -0
- package/lib/Incidents/FailHeartbeat.js +3 -0
- package/lib/Incidents/FailHeartbeat.js.map +1 -0
- package/lib/Incidents/FailHeartbeatHttp.d.ts +12 -0
- package/lib/Incidents/FailHeartbeatHttp.d.ts.map +1 -0
- package/lib/Incidents/FailHeartbeatHttp.js +22 -0
- package/lib/Incidents/FailHeartbeatHttp.js.map +1 -0
- package/lib/Incidents/GoogleMonitoringIntegration.d.ts +63 -0
- package/lib/Incidents/GoogleMonitoringIntegration.d.ts.map +1 -0
- package/lib/Incidents/GoogleMonitoringIntegration.js +63 -0
- package/lib/Incidents/GoogleMonitoringIntegration.js.map +1 -0
- package/lib/Incidents/GrafanaIntegration.d.ts +73 -0
- package/lib/Incidents/GrafanaIntegration.d.ts.map +1 -0
- package/lib/Incidents/GrafanaIntegration.js +73 -0
- package/lib/Incidents/GrafanaIntegration.js.map +1 -0
- package/lib/Incidents/Heartbeat.d.ts +99 -0
- package/lib/Incidents/Heartbeat.d.ts.map +1 -0
- package/lib/Incidents/Heartbeat.js +104 -0
- package/lib/Incidents/Heartbeat.js.map +1 -0
- package/lib/Incidents/HeartbeatGroup.d.ts +49 -0
- package/lib/Incidents/HeartbeatGroup.d.ts.map +1 -0
- package/lib/Incidents/HeartbeatGroup.js +48 -0
- package/lib/Incidents/HeartbeatGroup.js.map +1 -0
- package/lib/Incidents/IncomingEmailIntegration.d.ts +71 -0
- package/lib/Incidents/IncomingEmailIntegration.d.ts.map +1 -0
- package/lib/Incidents/IncomingEmailIntegration.js +81 -0
- package/lib/Incidents/IncomingEmailIntegration.js.map +1 -0
- package/lib/Incidents/IncomingWebhookIntegration.d.ts +85 -0
- package/lib/Incidents/IncomingWebhookIntegration.d.ts.map +1 -0
- package/lib/Incidents/IncomingWebhookIntegration.js +95 -0
- package/lib/Incidents/IncomingWebhookIntegration.js.map +1 -0
- package/lib/Incidents/JiraIntegration.d.ts +59 -0
- package/lib/Incidents/JiraIntegration.d.ts.map +1 -0
- package/lib/Incidents/JiraIntegration.js +50 -0
- package/lib/Incidents/JiraIntegration.js.map +1 -0
- package/lib/Incidents/LinearIntegration.d.ts +62 -0
- package/lib/Incidents/LinearIntegration.d.ts.map +1 -0
- package/lib/Incidents/LinearIntegration.js +60 -0
- package/lib/Incidents/LinearIntegration.js.map +1 -0
- package/lib/Incidents/Metadata.d.ts +85 -0
- package/lib/Incidents/Metadata.d.ts.map +1 -0
- package/lib/Incidents/Metadata.js +91 -0
- package/lib/Incidents/Metadata.js.map +1 -0
- package/lib/Incidents/Monitor.d.ts +91 -0
- package/lib/Incidents/Monitor.d.ts.map +1 -0
- package/lib/Incidents/Monitor.js +107 -0
- package/lib/Incidents/Monitor.js.map +1 -0
- package/lib/Incidents/MonitorGroup.d.ts +57 -0
- package/lib/Incidents/MonitorGroup.d.ts.map +1 -0
- package/lib/Incidents/MonitorGroup.js +56 -0
- package/lib/Incidents/MonitorGroup.js.map +1 -0
- package/lib/Incidents/NewRelicIntegration.d.ts +70 -0
- package/lib/Incidents/NewRelicIntegration.d.ts.map +1 -0
- package/lib/Incidents/NewRelicIntegration.js +70 -0
- package/lib/Incidents/NewRelicIntegration.js.map +1 -0
- package/lib/Incidents/OnCallRotation.d.ts +96 -0
- package/lib/Incidents/OnCallRotation.d.ts.map +1 -0
- package/lib/Incidents/OnCallRotation.js +206 -0
- package/lib/Incidents/OnCallRotation.js.map +1 -0
- package/lib/Incidents/OnCallSchedule.d.ts +80 -0
- package/lib/Incidents/OnCallSchedule.d.ts.map +1 -0
- package/lib/Incidents/OnCallSchedule.js +73 -0
- package/lib/Incidents/OnCallSchedule.js.map +1 -0
- package/lib/Incidents/OutgoingEmailIntegration.d.ts +54 -0
- package/lib/Incidents/OutgoingEmailIntegration.d.ts.map +1 -0
- package/lib/Incidents/OutgoingEmailIntegration.js +53 -0
- package/lib/Incidents/OutgoingEmailIntegration.js.map +1 -0
- package/lib/Incidents/OutgoingPagerDutyIntegration.d.ts +48 -0
- package/lib/Incidents/OutgoingPagerDutyIntegration.d.ts.map +1 -0
- package/lib/Incidents/OutgoingPagerDutyIntegration.js +47 -0
- package/lib/Incidents/OutgoingPagerDutyIntegration.js.map +1 -0
- package/lib/Incidents/OutgoingWebhookIntegration.d.ts +83 -0
- package/lib/Incidents/OutgoingWebhookIntegration.d.ts.map +1 -0
- package/lib/Incidents/OutgoingWebhookIntegration.js +98 -0
- package/lib/Incidents/OutgoingWebhookIntegration.js.map +1 -0
- package/lib/Incidents/PrometheusIntegration.d.ts +77 -0
- package/lib/Incidents/PrometheusIntegration.d.ts.map +1 -0
- package/lib/Incidents/PrometheusIntegration.js +77 -0
- package/lib/Incidents/PrometheusIntegration.js.map +1 -0
- package/lib/Incidents/Reference.d.ts +140 -0
- package/lib/Incidents/Reference.d.ts.map +1 -0
- package/lib/Incidents/Reference.js +136 -0
- package/lib/Incidents/Reference.js.map +1 -0
- package/lib/Incidents/ReportHeartbeat.d.ts +106 -0
- package/lib/Incidents/ReportHeartbeat.d.ts.map +1 -0
- package/lib/Incidents/ReportHeartbeat.js +63 -0
- package/lib/Incidents/ReportHeartbeat.js.map +1 -0
- package/lib/Incidents/ReportHeartbeatHttp.d.ts +12 -0
- package/lib/Incidents/ReportHeartbeatHttp.d.ts.map +1 -0
- package/lib/Incidents/ReportHeartbeatHttp.js +22 -0
- package/lib/Incidents/ReportHeartbeatHttp.js.map +1 -0
- package/lib/Incidents/ResolveIncident.d.ts +60 -0
- package/lib/Incidents/ResolveIncident.d.ts.map +1 -0
- package/lib/Incidents/ResolveIncident.js +3 -0
- package/lib/Incidents/ResolveIncident.js.map +1 -0
- package/lib/Incidents/ResolveIncidentHttp.d.ts +12 -0
- package/lib/Incidents/ResolveIncidentHttp.d.ts.map +1 -0
- package/lib/Incidents/ResolveIncidentHttp.js +19 -0
- package/lib/Incidents/ResolveIncidentHttp.js.map +1 -0
- package/lib/Incidents/SendHeartbeat.d.ts +56 -0
- package/lib/Incidents/SendHeartbeat.d.ts.map +1 -0
- package/lib/Incidents/SendHeartbeat.js +3 -0
- package/lib/Incidents/SendHeartbeat.js.map +1 -0
- package/lib/Incidents/SendHeartbeatHttp.d.ts +12 -0
- package/lib/Incidents/SendHeartbeatHttp.d.ts.map +1 -0
- package/lib/Incidents/SendHeartbeatHttp.js +22 -0
- package/lib/Incidents/SendHeartbeatHttp.js.map +1 -0
- package/lib/Incidents/Severity.d.ts +83 -0
- package/lib/Incidents/Severity.d.ts.map +1 -0
- package/lib/Incidents/Severity.js +79 -0
- package/lib/Incidents/Severity.js.map +1 -0
- package/lib/Incidents/SeverityGroup.d.ts +51 -0
- package/lib/Incidents/SeverityGroup.d.ts.map +1 -0
- package/lib/Incidents/SeverityGroup.js +50 -0
- package/lib/Incidents/SeverityGroup.js.map +1 -0
- package/lib/Incidents/SplunkOnCallIntegration.d.ts +46 -0
- package/lib/Incidents/SplunkOnCallIntegration.d.ts.map +1 -0
- package/lib/Incidents/SplunkOnCallIntegration.js +45 -0
- package/lib/Incidents/SplunkOnCallIntegration.js.map +1 -0
- package/lib/Incidents/StatusPage.d.ts +125 -0
- package/lib/Incidents/StatusPage.d.ts.map +1 -0
- package/lib/Incidents/StatusPage.js +133 -0
- package/lib/Incidents/StatusPage.js.map +1 -0
- package/lib/Incidents/StatusPageGroup.d.ts +50 -0
- package/lib/Incidents/StatusPageGroup.d.ts.map +1 -0
- package/lib/Incidents/StatusPageGroup.js +49 -0
- package/lib/Incidents/StatusPageGroup.js.map +1 -0
- package/lib/Incidents/StatusPageResource.d.ts +91 -0
- package/lib/Incidents/StatusPageResource.d.ts.map +1 -0
- package/lib/Incidents/StatusPageResource.js +87 -0
- package/lib/Incidents/StatusPageResource.js.map +1 -0
- package/lib/Incidents/StatusPageSection.d.ts +65 -0
- package/lib/Incidents/StatusPageSection.d.ts.map +1 -0
- package/lib/Incidents/StatusPageSection.js +65 -0
- package/lib/Incidents/StatusPageSection.js.map +1 -0
- package/lib/Incidents/StatusPageSubscriber.d.ts +93 -0
- package/lib/Incidents/StatusPageSubscriber.d.ts.map +1 -0
- package/lib/Incidents/StatusPageSubscriber.js +100 -0
- package/lib/Incidents/StatusPageSubscriber.js.map +1 -0
- package/lib/Incidents/index.d.ts +108 -0
- package/lib/Incidents/index.d.ts.map +1 -0
- package/lib/Incidents/index.js +143 -0
- package/lib/Incidents/index.js.map +1 -0
- package/lib/Incidents/integrationFields.d.ts +124 -0
- package/lib/Incidents/integrationFields.d.ts.map +1 -0
- package/lib/Incidents/integrationFields.js +74 -0
- package/lib/Incidents/integrationFields.js.map +1 -0
- package/lib/Providers.d.ts +36 -0
- package/lib/Providers.d.ts.map +1 -0
- package/lib/Providers.js +54 -0
- package/lib/Providers.js.map +1 -0
- package/lib/Telemetry/Alert.d.ts +99 -0
- package/lib/Telemetry/Alert.d.ts.map +1 -0
- package/lib/Telemetry/Alert.js +91 -0
- package/lib/Telemetry/Alert.js.map +1 -0
- package/lib/Telemetry/AwsLogGroupSubscription.d.ts +57 -0
- package/lib/Telemetry/AwsLogGroupSubscription.d.ts.map +1 -0
- package/lib/Telemetry/AwsLogGroupSubscription.js +57 -0
- package/lib/Telemetry/AwsLogGroupSubscription.js.map +1 -0
- package/lib/Telemetry/BindingHttp.d.ts +23 -0
- package/lib/Telemetry/BindingHttp.d.ts.map +1 -0
- package/lib/Telemetry/BindingHttp.js +25 -0
- package/lib/Telemetry/BindingHttp.js.map +1 -0
- package/lib/Telemetry/Chart.d.ts +171 -0
- package/lib/Telemetry/Chart.d.ts.map +1 -0
- package/lib/Telemetry/Chart.js +92 -0
- package/lib/Telemetry/Chart.js.map +1 -0
- package/lib/Telemetry/Collector.d.ts +78 -0
- package/lib/Telemetry/Collector.d.ts.map +1 -0
- package/lib/Telemetry/Collector.js +111 -0
- package/lib/Telemetry/Collector.js.map +1 -0
- package/lib/Telemetry/CollectorTarget.d.ts +69 -0
- package/lib/Telemetry/CollectorTarget.d.ts.map +1 -0
- package/lib/Telemetry/CollectorTarget.js +69 -0
- package/lib/Telemetry/CollectorTarget.js.map +1 -0
- package/lib/Telemetry/Connection.d.ts +79 -0
- package/lib/Telemetry/Connection.d.ts.map +1 -0
- package/lib/Telemetry/Connection.js +128 -0
- package/lib/Telemetry/Connection.js.map +1 -0
- package/lib/Telemetry/Dashboard.d.ts +108 -0
- package/lib/Telemetry/Dashboard.d.ts.map +1 -0
- package/lib/Telemetry/Dashboard.js +112 -0
- package/lib/Telemetry/Dashboard.js.map +1 -0
- package/lib/Telemetry/DashboardChart.d.ts +104 -0
- package/lib/Telemetry/DashboardChart.d.ts.map +1 -0
- package/lib/Telemetry/DashboardChart.js +119 -0
- package/lib/Telemetry/DashboardChart.js.map +1 -0
- package/lib/Telemetry/DashboardGroup.d.ts +53 -0
- package/lib/Telemetry/DashboardGroup.d.ts.map +1 -0
- package/lib/Telemetry/DashboardGroup.js +47 -0
- package/lib/Telemetry/DashboardGroup.js.map +1 -0
- package/lib/Telemetry/DashboardSection.d.ts +65 -0
- package/lib/Telemetry/DashboardSection.d.ts.map +1 -0
- package/lib/Telemetry/DashboardSection.js +65 -0
- package/lib/Telemetry/DashboardSection.js.map +1 -0
- package/lib/Telemetry/Exploration.d.ts +77 -0
- package/lib/Telemetry/Exploration.d.ts.map +1 -0
- package/lib/Telemetry/Exploration.js +97 -0
- package/lib/Telemetry/Exploration.js.map +1 -0
- package/lib/Telemetry/ExplorationGroup.d.ts +58 -0
- package/lib/Telemetry/ExplorationGroup.d.ts.map +1 -0
- package/lib/Telemetry/ExplorationGroup.js +52 -0
- package/lib/Telemetry/ExplorationGroup.js.map +1 -0
- package/lib/Telemetry/Export.d.ts +183 -0
- package/lib/Telemetry/Export.d.ts.map +1 -0
- package/lib/Telemetry/Export.js +152 -0
- package/lib/Telemetry/Export.js.map +1 -0
- package/lib/Telemetry/ExtractedMetric.d.ts +67 -0
- package/lib/Telemetry/ExtractedMetric.d.ts.map +1 -0
- package/lib/Telemetry/ExtractedMetric.js +66 -0
- package/lib/Telemetry/ExtractedMetric.js.map +1 -0
- package/lib/Telemetry/IngestLogs.d.ts +87 -0
- package/lib/Telemetry/IngestLogs.d.ts.map +1 -0
- package/lib/Telemetry/IngestLogs.js +3 -0
- package/lib/Telemetry/IngestLogs.js.map +1 -0
- package/lib/Telemetry/IngestLogsHttp.d.ts +12 -0
- package/lib/Telemetry/IngestLogsHttp.d.ts.map +1 -0
- package/lib/Telemetry/IngestLogsHttp.js +21 -0
- package/lib/Telemetry/IngestLogsHttp.js.map +1 -0
- package/lib/Telemetry/IngestMetrics.d.ts +68 -0
- package/lib/Telemetry/IngestMetrics.d.ts.map +1 -0
- package/lib/Telemetry/IngestMetrics.js +3 -0
- package/lib/Telemetry/IngestMetrics.js.map +1 -0
- package/lib/Telemetry/IngestMetricsHttp.d.ts +12 -0
- package/lib/Telemetry/IngestMetricsHttp.d.ts.map +1 -0
- package/lib/Telemetry/IngestMetricsHttp.js +21 -0
- package/lib/Telemetry/IngestMetricsHttp.js.map +1 -0
- package/lib/Telemetry/OtelHeaders.d.ts +36 -0
- package/lib/Telemetry/OtelHeaders.d.ts.map +1 -0
- package/lib/Telemetry/OtelHeaders.js +34 -0
- package/lib/Telemetry/OtelHeaders.js.map +1 -0
- package/lib/Telemetry/Query.d.ts +66 -0
- package/lib/Telemetry/Query.d.ts.map +1 -0
- package/lib/Telemetry/Query.js +3 -0
- package/lib/Telemetry/Query.js.map +1 -0
- package/lib/Telemetry/QueryHttp.d.ts +12 -0
- package/lib/Telemetry/QueryHttp.d.ts.map +1 -0
- package/lib/Telemetry/QueryHttp.js +24 -0
- package/lib/Telemetry/QueryHttp.js.map +1 -0
- package/lib/Telemetry/Reference.d.ts +115 -0
- package/lib/Telemetry/Reference.d.ts.map +1 -0
- package/lib/Telemetry/Reference.js +110 -0
- package/lib/Telemetry/Reference.js.map +1 -0
- package/lib/Telemetry/ShipLogs.d.ts +89 -0
- package/lib/Telemetry/ShipLogs.d.ts.map +1 -0
- package/lib/Telemetry/ShipLogs.js +119 -0
- package/lib/Telemetry/ShipLogs.js.map +1 -0
- package/lib/Telemetry/Source.d.ts +184 -0
- package/lib/Telemetry/Source.d.ts.map +1 -0
- package/lib/Telemetry/Source.js +238 -0
- package/lib/Telemetry/Source.js.map +1 -0
- package/lib/Telemetry/SourceAwsAccount.d.ts +73 -0
- package/lib/Telemetry/SourceAwsAccount.d.ts.map +1 -0
- package/lib/Telemetry/SourceAwsAccount.js +57 -0
- package/lib/Telemetry/SourceAwsAccount.js.map +1 -0
- package/lib/Telemetry/SourceGcpProject.d.ts +81 -0
- package/lib/Telemetry/SourceGcpProject.d.ts.map +1 -0
- package/lib/Telemetry/SourceGcpProject.js +69 -0
- package/lib/Telemetry/SourceGcpProject.js.map +1 -0
- package/lib/Telemetry/SourceGroup.d.ts +65 -0
- package/lib/Telemetry/SourceGroup.d.ts.map +1 -0
- package/lib/Telemetry/SourceGroup.js +67 -0
- package/lib/Telemetry/SourceGroup.js.map +1 -0
- package/lib/Telemetry/customBucket.d.ts +26 -0
- package/lib/Telemetry/customBucket.d.ts.map +1 -0
- package/lib/Telemetry/customBucket.js +45 -0
- package/lib/Telemetry/customBucket.js.map +1 -0
- package/lib/Telemetry/index.d.ts +64 -0
- package/lib/Telemetry/index.d.ts.map +1 -0
- package/lib/Telemetry/index.js +81 -0
- package/lib/Telemetry/index.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -0
- package/lib/internal/DeployRetry.d.ts +19 -0
- package/lib/internal/DeployRetry.d.ts.map +1 -0
- package/lib/internal/DeployRetry.js +52 -0
- package/lib/internal/DeployRetry.js.map +1 -0
- package/lib/internal/actionWait.d.ts +12 -0
- package/lib/internal/actionWait.d.ts.map +1 -0
- package/lib/internal/actionWait.js +21 -0
- package/lib/internal/actionWait.js.map +1 -0
- package/lib/internal/applicationIds.d.ts +17 -0
- package/lib/internal/applicationIds.d.ts.map +1 -0
- package/lib/internal/applicationIds.js +12 -0
- package/lib/internal/applicationIds.js.map +1 -0
- package/lib/internal/attachments.d.ts +23 -0
- package/lib/internal/attachments.d.ts.map +1 -0
- package/lib/internal/attachments.js +22 -0
- package/lib/internal/attachments.js.map +1 -0
- package/lib/internal/budget.d.ts +46 -0
- package/lib/internal/budget.d.ts.map +1 -0
- package/lib/internal/budget.js +44 -0
- package/lib/internal/budget.js.map +1 -0
- package/lib/internal/connection.d.ts +65 -0
- package/lib/internal/connection.d.ts.map +1 -0
- package/lib/internal/connection.js +160 -0
- package/lib/internal/connection.js.map +1 -0
- package/lib/internal/crud.d.ts +195 -0
- package/lib/internal/crud.d.ts.map +1 -0
- package/lib/internal/crud.js +614 -0
- package/lib/internal/crud.js.map +1 -0
- package/lib/internal/errors.d.ts +35 -0
- package/lib/internal/errors.d.ts.map +1 -0
- package/lib/internal/errors.js +19 -0
- package/lib/internal/errors.js.map +1 -0
- package/lib/internal/fields.d.ts +47 -0
- package/lib/internal/fields.d.ts.map +1 -0
- package/lib/internal/fields.js +136 -0
- package/lib/internal/fields.js.map +1 -0
- package/lib/internal/gone.d.ts +13 -0
- package/lib/internal/gone.d.ts.map +1 -0
- package/lib/internal/gone.js +14 -0
- package/lib/internal/gone.js.map +1 -0
- package/lib/internal/managedDatabase.d.ts +137 -0
- package/lib/internal/managedDatabase.d.ts.map +1 -0
- package/lib/internal/managedDatabase.js +186 -0
- package/lib/internal/managedDatabase.js.map +1 -0
- package/lib/internal/managedService.d.ts +184 -0
- package/lib/internal/managedService.d.ts.map +1 -0
- package/lib/internal/managedService.js +208 -0
- package/lib/internal/managedService.js.map +1 -0
- package/lib/internal/migrations.d.ts +138 -0
- package/lib/internal/migrations.d.ts.map +1 -0
- package/lib/internal/migrations.js +288 -0
- package/lib/internal/migrations.js.map +1 -0
- package/lib/internal/ops.d.ts +43 -0
- package/lib/internal/ops.d.ts.map +1 -0
- package/lib/internal/ops.js +46 -0
- package/lib/internal/ops.js.map +1 -0
- package/lib/internal/ownership.d.ts +55 -0
- package/lib/internal/ownership.d.ts.map +1 -0
- package/lib/internal/ownership.js +74 -0
- package/lib/internal/ownership.js.map +1 -0
- package/lib/internal/reference.d.ts +36 -0
- package/lib/internal/reference.d.ts.map +1 -0
- package/lib/internal/reference.js +49 -0
- package/lib/internal/reference.js.map +1 -0
- package/lib/internal/scope.d.ts +51 -0
- package/lib/internal/scope.d.ts.map +1 -0
- package/lib/internal/scope.js +34 -0
- package/lib/internal/scope.js.map +1 -0
- package/lib/internal/snapshot.d.ts +120 -0
- package/lib/internal/snapshot.d.ts.map +1 -0
- package/lib/internal/snapshot.js +92 -0
- package/lib/internal/snapshot.js.map +1 -0
- package/lib/internal/unpaged.d.ts +22 -0
- package/lib/internal/unpaged.d.ts.map +1 -0
- package/lib/internal/unpaged.js +17 -0
- package/lib/internal/unpaged.js.map +1 -0
- package/lib/internal/wait.d.ts +55 -0
- package/lib/internal/wait.d.ts.map +1 -0
- package/lib/internal/wait.js +56 -0
- package/lib/internal/wait.js.map +1 -0
- package/lib/sdk/credentials.d.ts +97 -0
- package/lib/sdk/credentials.d.ts.map +1 -0
- package/lib/sdk/credentials.js +135 -0
- package/lib/sdk/credentials.js.map +1 -0
- package/lib/sdk/errors.d.ts +98 -0
- package/lib/sdk/errors.d.ts.map +1 -0
- package/lib/sdk/errors.js +86 -0
- package/lib/sdk/errors.js.map +1 -0
- package/lib/sdk/index.d.ts +49 -0
- package/lib/sdk/index.d.ts.map +1 -0
- package/lib/sdk/index.js +49 -0
- package/lib/sdk/index.js.map +1 -0
- package/lib/sdk/pagination.d.ts +35 -0
- package/lib/sdk/pagination.d.ts.map +1 -0
- package/lib/sdk/pagination.js +80 -0
- package/lib/sdk/pagination.js.map +1 -0
- package/lib/sdk/protocol.d.ts +109 -0
- package/lib/sdk/protocol.d.ts.map +1 -0
- package/lib/sdk/protocol.js +451 -0
- package/lib/sdk/protocol.js.map +1 -0
- package/lib/sdk/retry.d.ts +32 -0
- package/lib/sdk/retry.d.ts.map +1 -0
- package/lib/sdk/retry.js +33 -0
- package/lib/sdk/retry.js.map +1 -0
- package/lib/sdk/services/account.d.ts +372 -0
- package/lib/sdk/services/account.d.ts.map +1 -0
- package/lib/sdk/services/account.js +553 -0
- package/lib/sdk/services/account.js.map +1 -0
- package/lib/sdk/services/cloud.d.ts +11910 -0
- package/lib/sdk/services/cloud.d.ts.map +1 -0
- package/lib/sdk/services/cloud.js +18446 -0
- package/lib/sdk/services/cloud.js.map +1 -0
- package/lib/sdk/services/errors.d.ts +2203 -0
- package/lib/sdk/services/errors.d.ts.map +1 -0
- package/lib/sdk/services/errors.js +2676 -0
- package/lib/sdk/services/errors.js.map +1 -0
- package/lib/sdk/services/heartbeat.d.ts +36 -0
- package/lib/sdk/services/heartbeat.d.ts.map +1 -0
- package/lib/sdk/services/heartbeat.js +94 -0
- package/lib/sdk/services/heartbeat.js.map +1 -0
- package/lib/sdk/services/incidents.d.ts +9948 -0
- package/lib/sdk/services/incidents.d.ts.map +1 -0
- package/lib/sdk/services/incidents.js +9730 -0
- package/lib/sdk/services/incidents.js.map +1 -0
- package/lib/sdk/services/index.d.ts +8 -0
- package/lib/sdk/services/index.d.ts.map +1 -0
- package/lib/sdk/services/index.js +9 -0
- package/lib/sdk/services/index.js.map +1 -0
- package/lib/sdk/services/ingest.d.ts +158 -0
- package/lib/sdk/services/ingest.d.ts.map +1 -0
- package/lib/sdk/services/ingest.js +200 -0
- package/lib/sdk/services/ingest.js.map +1 -0
- package/lib/sdk/services/telemetry.d.ts +6789 -0
- package/lib/sdk/services/telemetry.d.ts.map +1 -0
- package/lib/sdk/services/telemetry.js +5613 -0
- package/lib/sdk/services/telemetry.js.map +1 -0
- package/lib/sdk/traits.d.ts +26 -0
- package/lib/sdk/traits.d.ts.map +1 -0
- package/lib/sdk/traits.js +15 -0
- package/lib/sdk/traits.js.map +1 -0
- package/package.json +190 -4
- package/src/Account/Reference.ts +120 -0
- package/src/Account/Team.ts +106 -0
- package/src/Account/TeamMember.ts +218 -0
- package/src/Account/index.ts +27 -0
- package/src/AuthProvider.ts +172 -0
- package/src/BetterStackBindings.ts +447 -0
- package/src/Cloud/Bootstrap.ts +116 -0
- package/src/Cloud/Certificate.ts +146 -0
- package/src/Cloud/ClickHouse.ts +272 -0
- package/src/Cloud/ClickHouseScheduledSnapshot.ts +114 -0
- package/src/Cloud/ClickHouseSnapshot.ts +137 -0
- package/src/Cloud/Firewall.ts +277 -0
- package/src/Cloud/FirewallRule.ts +175 -0
- package/src/Cloud/InferEnv.ts +30 -0
- package/src/Cloud/Kafka.ts +301 -0
- package/src/Cloud/KafkaTopic.ts +129 -0
- package/src/Cloud/KafkaUser.ts +175 -0
- package/src/Cloud/KubernetesCluster.ts +312 -0
- package/src/Cloud/KubernetesNodePool.ts +196 -0
- package/src/Cloud/KubernetesScheduledSnapshot.ts +116 -0
- package/src/Cloud/LoadBalancer.ts +336 -0
- package/src/Cloud/LoadBalancerService.ts +181 -0
- package/src/Cloud/LoadBalancerTarget.ts +203 -0
- package/src/Cloud/MountVolume.ts +167 -0
- package/src/Cloud/MySQL.ts +363 -0
- package/src/Cloud/MySQLScheduledSnapshot.ts +111 -0
- package/src/Cloud/MySQLSnapshot.ts +133 -0
- package/src/Cloud/Network.ts +116 -0
- package/src/Cloud/ObjectCache.ts +420 -0
- package/src/Cloud/ObjectCacheBucket.ts +197 -0
- package/src/Cloud/Otlp.ts +131 -0
- package/src/Cloud/PlacementGroup.ts +132 -0
- package/src/Cloud/Postgres.ts +410 -0
- package/src/Cloud/PostgresDatabase.ts +118 -0
- package/src/Cloud/PostgresScheduledSnapshot.ts +111 -0
- package/src/Cloud/PostgresSnapshot.ts +133 -0
- package/src/Cloud/PostgresUser.ts +175 -0
- package/src/Cloud/Reference.ts +743 -0
- package/src/Cloud/ReservedIp.ts +214 -0
- package/src/Cloud/ScheduledSnapshot.ts +75 -0
- package/src/Cloud/ScheduledVolumeSnapshot.ts +76 -0
- package/src/Cloud/Server.ts +1469 -0
- package/src/Cloud/ServerPool.ts +100 -0
- package/src/Cloud/ServerPrivateIp.ts +109 -0
- package/src/Cloud/Service.ts +1101 -0
- package/src/Cloud/ServiceHandler.ts +113 -0
- package/src/Cloud/Snapshot.ts +161 -0
- package/src/Cloud/Ssh.ts +528 -0
- package/src/Cloud/SshKey.ts +241 -0
- package/src/Cloud/Valkey.ts +284 -0
- package/src/Cloud/ValkeyScheduledSnapshot.ts +112 -0
- package/src/Cloud/ValkeySnapshot.ts +135 -0
- package/src/Cloud/Volume.ts +522 -0
- package/src/Cloud/VolumeSnapshot.ts +153 -0
- package/src/Cloud/Webhook.ts +145 -0
- package/src/Cloud/Website/Astro.ts +118 -0
- package/src/Cloud/Website/Foldkit.ts +78 -0
- package/src/Cloud/Website/FrameworkSite.ts +499 -0
- package/src/Cloud/Website/Nextjs.ts +70 -0
- package/src/Cloud/Website/Nuxt.ts +72 -0
- package/src/Cloud/Website/Octane.ts +63 -0
- package/src/Cloud/Website/Providers.ts +20 -0
- package/src/Cloud/Website/ReactRouter.ts +96 -0
- package/src/Cloud/Website/SolidStart.ts +109 -0
- package/src/Cloud/Website/StaticSite.ts +273 -0
- package/src/Cloud/Website/SvelteKit.ts +71 -0
- package/src/Cloud/Website/TanStackStart.ts +91 -0
- package/src/Cloud/Website/Vinext.ts +79 -0
- package/src/Cloud/Website/Vite.ts +131 -0
- package/src/Cloud/Website/Vocs.ts +69 -0
- package/src/Cloud/Website/Waku.ts +76 -0
- package/src/Cloud/Website/index.ts +16 -0
- package/src/Cloud/hosted.ts +1022 -0
- package/src/Cloud/index.ts +223 -0
- package/src/Contributions.ts +15 -0
- package/src/Credentials.ts +70 -0
- package/src/Errors/Application.ts +208 -0
- package/src/Errors/ApplicationGroup.ts +119 -0
- package/src/Errors/Dsn.ts +119 -0
- package/src/Errors/JiraIntegration.ts +108 -0
- package/src/Errors/LinearIntegration.ts +112 -0
- package/src/Errors/MicrosoftTeamsIntegration.ts +121 -0
- package/src/Errors/Reference.ts +189 -0
- package/src/Errors/RegisterRelease.ts +77 -0
- package/src/Errors/RegisterReleaseHttp.ts +47 -0
- package/src/Errors/Release.ts +241 -0
- package/src/Errors/SlackIntegration.ts +105 -0
- package/src/Errors/index.ts +60 -0
- package/src/Incidents/AcknowledgeIncident.ts +78 -0
- package/src/Incidents/AcknowledgeIncidentHttp.ts +28 -0
- package/src/Incidents/AmazonSnsIntegration.ts +134 -0
- package/src/Incidents/AwsCloudWatchIntegration.ts +99 -0
- package/src/Incidents/AzureIntegration.ts +95 -0
- package/src/Incidents/BindingHttp.ts +62 -0
- package/src/Incidents/CatalogRecord.ts +106 -0
- package/src/Incidents/CatalogRelation.ts +111 -0
- package/src/Incidents/CreateIncident.ts +81 -0
- package/src/Incidents/CreateIncidentHttp.ts +28 -0
- package/src/Incidents/CreateStatusReport.ts +88 -0
- package/src/Incidents/CreateStatusReportHttp.ts +35 -0
- package/src/Incidents/CreateStatusUpdate.ts +84 -0
- package/src/Incidents/CreateStatusUpdateHttp.ts +35 -0
- package/src/Incidents/DatadogIntegration.ts +102 -0
- package/src/Incidents/ElasticIntegration.ts +94 -0
- package/src/Incidents/EscalationPolicy.ts +144 -0
- package/src/Incidents/EscalationPolicyGroup.ts +82 -0
- package/src/Incidents/FailHeartbeat.ts +55 -0
- package/src/Incidents/FailHeartbeatHttp.ts +28 -0
- package/src/Incidents/GoogleMonitoringIntegration.ts +98 -0
- package/src/Incidents/GrafanaIntegration.ts +105 -0
- package/src/Incidents/Heartbeat.ts +143 -0
- package/src/Incidents/HeartbeatGroup.ts +83 -0
- package/src/Incidents/IncomingEmailIntegration.ts +120 -0
- package/src/Incidents/IncomingWebhookIntegration.ts +141 -0
- package/src/Incidents/JiraIntegration.ts +83 -0
- package/src/Incidents/LinearIntegration.ts +94 -0
- package/src/Incidents/Metadata.ts +133 -0
- package/src/Incidents/Monitor.ts +150 -0
- package/src/Incidents/MonitorGroup.ts +91 -0
- package/src/Incidents/NewRelicIntegration.ts +102 -0
- package/src/Incidents/OnCallRotation.ts +295 -0
- package/src/Incidents/OnCallSchedule.ts +115 -0
- package/src/Incidents/OutgoingEmailIntegration.ts +84 -0
- package/src/Incidents/OutgoingPagerDutyIntegration.ts +78 -0
- package/src/Incidents/OutgoingWebhookIntegration.ts +147 -0
- package/src/Incidents/PrometheusIntegration.ts +109 -0
- package/src/Incidents/Reference.ts +210 -0
- package/src/Incidents/ReportHeartbeat.ts +149 -0
- package/src/Incidents/ReportHeartbeatHttp.ts +30 -0
- package/src/Incidents/ResolveIncident.ts +74 -0
- package/src/Incidents/ResolveIncidentHttp.ts +28 -0
- package/src/Incidents/SendHeartbeat.ts +62 -0
- package/src/Incidents/SendHeartbeatHttp.ts +28 -0
- package/src/Incidents/Severity.ts +123 -0
- package/src/Incidents/SeverityGroup.ts +82 -0
- package/src/Incidents/SplunkOnCallIntegration.ts +76 -0
- package/src/Incidents/StatusPage.ts +178 -0
- package/src/Incidents/StatusPageGroup.ts +81 -0
- package/src/Incidents/StatusPageResource.ts +128 -0
- package/src/Incidents/StatusPageSection.ts +105 -0
- package/src/Incidents/StatusPageSubscriber.ts +163 -0
- package/src/Incidents/index.ts +213 -0
- package/src/Incidents/integrationFields.ts +174 -0
- package/src/Providers.ts +78 -0
- package/src/Telemetry/Alert.ts +135 -0
- package/src/Telemetry/AwsLogGroupSubscription.ts +97 -0
- package/src/Telemetry/BindingHttp.ts +40 -0
- package/src/Telemetry/Chart.ts +251 -0
- package/src/Telemetry/Collector.ts +157 -0
- package/src/Telemetry/CollectorTarget.ts +108 -0
- package/src/Telemetry/Connection.ts +182 -0
- package/src/Telemetry/Dashboard.ts +152 -0
- package/src/Telemetry/DashboardChart.ts +177 -0
- package/src/Telemetry/DashboardGroup.ts +86 -0
- package/src/Telemetry/DashboardSection.ts +115 -0
- package/src/Telemetry/Exploration.ts +139 -0
- package/src/Telemetry/ExplorationGroup.ts +93 -0
- package/src/Telemetry/Export.ts +263 -0
- package/src/Telemetry/ExtractedMetric.ts +112 -0
- package/src/Telemetry/IngestLogs.ts +95 -0
- package/src/Telemetry/IngestLogsHttp.ts +28 -0
- package/src/Telemetry/IngestMetrics.ts +76 -0
- package/src/Telemetry/IngestMetricsHttp.ts +28 -0
- package/src/Telemetry/OtelHeaders.ts +52 -0
- package/src/Telemetry/Query.ts +75 -0
- package/src/Telemetry/QueryHttp.ts +40 -0
- package/src/Telemetry/Reference.ts +164 -0
- package/src/Telemetry/ShipLogs.ts +162 -0
- package/src/Telemetry/Source.ts +328 -0
- package/src/Telemetry/SourceAwsAccount.ts +110 -0
- package/src/Telemetry/SourceGcpProject.ts +125 -0
- package/src/Telemetry/SourceGroup.ts +111 -0
- package/src/Telemetry/customBucket.ts +62 -0
- package/src/Telemetry/index.ts +104 -0
- package/src/globals.d.ts +4 -0
- package/src/index.ts +13 -0
- package/src/internal/DeployRetry.ts +64 -0
- package/src/internal/actionWait.ts +23 -0
- package/src/internal/applicationIds.ts +21 -0
- package/src/internal/attachments.ts +40 -0
- package/src/internal/budget.ts +69 -0
- package/src/internal/connection.ts +233 -0
- package/src/internal/crud.ts +1053 -0
- package/src/internal/errors.ts +32 -0
- package/src/internal/fields.ts +162 -0
- package/src/internal/gone.ts +19 -0
- package/src/internal/managedDatabase.ts +331 -0
- package/src/internal/managedService.ts +419 -0
- package/src/internal/migrations.ts +484 -0
- package/src/internal/ops.ts +86 -0
- package/src/internal/ownership.ts +84 -0
- package/src/internal/reference.ts +100 -0
- package/src/internal/scope.ts +84 -0
- package/src/internal/snapshot.ts +170 -0
- package/src/internal/unpaged.ts +29 -0
- package/src/internal/wait.ts +88 -0
- package/src/sdk/credentials.ts +222 -0
- package/src/sdk/errors.ts +125 -0
- package/src/sdk/index.ts +69 -0
- package/src/sdk/pagination.ts +100 -0
- package/src/sdk/protocol.ts +565 -0
- package/src/sdk/retry.ts +50 -0
- package/src/sdk/services/account.ts +1079 -0
- package/src/sdk/services/cloud.ts +38638 -0
- package/src/sdk/services/errors.ts +6182 -0
- package/src/sdk/services/heartbeat.ts +144 -0
- package/src/sdk/services/incidents.ts +25835 -0
- package/src/sdk/services/index.ts +8 -0
- package/src/sdk/services/ingest.ts +383 -0
- package/src/sdk/services/telemetry.ts +14868 -0
- package/src/sdk/traits.ts +77 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ownership markers for Better Stack Cloud objects, the way Alchemy's Hetzner
|
|
3
|
+
* provider uses labels: every object a stack creates carries, in its
|
|
4
|
+
* `metadata` string map, one entry
|
|
5
|
+
*
|
|
6
|
+
* "alchemy": "<stack>/<stage>/<fqn>#<instance id>"
|
|
7
|
+
*
|
|
8
|
+
* (the stack name, the stage, the resource's fully-qualified logical id, and
|
|
9
|
+
* the instance id of the generation that created it — a replacement is a new
|
|
10
|
+
* generation of the same logical id, with its own marker).
|
|
11
|
+
* With it:
|
|
12
|
+
*
|
|
13
|
+
* - a create whose state was never saved (it failed or timed out after the
|
|
14
|
+
* API accepted it) is found by the next deploy's create of the same
|
|
15
|
+
* generation (same instance id), which converges it instead of creating a
|
|
16
|
+
* duplicate or colliding with its generated name;
|
|
17
|
+
* - a deploy with no state at all for a resource (a lost state store) finds
|
|
18
|
+
* an object any generation of this logical id created and adopts it;
|
|
19
|
+
* - an object that matches the props but carries another owner's marker (or
|
|
20
|
+
* none) is reported `Unowned`: it is only taken over with `--adopt`;
|
|
21
|
+
* - `list` (which backs `alchemy nuke`) returns only objects some Alchemy
|
|
22
|
+
* stack created.
|
|
23
|
+
*
|
|
24
|
+
* The marker is merged into the user's `metadata` on every write and removed
|
|
25
|
+
* from the attributes, so it never shows up in a diff and the user's own keys
|
|
26
|
+
* are untouched. It takes one of the API's 10 metadata slots.
|
|
27
|
+
*
|
|
28
|
+
* Cloud objects without `metadata` (networks, firewalls and their rules,
|
|
29
|
+
* webhooks, children of a database or cluster) fall back to their name: an
|
|
30
|
+
* object whose generated name is the one this logical id generates (names
|
|
31
|
+
* end in the resource instance's random suffix) is this stack's. That covers
|
|
32
|
+
* a create interrupted before its state was saved; it cannot recognise an
|
|
33
|
+
* object whose name was set explicitly, nor one created under another
|
|
34
|
+
* instance (a lost state store).
|
|
35
|
+
*/
|
|
36
|
+
import { Stack } from "alchemy/Stack";
|
|
37
|
+
import { Stage } from "alchemy/Stage";
|
|
38
|
+
import * as Effect from "effect/Effect";
|
|
39
|
+
/** The `metadata` key of the marker. */
|
|
40
|
+
export const OWNER_KEY = "alchemy";
|
|
41
|
+
/** The marker of the logical resource `fqn` of the current stack and stage (any generation). */
|
|
42
|
+
export const ownerOf = (fqn) => Effect.gen(function* () {
|
|
43
|
+
const stack = yield* Stack;
|
|
44
|
+
const stage = yield* Stage;
|
|
45
|
+
return `${stack.name}/${stage}/${fqn}`;
|
|
46
|
+
});
|
|
47
|
+
/** The marker of one generation (`instanceId`) of `owner` (from {@link ownerOf}). */
|
|
48
|
+
export const generationOf = (owner, instanceId) => `${owner}#${instanceId}`;
|
|
49
|
+
/** Whether `marker` names `owner` (from {@link ownerOf}), in any generation. */
|
|
50
|
+
export const belongsTo = (marker, owner) => marker !== undefined && (marker === owner || marker.startsWith(`${owner}#`));
|
|
51
|
+
const asRecord = (metadata) => metadata !== null && typeof metadata === "object" && !Array.isArray(metadata)
|
|
52
|
+
? metadata
|
|
53
|
+
: undefined;
|
|
54
|
+
/** The marker an object carries, `undefined` when it has none. */
|
|
55
|
+
export const markerOf = (metadata) => {
|
|
56
|
+
const value = asRecord(metadata)?.[OWNER_KEY];
|
|
57
|
+
return typeof value === "string" ? value : undefined;
|
|
58
|
+
};
|
|
59
|
+
/** Whether some Alchemy stack created the object. */
|
|
60
|
+
export const isAlchemyOwned = (metadata) => markerOf(metadata) !== undefined;
|
|
61
|
+
/** The user's metadata with the marker added (what is sent on create and update). */
|
|
62
|
+
export const withOwner = (metadata, owner) => ({
|
|
63
|
+
...asRecord(metadata),
|
|
64
|
+
[OWNER_KEY]: owner,
|
|
65
|
+
});
|
|
66
|
+
/** The metadata without the marker (what the attributes show). */
|
|
67
|
+
export const withoutOwner = (metadata) => {
|
|
68
|
+
const record = asRecord(metadata);
|
|
69
|
+
if (record === undefined || !(OWNER_KEY in record))
|
|
70
|
+
return metadata;
|
|
71
|
+
const { [OWNER_KEY]: _, ...rest } = record;
|
|
72
|
+
return rest;
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=ownership.js.map
|
|
@@ -0,0 +1 @@
|
|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AClE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,QAAiB,EAAsB,EAAE;IAChE,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAC9C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC,CAAC;AAEF,qDAAqD;AACrD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAiB,EAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,SAAS,CAAC;AAE/F,qFAAqF;AACrF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,QAAiB,EAAE,KAAa,EAA2B,EAAE,CAAC,CAAC;IACvF,GAAG,QAAQ,CAAC,QAAQ,CAAC;IACrB,CAAC,SAAS,CAAC,EAAE,KAAK;CACnB,CAAC,CAAC;AAEH,kEAAkE;AAClE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAI,QAAW,EAAK,EAAE;IAChD,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,SAAS,IAAI,MAAM,CAAC;QAAE,OAAO,QAAQ,CAAC;IACpE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;IAC3C,OAAO,IAAS,CAAC;AACnB,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Stream from "effect/Stream";
|
|
3
|
+
/** What a reference finder looked for. */
|
|
4
|
+
export type ReferenceKind = "serverType" | "image" | "postgresType" | "postgresVersion" | "mysqlType" | "mysqlVersion" | "clickhouseType" | "clickhouseVersion" | "kafkaType" | "kafkaVersion" | "valkeyType" | "valkeyVersion" | "objectCacheType" | "loadBalancerType" | "kubernetesVersion" | "monitorIpCluster" | "slackIntegration" | "integrationAuthorization" | "dashboardTemplate" | "dataRegion" | "gitHubIntegration" | "role" | "team";
|
|
5
|
+
declare const ReferenceNotFound_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6
|
+
readonly _tag: "ReferenceNotFound";
|
|
7
|
+
} & Readonly<A>;
|
|
8
|
+
/**
|
|
9
|
+
* A reference finder found nothing: no server type, image, version, role, …
|
|
10
|
+
* matches what was asked for. `ref` says what was asked for (a name, or the
|
|
11
|
+
* criteria of a search).
|
|
12
|
+
*/
|
|
13
|
+
export declare class ReferenceNotFound extends ReferenceNotFound_base<{
|
|
14
|
+
readonly kind: ReferenceKind;
|
|
15
|
+
readonly ref: string;
|
|
16
|
+
readonly message: string;
|
|
17
|
+
}> {
|
|
18
|
+
}
|
|
19
|
+
/** A {@link ReferenceNotFound} for `kind` and `ref`. */
|
|
20
|
+
export declare const referenceNotFound: (kind: ReferenceKind, ref: string, detail?: string) => ReferenceNotFound;
|
|
21
|
+
/** The SDK's typed `NotFound` (a get by name or id answered 404) becomes a {@link ReferenceNotFound}. */
|
|
22
|
+
export declare const notFoundAsReference: (kind: ReferenceKind, ref: string) => <A, E extends {
|
|
23
|
+
readonly _tag: string;
|
|
24
|
+
}, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, Exclude<E, {
|
|
25
|
+
readonly _tag: "NotFound";
|
|
26
|
+
}> | ReferenceNotFound, R>;
|
|
27
|
+
/** Every item of a paginated list (all pages), as an array. */
|
|
28
|
+
export declare const collect: <A, E, R>(stream: Stream.Stream<A, E, R>) => Effect.Effect<Array<A>, E, R>;
|
|
29
|
+
/** The first element `f` accepts, or a `ReferenceNotFound`. */
|
|
30
|
+
export declare const findOr: <A>(items: ReadonlyArray<A>, f: (item: A) => boolean, kind: ReferenceKind, ref: string) => Effect.Effect<A, ReferenceNotFound>;
|
|
31
|
+
/** Numeric parts of a version-ish string: `"v1.37.2+k3s1"` → `[1, 37, 2, 3, 1]`, `"ubuntu-26-04"` → `[26, 4]`. */
|
|
32
|
+
export declare const versionParts: (value: string) => number[];
|
|
33
|
+
/** Compare two version-ish strings by their numeric parts (ascending). */
|
|
34
|
+
export declare const compareVersions: (a: string, b: string) => number;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=reference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../src/internal/reference.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,0CAA0C;AAC1C,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,OAAO,GACP,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GACnB,WAAW,GACX,cAAc,GACd,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,kBAAkB,GAClB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,0BAA0B,GAC1B,mBAAmB,GACnB,YAAY,GACZ,mBAAmB,GACnB,MAAM,GACN,MAAM,CAAC;;;;AAEX;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,uBAAsC;IAC3E,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;CAAG;AAEL,wDAAwD;AACxD,eAAO,MAAM,iBAAiB,SAAU,aAAa,OAAO,MAAM,WAAW,MAAM,sBAK/E,CAAC;AAEL,yGAAyG;AACzG,eAAO,MAAM,mBAAmB,SACvB,aAAa,OAAO,MAAM,MAChC,CAAC,EAAE,CAAC,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,QAClC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAC3B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC,CAKK,CAAC;AAE5F,+DAA+D;AAC/D,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CACzB,CAAC;AAEtE,+DAA+D;AAC/D,eAAO,MAAM,MAAM,GAAI,CAAC,SACf,aAAa,CAAC,CAAC,CAAC,KACpB,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,QACjB,aAAa,OACd,MAAM,KACV,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,iBAAiB,CAGpC,CAAC;AAEF,kHAAkH;AAClH,eAAO,MAAM,YAAY,UAAW,MAAM,KAAG,MAAM,EACM,CAAC;AAE1D,0EAA0E;AAC1E,eAAO,MAAM,eAAe,MAAO,MAAM,KAAK,MAAM,KAAG,MAQtD,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared pieces of the read-only reference data each namespace exposes in
|
|
3
|
+
* its `Reference.ts` (server types, images, engine versions, roles, the
|
|
4
|
+
* monitor IP list, …): the typed not-found error the finders fail with, and
|
|
5
|
+
* small helpers to collect lists and compare versions.
|
|
6
|
+
*
|
|
7
|
+
* The error is re-exported from every namespace's `Reference.ts`, so
|
|
8
|
+
* `BetterStack.Cloud.ReferenceNotFound` and
|
|
9
|
+
* `BetterStack.Incidents.ReferenceNotFound` are the same class.
|
|
10
|
+
*/
|
|
11
|
+
import * as Data from "effect/Data";
|
|
12
|
+
import * as Effect from "effect/Effect";
|
|
13
|
+
import * as Stream from "effect/Stream";
|
|
14
|
+
/**
|
|
15
|
+
* A reference finder found nothing: no server type, image, version, role, …
|
|
16
|
+
* matches what was asked for. `ref` says what was asked for (a name, or the
|
|
17
|
+
* criteria of a search).
|
|
18
|
+
*/
|
|
19
|
+
export class ReferenceNotFound extends Data.TaggedError("ReferenceNotFound") {
|
|
20
|
+
}
|
|
21
|
+
/** A {@link ReferenceNotFound} for `kind` and `ref`. */
|
|
22
|
+
export const referenceNotFound = (kind, ref, detail) => new ReferenceNotFound({
|
|
23
|
+
kind,
|
|
24
|
+
ref,
|
|
25
|
+
message: `No ${kind} matches ${ref}${detail === undefined ? "" : `: ${detail}`}`,
|
|
26
|
+
});
|
|
27
|
+
/** The SDK's typed `NotFound` (a get by name or id answered 404) becomes a {@link ReferenceNotFound}. */
|
|
28
|
+
export const notFoundAsReference = (kind, ref) => (self) => Effect.catchIf(self, (error) => error._tag === "NotFound", () => Effect.fail(referenceNotFound(kind, ref)));
|
|
29
|
+
/** Every item of a paginated list (all pages), as an array. */
|
|
30
|
+
export const collect = (stream) => Effect.map(Stream.runCollect(stream), (items) => Array.from(items));
|
|
31
|
+
/** The first element `f` accepts, or a `ReferenceNotFound`. */
|
|
32
|
+
export const findOr = (items, f, kind, ref) => {
|
|
33
|
+
const found = items.find(f);
|
|
34
|
+
return found === undefined ? Effect.fail(referenceNotFound(kind, ref)) : Effect.succeed(found);
|
|
35
|
+
};
|
|
36
|
+
/** Numeric parts of a version-ish string: `"v1.37.2+k3s1"` → `[1, 37, 2, 3, 1]`, `"ubuntu-26-04"` → `[26, 4]`. */
|
|
37
|
+
export const versionParts = (value) => (value.match(/\d+/g) ?? []).map((part) => Number(part));
|
|
38
|
+
/** Compare two version-ish strings by their numeric parts (ascending). */
|
|
39
|
+
export const compareVersions = (a, b) => {
|
|
40
|
+
const x = versionParts(a);
|
|
41
|
+
const y = versionParts(b);
|
|
42
|
+
for (let i = 0; i < Math.max(x.length, y.length); i++) {
|
|
43
|
+
const d = (x[i] ?? -1) - (y[i] ?? -1);
|
|
44
|
+
if (d !== 0)
|
|
45
|
+
return d;
|
|
46
|
+
}
|
|
47
|
+
return a.localeCompare(b);
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=reference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../src/internal/reference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AA4BxC;;;;GAIG;AACH,MAAM,OAAO,iBAAkB,SAAQ,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAIzE;CAAG;AAEL,wDAAwD;AACxD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAmB,EAAE,GAAW,EAAE,MAAe,EAAE,EAAE,CACrF,IAAI,iBAAiB,CAAC;IACpB,IAAI;IACJ,GAAG;IACH,OAAO,EAAE,MAAM,IAAI,YAAY,GAAG,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,EAAE;CACjF,CAAC,CAAC;AAEL,yGAAyG;AACzG,MAAM,CAAC,MAAM,mBAAmB,GAC9B,CAAC,IAAmB,EAAE,GAAW,EAAE,EAAE,CACrC,CACE,IAA4B,EACwD,EAAE,CACtF,MAAM,CAAC,OAAO,CACZ,IAAI,EACJ,CAAC,KAAK,EAAsD,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,UAAU,EACxF,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACsC,CAAC;AAE5F,+DAA+D;AAC/D,MAAM,CAAC,MAAM,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AG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { Credentials } from "../sdk/credentials.ts";
|
|
3
|
+
/** The scope members sent with a request. `undefined` lets the SDK use the credentials' team. */
|
|
4
|
+
export interface Scope {
|
|
5
|
+
readonly teamId?: string | undefined;
|
|
6
|
+
readonly availabilityZone?: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
declare const MissingAvailabilityZone_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
9
|
+
readonly _tag: "MissingAvailabilityZone";
|
|
10
|
+
} & Readonly<A>;
|
|
11
|
+
/** A Cloud resource has no availability zone: neither in its props nor in the credentials. */
|
|
12
|
+
export declare class MissingAvailabilityZone extends MissingAvailabilityZone_base<{
|
|
13
|
+
readonly message: string;
|
|
14
|
+
readonly resourceType: string;
|
|
15
|
+
}> {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The scope of a resource: the props' value, else the one recorded in its
|
|
19
|
+
* attributes, else the credentials' default.
|
|
20
|
+
*/
|
|
21
|
+
export declare const resolveScope: (cloud: boolean, resourceType: string, props: Record<string, unknown> | undefined, attrs: object | undefined) => Effect.Effect<Scope, never, Credentials>;
|
|
22
|
+
/** Create-only team prop shared by team-scoped resources. */
|
|
23
|
+
export interface TeamProp {
|
|
24
|
+
/**
|
|
25
|
+
* Team that owns the resource, such as `t123`. Defaults to the credentials'
|
|
26
|
+
* team (`BETTERSTACK_TEAM_ID`, or the profile's team). Changing it replaces
|
|
27
|
+
* the resource.
|
|
28
|
+
*/
|
|
29
|
+
teamId?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Create-only zone prop shared by Cloud resources. */
|
|
32
|
+
export interface ZoneProp {
|
|
33
|
+
/**
|
|
34
|
+
* Availability zone the resource lives in, such as `us-west-2a`. Defaults to
|
|
35
|
+
* the credentials' zone (`BETTERSTACK_AVAILABILITY_ZONE`, or the profile's).
|
|
36
|
+
* Changing it replaces the resource.
|
|
37
|
+
*
|
|
38
|
+
* A child of a resource in another zone (a firewall rule, a node pool, a
|
|
39
|
+
* snapshot of an instance outside the credentials' zone) must repeat the
|
|
40
|
+
* parent's `availabilityZone`: it receives only the parent's id, so its zone
|
|
41
|
+
* cannot be derived.
|
|
42
|
+
*/
|
|
43
|
+
availabilityZone?: string;
|
|
44
|
+
}
|
|
45
|
+
/** Attribute every Cloud resource records. */
|
|
46
|
+
export interface ZoneAttribute {
|
|
47
|
+
/** Availability zone the resource lives in, such as `us-west-2a`. */
|
|
48
|
+
availabilityZone: string;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/internal/scope.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,iGAAiG;AACjG,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChD;;;;AAED,8FAA8F;AAC9F,qBAAa,uBAAwB,SAAQ,6BAA4C;IACvF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CAAC;CAAG;AAKL;;;GAGG;AACH,eAAO,MAAM,YAAY,UAChB,OAAO,gBACA,MAAM,SACb,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,SACnC,MAAM,GAAG,SAAS,KACxB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,CAiBtC,CAAC;AAEL,6DAA6D;AAC7D,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,uDAAuD;AACvD,MAAM,WAAW,QAAQ;IACvB;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a resource lives: its team (`teamId`, team-scoped Incidents,
|
|
3
|
+
* Telemetry and Errors resources and every Cloud resource) and, for Cloud,
|
|
4
|
+
* its availability zone. Both are create-only props that default from the
|
|
5
|
+
* credentials; once created, the attributes remember them so the object is
|
|
6
|
+
* always addressed where it was made, whatever the credentials say later.
|
|
7
|
+
*/
|
|
8
|
+
import * as Data from "effect/Data";
|
|
9
|
+
import * as Effect from "effect/Effect";
|
|
10
|
+
import { Credentials } from "../sdk/credentials.js";
|
|
11
|
+
/** A Cloud resource has no availability zone: neither in its props nor in the credentials. */
|
|
12
|
+
export class MissingAvailabilityZone extends Data.TaggedError("MissingAvailabilityZone") {
|
|
13
|
+
}
|
|
14
|
+
const text = (value) => typeof value === "string" && value !== "" ? value : undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The scope of a resource: the props' value, else the one recorded in its
|
|
17
|
+
* attributes, else the credentials' default.
|
|
18
|
+
*/
|
|
19
|
+
export const resolveScope = (cloud, resourceType, props, attrs) => Effect.gen(function* () {
|
|
20
|
+
const recorded = attrs;
|
|
21
|
+
const teamId = text(props?.teamId) ?? text(recorded?.teamId);
|
|
22
|
+
if (!cloud)
|
|
23
|
+
return { teamId };
|
|
24
|
+
const config = yield* yield* Credentials;
|
|
25
|
+
const availabilityZone = text(props?.availabilityZone) ?? text(recorded?.availabilityZone) ?? config.availabilityZone;
|
|
26
|
+
if (availabilityZone === undefined) {
|
|
27
|
+
return yield* Effect.die(new MissingAvailabilityZone({
|
|
28
|
+
message: `${resourceType}: set availabilityZone on the resource, or BETTERSTACK_AVAILABILITY_ZONE / the profile's availability zone`,
|
|
29
|
+
resourceType,
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
return { teamId: teamId ?? config.teamId, availabilityZone };
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../src/internal/scope.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAQpD,8FAA8F;AAC9F,MAAM,OAAO,uBAAwB,SAAQ,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAGrF;CAAG;AAEL,MAAM,IAAI,GAAG,CAAC,KAAc,EAAsB,EAAE,CAClD,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAEhE;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,KAAc,EACd,YAAoB,EACpB,KAA0C,EAC1C,KAAyB,EACiB,EAAE,CAC5C,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,QAAQ,GAAG,KAA4C,CAAC;IAC9D,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7D,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC;IACzC,MAAM,gBAAgB,GACpB,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,gBAAgB,CAAC,IAAI,MAAM,CAAC,gBAAgB,CAAC;IAC/F,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CACtB,IAAI,uBAAuB,CAAC;YAC1B,OAAO,EAAE,GAAG,YAAY,4GAA4G;YACpI,YAAY;SACb,CAAC,CACH,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC;AAC/D,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type * as Provider from "alchemy/Provider";
|
|
2
|
+
/**
|
|
3
|
+
* On-demand Cloud snapshots: what `Cloud.Snapshot` (a server's disk),
|
|
4
|
+
* `Cloud.VolumeSnapshot` and the four database engines' snapshots
|
|
5
|
+
* (`Cloud.PostgresSnapshot`, `MySQLSnapshot`, `ClickHouseSnapshot`,
|
|
6
|
+
* `ValkeySnapshot`) have in common, from the Cloud API reference:
|
|
7
|
+
*
|
|
8
|
+
* - **async create**: a create answers `202` with `status: "pending"`; the
|
|
9
|
+
* snapshot becomes `available` (ready to restore) or `failed` (with a
|
|
10
|
+
* `failure_reason`). The create is waited on until `available`, and a
|
|
11
|
+
* `failed` snapshot fails the wait with `WaitFailed` (`crud` then deletes
|
|
12
|
+
* it: it is unusable).
|
|
13
|
+
* - **async delete**: a delete answers the snapshot as `deleting` "until
|
|
14
|
+
* we've removed its data", then it is gone; `deleting` therefore reads as
|
|
15
|
+
* gone. A snapshot that is still `pending` (or already `deleting`) refuses
|
|
16
|
+
* the delete with `409`, so the delete is retried on that, bounded
|
|
17
|
+
* ({@link retryBusyDelete}).
|
|
18
|
+
* - **ownership**: every snapshot keeps a `metadata` string map, which
|
|
19
|
+
* carries the `alchemy` marker (`./ownership.ts`); `list` therefore returns
|
|
20
|
+
* only Alchemy-created snapshots, never the ones a snapshot schedule took.
|
|
21
|
+
*
|
|
22
|
+
* The database snapshots share one more thing, built here by
|
|
23
|
+
* {@link databaseSnapshot}: each engine has two address forms with the same
|
|
24
|
+
* store, by instance (`/v1/postgres/{postgres_id}/snapshots/{id}`) and flat
|
|
25
|
+
* by snapshot id (`/v1/postgres-snapshots/{id}`). A snapshot outlives its
|
|
26
|
+
* instance ("The instance's snapshots stay"), so the object is addressed by
|
|
27
|
+
* its id alone through the flat forms (get, delete, list across instances
|
|
28
|
+
* with the instance as a filter); the instance id stays a create-only prop,
|
|
29
|
+
* so changing it replaces the snapshot. There is no update operation: every
|
|
30
|
+
* prop (`name`, `metadata`, the instance) replaces.
|
|
31
|
+
*
|
|
32
|
+
* Wait and retry budgets default to {@link SNAPSHOT_WAITS} (the API
|
|
33
|
+
* documents no duration) and are overridden with a `WaitBudgets` layer
|
|
34
|
+
* (`./budget.ts`) per phase: `create`, `retryCreate`, `retryDelete`.
|
|
35
|
+
*/
|
|
36
|
+
import type { ResourceClassLike, ResourceLike } from "alchemy/Resource";
|
|
37
|
+
import type * as Layer from "effect/Layer";
|
|
38
|
+
import { type Call, type CrudRequirements, type ListCall, type Tagged } from "./crud.ts";
|
|
39
|
+
import type { WaitPolicy } from "./wait.ts";
|
|
40
|
+
/** The members every snapshot has in common. */
|
|
41
|
+
export interface SnapshotLike {
|
|
42
|
+
readonly id?: unknown;
|
|
43
|
+
readonly name?: string | undefined;
|
|
44
|
+
readonly status?: string | undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Live budgets. The API documents no duration: a snapshot copies a whole
|
|
48
|
+
* disk (a volume holds up to 3 TiB), so creation is given an hour; a delete
|
|
49
|
+
* refused while the snapshot is still `pending` is retried for half an hour;
|
|
50
|
+
* a create refused because the source is busy (another snapshot of it in
|
|
51
|
+
* progress) for ten minutes.
|
|
52
|
+
*/
|
|
53
|
+
export declare const SNAPSHOT_WAITS: {
|
|
54
|
+
readonly create: {
|
|
55
|
+
readonly timeout: "60 minutes";
|
|
56
|
+
readonly interval: "10 seconds";
|
|
57
|
+
};
|
|
58
|
+
readonly retryDelete: {
|
|
59
|
+
readonly timeout: "30 minutes";
|
|
60
|
+
readonly interval: "10 seconds";
|
|
61
|
+
};
|
|
62
|
+
readonly retryCreate: {
|
|
63
|
+
readonly timeout: "10 minutes";
|
|
64
|
+
readonly interval: "10 seconds";
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
/** The create wait: `available`, or `WaitFailed` on `failed`. */
|
|
68
|
+
export declare const snapshotReady: <Res extends SnapshotLike>() => WaitPolicy<Res>;
|
|
69
|
+
/** A snapshot whose data is being removed is gone (it 404s once the removal finishes). */
|
|
70
|
+
export declare const snapshotGone: (snapshot: SnapshotLike) => boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Retry a delete the API refuses with `409` while the snapshot is still
|
|
73
|
+
* being taken, on the most specific typed tags the operation has: server
|
|
74
|
+
* snapshots `SnapshotBusy` (`snapshot_busy`), volume snapshots
|
|
75
|
+
* `VolumeSnapshotBusy` (`volume_snapshot_busy`). The database snapshots are
|
|
76
|
+
* deleted through their flat address (`delete_flat_<engine>_snapshot`),
|
|
77
|
+
* whose documented 409 carries no code ("The snapshot is still being
|
|
78
|
+
* created or already being deleted"), so they retry on the generic
|
|
79
|
+
* `Conflict` (only Valkey's by-instance delete documents `snapshot_busy`).
|
|
80
|
+
*/
|
|
81
|
+
export declare const retryBusyDelete: (...tags: ReadonlyArray<string>) => {
|
|
82
|
+
while: (error: Tagged) => boolean;
|
|
83
|
+
timeout: "30 minutes";
|
|
84
|
+
interval: "10 seconds";
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Retry a create the API refuses because the source is busy for a while: a
|
|
88
|
+
* server or volume with a snapshot already in progress (two snapshots of it
|
|
89
|
+
* in one deploy), a rescale. Only the typed codes that name a transient
|
|
90
|
+
* state: `ServerSnapshotting`, `ServerRescaling`, `VolumeBusy`, `ValkeyBusy`.
|
|
91
|
+
*/
|
|
92
|
+
export declare const retryBusyCreate: (...tags: ReadonlyArray<string>) => {
|
|
93
|
+
while: (error: Tagged) => boolean;
|
|
94
|
+
timeout: "10 minutes";
|
|
95
|
+
interval: "10 seconds";
|
|
96
|
+
};
|
|
97
|
+
/** Name match for `lookup`/`adoptBy`, under the parent when one is given. */
|
|
98
|
+
export declare const matchesName: (parentProp: string) => (wanted: {
|
|
99
|
+
readonly name?: string | undefined;
|
|
100
|
+
}, item: SnapshotLike) => boolean;
|
|
101
|
+
/** Each operation keeps its own typed errors; `crud` only branches on their tags. */
|
|
102
|
+
export interface DatabaseSnapshotSpec<Res extends SnapshotLike> {
|
|
103
|
+
/** The instance's prop/attribute: `postgresId`, `mysqlId`, `clickhouseId`, `valkeyId`. */
|
|
104
|
+
readonly parent: string;
|
|
105
|
+
/** Typed codes that refuse a create while the instance is busy (retried, bounded). */
|
|
106
|
+
readonly busy?: ReadonlyArray<string>;
|
|
107
|
+
readonly ops: {
|
|
108
|
+
/** `create_<engine>_snapshot` (by instance). */
|
|
109
|
+
readonly create: Call<Res, Tagged>;
|
|
110
|
+
/** `get_flat_<engine>_snapshot` (by snapshot id). */
|
|
111
|
+
readonly read: Call<Res, Tagged>;
|
|
112
|
+
/** `delete_flat_<engine>_snapshot` (by snapshot id). */
|
|
113
|
+
readonly delete: Call<unknown, Tagged>;
|
|
114
|
+
/** `list_flat_<engine>_snapshot` (every instance's, filterable by instance). */
|
|
115
|
+
readonly list: ListCall<Res, Tagged>;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/** Build the provider layer of a database engine's on-demand snapshot. */
|
|
119
|
+
export declare const databaseSnapshot: <R extends ResourceLike, Res extends SnapshotLike>(resource: ResourceClassLike<R>, spec: DatabaseSnapshotSpec<Res>) => Layer.Layer<Provider.Provider<R>, never, CrudRequirements>;
|
|
120
|
+
//# sourceMappingURL=snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/internal/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,KAAK,IAAI,EAAQ,KAAK,gBAAgB,EAAE,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,gDAAgD;AAChD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;iBACf,OAAO,EAAE,YAAY;iBAAE,QAAQ,EAAE,YAAY;;;iBACxC,OAAO,EAAE,YAAY;iBAAE,QAAQ,EAAE,YAAY;;;iBAC7C,OAAO,EAAE,YAAY;iBAAE,QAAQ,EAAE,YAAY;;CACf,CAAC;AAEhD,iEAAiE;AACjE,eAAO,MAAM,aAAa,GAAI,GAAG,SAAS,YAAY,OAAK,UAAU,CAAC,GAAG,CAKvE,CAAC;AAEH,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AC,GAAG,CAAC,KAC9B,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAmC3D,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { crud } from "./crud.js";
|
|
2
|
+
/**
|
|
3
|
+
* Live budgets. The API documents no duration: a snapshot copies a whole
|
|
4
|
+
* disk (a volume holds up to 3 TiB), so creation is given an hour; a delete
|
|
5
|
+
* refused while the snapshot is still `pending` is retried for half an hour;
|
|
6
|
+
* a create refused because the source is busy (another snapshot of it in
|
|
7
|
+
* progress) for ten minutes.
|
|
8
|
+
*/
|
|
9
|
+
export const SNAPSHOT_WAITS = {
|
|
10
|
+
create: { timeout: "60 minutes", interval: "10 seconds" },
|
|
11
|
+
retryDelete: { timeout: "30 minutes", interval: "10 seconds" },
|
|
12
|
+
retryCreate: { timeout: "10 minutes", interval: "10 seconds" },
|
|
13
|
+
};
|
|
14
|
+
/** The create wait: `available`, or `WaitFailed` on `failed`. */
|
|
15
|
+
export const snapshotReady = () => ({
|
|
16
|
+
until: (state) => state?.status === "available",
|
|
17
|
+
failWhen: (state) => state.status === "failed",
|
|
18
|
+
timeout: SNAPSHOT_WAITS.create.timeout,
|
|
19
|
+
interval: SNAPSHOT_WAITS.create.interval,
|
|
20
|
+
});
|
|
21
|
+
/** A snapshot whose data is being removed is gone (it 404s once the removal finishes). */
|
|
22
|
+
export const snapshotGone = (snapshot) => snapshot.status === "deleting";
|
|
23
|
+
/**
|
|
24
|
+
* Retry a delete the API refuses with `409` while the snapshot is still
|
|
25
|
+
* being taken, on the most specific typed tags the operation has: server
|
|
26
|
+
* snapshots `SnapshotBusy` (`snapshot_busy`), volume snapshots
|
|
27
|
+
* `VolumeSnapshotBusy` (`volume_snapshot_busy`). The database snapshots are
|
|
28
|
+
* deleted through their flat address (`delete_flat_<engine>_snapshot`),
|
|
29
|
+
* whose documented 409 carries no code ("The snapshot is still being
|
|
30
|
+
* created or already being deleted"), so they retry on the generic
|
|
31
|
+
* `Conflict` (only Valkey's by-instance delete documents `snapshot_busy`).
|
|
32
|
+
*/
|
|
33
|
+
export const retryBusyDelete = (...tags) => ({
|
|
34
|
+
while: (error) => tags.includes(error._tag),
|
|
35
|
+
timeout: SNAPSHOT_WAITS.retryDelete.timeout,
|
|
36
|
+
interval: SNAPSHOT_WAITS.retryDelete.interval,
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* Retry a create the API refuses because the source is busy for a while: a
|
|
40
|
+
* server or volume with a snapshot already in progress (two snapshots of it
|
|
41
|
+
* in one deploy), a rescale. Only the typed codes that name a transient
|
|
42
|
+
* state: `ServerSnapshotting`, `ServerRescaling`, `VolumeBusy`, `ValkeyBusy`.
|
|
43
|
+
*/
|
|
44
|
+
export const retryBusyCreate = (...tags) => ({
|
|
45
|
+
while: (error) => tags.includes(error._tag),
|
|
46
|
+
timeout: SNAPSHOT_WAITS.retryCreate.timeout,
|
|
47
|
+
interval: SNAPSHOT_WAITS.retryCreate.interval,
|
|
48
|
+
});
|
|
49
|
+
/** Name match for `lookup`/`adoptBy`, under the parent when one is given. */
|
|
50
|
+
export const matchesName = (parentProp) => (wanted, item) => {
|
|
51
|
+
const parent = wanted[parentProp];
|
|
52
|
+
return (item.name === wanted.name &&
|
|
53
|
+
(parent === undefined ||
|
|
54
|
+
String(item[parentProp]) === String(parent)));
|
|
55
|
+
};
|
|
56
|
+
/** Build the provider layer of a database engine's on-demand snapshot. */
|
|
57
|
+
export const databaseSnapshot = (resource, spec) => {
|
|
58
|
+
const { parent } = spec;
|
|
59
|
+
const byName = matchesName(parent);
|
|
60
|
+
return crud(resource, {
|
|
61
|
+
ops: spec.ops,
|
|
62
|
+
key: (snapshot) => ({ id: snapshot.id }),
|
|
63
|
+
toAttributes: (snapshot, props) => {
|
|
64
|
+
const record = snapshot;
|
|
65
|
+
const instance = record[parent] ?? props?.[parent];
|
|
66
|
+
return {
|
|
67
|
+
...record,
|
|
68
|
+
id: String(snapshot.id),
|
|
69
|
+
...(instance === undefined || instance === null ? {} : { [parent]: String(instance) }),
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
goneWhen: snapshotGone,
|
|
73
|
+
wait: { create: snapshotReady() },
|
|
74
|
+
// A pending snapshot refuses the delete ("Delete an available or failed snapshot").
|
|
75
|
+
retryDelete: retryBusyDelete("Conflict"),
|
|
76
|
+
...(spec.busy === undefined ? {} : { retryCreate: retryBusyCreate(...spec.busy) }),
|
|
77
|
+
// Ownership: an `alchemy` marker in `metadata` (`./ownership.ts`).
|
|
78
|
+
owner: { metadata: "metadata" },
|
|
79
|
+
// A name is not unique (the default is the instance name and the date): a lookup or
|
|
80
|
+
// an adoption by name needs exactly one live match, under the instance when given.
|
|
81
|
+
lookup: {
|
|
82
|
+
match: (lookup, item) => lookup.name !== undefined && byName(lookup, item),
|
|
83
|
+
},
|
|
84
|
+
adoptBy: {
|
|
85
|
+
match: (props) => props.name === undefined
|
|
86
|
+
? undefined
|
|
87
|
+
: (item) => item.status !== "failed" && byName(props, item),
|
|
88
|
+
},
|
|
89
|
+
stables: ["id", parent, "availabilityZone", "createdAt", "snapshotType"],
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/internal/snapshot.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAa,IAAI,EAAqD,MAAM,WAAW,CAAC;AAU/F;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE;IACzD,WAAW,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE;IAC9D,WAAW,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE;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CAAC,UAAU,CAAC;QACxC,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,eAAe,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClF,mEAAmE;QACnE,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAmB,EAAE;QACxC,oFAAoF;QACpF,mFAAmF;QACnF,MAAM,EAAE;YACN,KAAK,EAAE,CAAC,MAAW,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC;SAChF;QACD,OAAO,EAAE;YACP,KAAK,EAAE,CAAC,KAAU,EAAE,EAAE,CACpB,KAAK,CAAC,IAAI,KAAK,SAAS;gBACtB,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC;SACrE;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,cAAc,CAAC;KACzE,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `unpaged(op)` — a list operation that answers every item in one response
|
|
3
|
+
* (`{ data: [...] }`, no `page`/`meta`), shaped like a paginated one so
|
|
4
|
+
* `crud`'s `readViaList`, `list` and `lookup` can stream it.
|
|
5
|
+
*
|
|
6
|
+
* The Cloud API's child collections (a load balancer's services and targets,
|
|
7
|
+
* an object cache's buckets, a firewall's rules) are listed this way: the
|
|
8
|
+
* generated SDK types them as plain `OperationMethod`s without `.items`.
|
|
9
|
+
*/
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import type { BetterStackOpContext } from "../sdk/protocol.ts";
|
|
12
|
+
import type { ListCall, Tagged } from "./crud.ts";
|
|
13
|
+
import type { HasInputSchema } from "./fields.ts";
|
|
14
|
+
/** A non-paginated SDK list operation: one response, its items in `data`. */
|
|
15
|
+
export interface UnpagedList<I, Item, E extends Tagged> extends HasInputSchema {
|
|
16
|
+
(input: I): Effect.Effect<{
|
|
17
|
+
readonly data?: ReadonlyArray<Item> | undefined;
|
|
18
|
+
}, E, BetterStackOpContext>;
|
|
19
|
+
}
|
|
20
|
+
/** Wrap a non-paginated list operation as a {@link ListCall} (`.items` streams `data`). */
|
|
21
|
+
export declare const unpaged: <I, Item, E extends Tagged>(op: UnpagedList<I, Item, E>) => ListCall<Item, E>;
|
|
22
|
+
//# sourceMappingURL=unpaged.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unpaged.d.ts","sourceRoot":"","sources":["../../src/internal/unpaged.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,6EAA6E;AAC7E,MAAM,WAAW,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,SAAS,MAAM,CAAE,SAAQ,cAAc;IAC5E,CACE,KAAK,EAAE,CAAC,GACP,MAAM,CAAC,MAAM,CAAC;QAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;KAAE,EAAE,CAAC,EAAE,oBAAoB,CAAC,CAAC;CAChG;AAED,2FAA2F;AAC3F,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,IAAI,EAAE,CAAC,SAAS,MAAM,MAC3C,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,KAC1B,QAAQ,CAAC,IAAI,EAAE,CAAC,CAGjB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `unpaged(op)` — a list operation that answers every item in one response
|
|
3
|
+
* (`{ data: [...] }`, no `page`/`meta`), shaped like a paginated one so
|
|
4
|
+
* `crud`'s `readViaList`, `list` and `lookup` can stream it.
|
|
5
|
+
*
|
|
6
|
+
* The Cloud API's child collections (a load balancer's services and targets,
|
|
7
|
+
* an object cache's buckets, a firewall's rules) are listed this way: the
|
|
8
|
+
* generated SDK types them as plain `OperationMethod`s without `.items`.
|
|
9
|
+
*/
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import * as Stream from "effect/Stream";
|
|
12
|
+
/** Wrap a non-paginated list operation as a {@link ListCall} (`.items` streams `data`). */
|
|
13
|
+
export const unpaged = (op) => ({
|
|
14
|
+
input: op.input,
|
|
15
|
+
items: (input) => Stream.fromIterableEffect(Effect.map(op(input), (page) => page.data ?? [])),
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=unpaged.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unpaged.js","sourceRoot":"","sources":["../../src/internal/unpaged.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAYxC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,EAA2B,EACR,EAAE,CAAC,CAAC;IACvB,KAAK,EAAE,EAAE,CAAC,KAAK;IACf,KAAK,EAAE,CAAC,KAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;CACjG,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as Duration from "effect/Duration";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
declare const WaitTimeout_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
4
|
+
readonly _tag: "WaitTimeout";
|
|
5
|
+
} & Readonly<A>;
|
|
6
|
+
/** A resource did not reach the state it was waited for within its budget. */
|
|
7
|
+
export declare class WaitTimeout extends WaitTimeout_base<{
|
|
8
|
+
readonly message: string;
|
|
9
|
+
/** Resource type id, such as `BetterStack.Cloud.Server`. */
|
|
10
|
+
readonly resourceType: string;
|
|
11
|
+
/** What was waited for: `create`, `update`, `delete`, or an action name. */
|
|
12
|
+
readonly phase: string;
|
|
13
|
+
/** The last observed state, `undefined` when it was gone. */
|
|
14
|
+
readonly last: unknown;
|
|
15
|
+
}> {
|
|
16
|
+
}
|
|
17
|
+
declare const WaitFailed_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
18
|
+
readonly _tag: "WaitFailed";
|
|
19
|
+
} & Readonly<A>;
|
|
20
|
+
/** A resource reached a state the wait policy says it never recovers from (e.g. `destroyed`). */
|
|
21
|
+
export declare class WaitFailed extends WaitFailed_base<{
|
|
22
|
+
readonly message: string;
|
|
23
|
+
readonly resourceType: string;
|
|
24
|
+
readonly phase: string;
|
|
25
|
+
readonly last: unknown;
|
|
26
|
+
}> {
|
|
27
|
+
}
|
|
28
|
+
/** One wait: the predicates over the polled state, and the time budget. */
|
|
29
|
+
export interface WaitPolicy<A> {
|
|
30
|
+
/** Done once this holds for the polled state (`undefined` = the object is gone). */
|
|
31
|
+
readonly until: (state: A | undefined) => boolean;
|
|
32
|
+
/** Stop with {@link WaitFailed} as soon as this holds. */
|
|
33
|
+
readonly failWhen?: (state: A) => boolean;
|
|
34
|
+
/** Total time budget. Defaults to 10 minutes. */
|
|
35
|
+
readonly timeout?: Duration.Input;
|
|
36
|
+
/** Delay between polls. Defaults to 5 seconds. */
|
|
37
|
+
readonly interval?: Duration.Input;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Poll `read` until `policy.until` holds. Returns the last polled state.
|
|
41
|
+
* `read` returns `undefined` for an object that is gone.
|
|
42
|
+
*
|
|
43
|
+
* The budget is wall-clock time from the `Clock` (not a number of polls):
|
|
44
|
+
* a slow read (a loaded process, a slow API) uses up the budget, it never
|
|
45
|
+
* stretches it. The last sleep is cut to the time left, the state is read
|
|
46
|
+
* once more at the deadline, and a wait never gives up before its second
|
|
47
|
+
* read. Under
|
|
48
|
+
* `TestClock`, `TestClock.adjust` drives the wait.
|
|
49
|
+
*/
|
|
50
|
+
export declare const waitFor: <A, E, R>(read: Effect.Effect<A | undefined, E, R>, policy: WaitPolicy<A>, context: {
|
|
51
|
+
readonly resourceType: string;
|
|
52
|
+
readonly phase: string;
|
|
53
|
+
}) => Effect.Effect<A | undefined, E | WaitTimeout | WaitFailed, R>;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=wait.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../src/internal/wait.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;AAExC,8EAA8E;AAC9E,qBAAa,WAAY,SAAQ,iBAAgC;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,4DAA4D;IAC5D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6DAA6D;IAC7D,QAAQ,CA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