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 @@
|
|
|
1
|
+
{"version":3,"file":"NewRelicIntegration.d.ts","sourceRoot":"","sources":["../../src/Incidents/NewRelicIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,SAAS,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,wBAAwB,CAAC;AAEhC,4CAA4C;AAC5C,MAAM,WAAW,wBACf,SAAQ,IAAI,CAAC,SAAS,CAAC,yCAAyC,EAAE,QAAQ,GAAG,MAAM,CAAC,EAAE,QAAQ;IAC9F,kGAAkG;IAClG,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,+GAA+G;AAC/G,MAAM,WAAW,6BAA8B,SAAQ,SAAS,CAAC,4BAA4B;CAAG;AAEhG,oDAAoD;AACpD,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;CAAG;AAEvE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CACxC,2CAA2C,EAC3C,wBAAwB,EACxB,6BAA6B,EAC7B,KAAK,EACL,SAAS,EACT,yBAAyB,CAC1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,mBAAmB,+DAE/B,CAAC;AAEF,eAAO,MAAM,2BAA2B,qJAcpC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Resource } from "alchemy/Resource";
|
|
2
|
+
import { crud } from "../internal/crud.js";
|
|
3
|
+
import * as Incidents from "../sdk/services/incidents.js";
|
|
4
|
+
import { ALERTING_NULL_ON_REMOVE, matchByName, } from "./integrationFields.js";
|
|
5
|
+
/**
|
|
6
|
+
* Receives alerts from New Relic and opens Better Stack incidents. Better
|
|
7
|
+
* Stack gives you a `webhookUrl` (a secret, `Redacted`): in New Relic,
|
|
8
|
+
* create a **Webhook** destination with that URL and send a workflow's
|
|
9
|
+
* issues to it. `alertingRule` decides whether only critical alerts or also
|
|
10
|
+
* warnings open incidents.
|
|
11
|
+
*
|
|
12
|
+
* Every prop updates in place except `teamId`, which replaces the
|
|
13
|
+
* integration (and gives it a new `webhookUrl`). `name` defaults to a
|
|
14
|
+
* generated unique name. Removing `escalationPolicyId` or `teamWait` clears
|
|
15
|
+
* them. Without an escalation policy, `call`/`sms`/`email`/`push`/
|
|
16
|
+
* `criticalAlert` decide how the current on-call person is alerted.
|
|
17
|
+
*
|
|
18
|
+
* @see https://betterstack.com/docs/uptime/new-relic/
|
|
19
|
+
* @see https://betterstack.com/docs/uptime/api/list-all-new-relic-integrations/
|
|
20
|
+
*
|
|
21
|
+
* ### Creating a New Relic integration
|
|
22
|
+
* **Example:** Alert through an escalation policy
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const integration = yield* BetterStack.Incidents.NewRelicIntegration("new-relic", {
|
|
25
|
+
* name: "New Relic alerts",
|
|
26
|
+
* escalationPolicyId: policyId,
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* ### Pasting the webhook URL into New Relic
|
|
31
|
+
* The URL is a secret: export it from the stack and paste it into
|
|
32
|
+
* New Relic, or hand it to whatever provisions New Relic.
|
|
33
|
+
*
|
|
34
|
+
* **Example:** A stack output
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const integration = yield* BetterStack.Incidents.NewRelicIntegration("alerts", { escalationPolicyId: policyId });
|
|
37
|
+
* return { webhookUrl: integration.webhookUrl };
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* ### Opening incidents on warnings too
|
|
41
|
+
* **Example:** `alert_and_warn`
|
|
42
|
+
* ```typescript
|
|
43
|
+
* yield* BetterStack.Incidents.NewRelicIntegration("warnings", { alertingRule: "alert_and_warn" });
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* ### Pausing
|
|
47
|
+
* **Example:** Stop opening incidents during maintenance
|
|
48
|
+
* ```typescript
|
|
49
|
+
* yield* BetterStack.Incidents.NewRelicIntegration("new-relic", { name: "New Relic alerts", paused: true });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @resource
|
|
53
|
+
* @product Incidents
|
|
54
|
+
*/
|
|
55
|
+
export const NewRelicIntegration = Resource("BetterStack.Incidents.NewRelicIntegration");
|
|
56
|
+
export const NewRelicIntegrationProvider = () => crud(NewRelicIntegration, {
|
|
57
|
+
ops: {
|
|
58
|
+
create: Incidents.createIncidentsNewRelicIntegration,
|
|
59
|
+
read: Incidents.getIncidentsNewRelicIntegration,
|
|
60
|
+
update: Incidents.updateIncidentsNewRelicIntegration,
|
|
61
|
+
delete: Incidents.deleteIncidentsNewRelicIntegration,
|
|
62
|
+
list: Incidents.listIncidentsNewRelicIntegration,
|
|
63
|
+
},
|
|
64
|
+
key: (integration) => ({ id: integration.id }),
|
|
65
|
+
physicalName: { prop: "name" },
|
|
66
|
+
nullOnRemove: ALERTING_NULL_ON_REMOVE,
|
|
67
|
+
adoptBy: { match: matchByName },
|
|
68
|
+
stables: ["id", "teamId", "teamName", "webhookUrl"],
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=NewRelicIntegration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewRelicIntegration.js","sourceRoot":"","sources":["../../src/Incidents/NewRelicIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAG3C,OAAO,KAAK,SAAS,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EACL,uBAAuB,EAEvB,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAwBhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CACzC,2CAA2C,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE,CAC9C,IAAI,CAAC,mBAAmB,EAAE;IACxB,GAAG,EAAE;QACH,MAAM,EAAE,SAAS,CAAC,kCAAkC;QACpD,IAAI,EAAE,SAAS,CAAC,+BAA+B;QAC/C,MAAM,EAAE,SAAS,CAAC,kCAAkC;QACpD,MAAM,EAAE,SAAS,CAAC,kCAAkC;QACpD,IAAI,EAAE,SAAS,CAAC,gCAAgC;KACjD;IACD,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC;IAC9C,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IAC9B,YAAY,EAAE,uBAAuB;IACrC,OAAO,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE;IAC/B,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,CAAC;CACpD,CAAC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as Provider from "alchemy/Provider";
|
|
2
|
+
import { Resource } from "alchemy/Resource";
|
|
3
|
+
import { type TeamProp } from "../internal/scope.ts";
|
|
4
|
+
import type { Providers } from "../Providers.ts";
|
|
5
|
+
import * as Incidents from "../sdk/services/incidents.ts";
|
|
6
|
+
/** Props of {@link OnCallRotation}. */
|
|
7
|
+
export interface OnCallRotationProps extends Omit<Incidents.CreateOnCallRotationRequest, "id" | "teamId">, TeamProp {
|
|
8
|
+
/**
|
|
9
|
+
* The on-call schedule the rotation belongs to (its `id`), or `default` for
|
|
10
|
+
* the team's default schedule. A schedule has one rotation; changing it
|
|
11
|
+
* replaces the rotation.
|
|
12
|
+
*/
|
|
13
|
+
scheduleId: string;
|
|
14
|
+
}
|
|
15
|
+
/** Attributes of {@link OnCallRotation}: the rotation as the API returns it, plus its schedule. */
|
|
16
|
+
export interface OnCallRotationAttributes extends Omit<Incidents.OnCallRotation, "id"> {
|
|
17
|
+
/** The on-call schedule the rotation belongs to (the rotation's own id is the schedule's). */
|
|
18
|
+
scheduleId: string;
|
|
19
|
+
/** Write-only: when the last change applied from (`applyFrom` as sent). */
|
|
20
|
+
applyFrom?: string | undefined;
|
|
21
|
+
/** Write-only: the time zone of `applyFrom` (as sent). */
|
|
22
|
+
applyFromTimezone?: string | undefined;
|
|
23
|
+
}
|
|
24
|
+
/** Props for {@link OnCallRotation.lookup}: a rotation is found through its schedule. */
|
|
25
|
+
export interface OnCallRotationLookup {
|
|
26
|
+
/** The on-call schedule's id, or `default`. */
|
|
27
|
+
scheduleId: string;
|
|
28
|
+
/** Team that owns the schedule, such as `t123`. Defaults to the credentials' team. */
|
|
29
|
+
teamId?: string;
|
|
30
|
+
}
|
|
31
|
+
export type OnCallRotation = Resource<"BetterStack.Incidents.OnCallRotation", OnCallRotationProps, OnCallRotationAttributes, never, Providers, OnCallRotationLookup>;
|
|
32
|
+
/**
|
|
33
|
+
* A Better Stack on-call rotation: puts the `users` of an
|
|
34
|
+
* {@link OnCallSchedule} on call in turns, with shifts of `rotationLength`
|
|
35
|
+
* `rotationInterval`s (hours, days or weeks) starting at
|
|
36
|
+
* `startRotationsAt`, optionally only inside weekly `workingHours`.
|
|
37
|
+
*
|
|
38
|
+
* A schedule has exactly one rotation, living at the schedule's address, so
|
|
39
|
+
* the rotation is identified by `scheduleId`. Create and update are the same
|
|
40
|
+
* replacing request: any change re-sends the whole rotation and replaces the
|
|
41
|
+
* schedule's future shifts (from `applyFrom` when given, otherwise from
|
|
42
|
+
* `startRotationsAt` or now); overrides stay. Changing `scheduleId` or
|
|
43
|
+
* `teamId` replaces the rotation (the old schedule's rotation is removed).
|
|
44
|
+
* Deleting it clears the shifts from today on; past shifts and overrides
|
|
45
|
+
* stay. `applyFrom` and `applyFromTimezone` are never returned by the API:
|
|
46
|
+
* they are compared against the previous deploy's props. `endRotationsAt`,
|
|
47
|
+
* `timezone` and `workingHours` keep their last value when removed from the
|
|
48
|
+
* config (the API keeps them).
|
|
49
|
+
*
|
|
50
|
+
* `users` are e-mail addresses of responders in the schedule's team; putting
|
|
51
|
+
* someone in a rotation makes them reachable by every escalation policy that
|
|
52
|
+
* pages the schedule.
|
|
53
|
+
*
|
|
54
|
+
* @see https://betterstack.com/docs/uptime/api/create-on-call-calendar-rotation/
|
|
55
|
+
*
|
|
56
|
+
* ### A weekly rotation
|
|
57
|
+
* **Example:** Two people, a week each, handing over on Monday morning
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const schedule = yield* BetterStack.Incidents.OnCallSchedule("primary", {
|
|
60
|
+
* name: "Primary on-call",
|
|
61
|
+
* });
|
|
62
|
+
* yield* BetterStack.Incidents.OnCallRotation("primary-rotation", {
|
|
63
|
+
* scheduleId: schedule.id,
|
|
64
|
+
* users: ["alice@example.com", "bob@example.com"],
|
|
65
|
+
* rotationLength: 1,
|
|
66
|
+
* rotationInterval: "week",
|
|
67
|
+
* startRotationsAt: "2030-01-07T09:00:00Z",
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* ### Business hours only
|
|
72
|
+
* **Example:** Daily shifts that page only on weekdays from 9 to 17
|
|
73
|
+
* ```typescript
|
|
74
|
+
* yield* BetterStack.Incidents.OnCallRotation("support-rotation", {
|
|
75
|
+
* scheduleId: schedule.id,
|
|
76
|
+
* users: ["carol@example.com", "dave@example.com"],
|
|
77
|
+
* rotationLength: 1,
|
|
78
|
+
* rotationInterval: "day",
|
|
79
|
+
* startRotationsAt: "2030-01-07T09:00:00Z",
|
|
80
|
+
* timezone: "Europe/Prague",
|
|
81
|
+
* workingHours: [
|
|
82
|
+
* { day: "monday", startTime: "09:00", endTime: "17:00" },
|
|
83
|
+
* { day: "tuesday", startTime: "09:00", endTime: "17:00" },
|
|
84
|
+
* { day: "wednesday", startTime: "09:00", endTime: "17:00" },
|
|
85
|
+
* { day: "thursday", startTime: "09:00", endTime: "17:00" },
|
|
86
|
+
* { day: "friday", startTime: "09:00", endTime: "17:00" },
|
|
87
|
+
* ],
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @resource
|
|
92
|
+
* @product Incidents
|
|
93
|
+
*/
|
|
94
|
+
export declare const OnCallRotation: import("alchemy/Resource").ResourceClass<OnCallRotation>;
|
|
95
|
+
export declare const OnCallRotationProvider: () => import("effect/Layer").Layer<Provider.Provider<OnCallRotation>, never, Incidents.BetterStackOpContext>;
|
|
96
|
+
//# sourceMappingURL=OnCallRotation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnCallRotation.d.ts","sourceRoot":"","sources":["../../src/Incidents/OnCallRotation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,SAAS,MAAM,8BAA8B,CAAC;AAE1D,uCAAuC;AACvC,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,SAAS,CAAC,2BAA2B,EAAE,IAAI,GAAG,QAAQ,CAAC,EAAE,QAAQ;IAC9E;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,mGAAmG;AACnG,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC;IACpF,8FAA8F;IAC9F,UAAU,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,0DAA0D;IAC1D,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED,yFAAyF;AACzF,MAAM,WAAW,oBAAoB;IACnC,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,CACnC,sCAAsC,EACtC,mBAAmB,EACnB,wBAAwB,EACxB,KAAK,EACL,SAAS,EACT,oBAAoB,CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,eAAO,MAAM,cAAc,0DAAmE,CAAC;AA0E/F,eAAO,MAAM,sBAAsB,8GA4GhC,CAAC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { Unowned } from "alchemy/AdoptPolicy";
|
|
2
|
+
import { isResolved } from "alchemy/Diff";
|
|
3
|
+
import * as Provider from "alchemy/Provider";
|
|
4
|
+
import { Resource } from "alchemy/Resource";
|
|
5
|
+
import * as Effect from "effect/Effect";
|
|
6
|
+
import * as Schedule from "effect/Schedule";
|
|
7
|
+
import * as Stream from "effect/Stream";
|
|
8
|
+
import { pick, same } from "../internal/fields.js";
|
|
9
|
+
import { resolveScope } from "../internal/scope.js";
|
|
10
|
+
import * as Incidents from "../sdk/services/incidents.js";
|
|
11
|
+
/**
|
|
12
|
+
* A Better Stack on-call rotation: puts the `users` of an
|
|
13
|
+
* {@link OnCallSchedule} on call in turns, with shifts of `rotationLength`
|
|
14
|
+
* `rotationInterval`s (hours, days or weeks) starting at
|
|
15
|
+
* `startRotationsAt`, optionally only inside weekly `workingHours`.
|
|
16
|
+
*
|
|
17
|
+
* A schedule has exactly one rotation, living at the schedule's address, so
|
|
18
|
+
* the rotation is identified by `scheduleId`. Create and update are the same
|
|
19
|
+
* replacing request: any change re-sends the whole rotation and replaces the
|
|
20
|
+
* schedule's future shifts (from `applyFrom` when given, otherwise from
|
|
21
|
+
* `startRotationsAt` or now); overrides stay. Changing `scheduleId` or
|
|
22
|
+
* `teamId` replaces the rotation (the old schedule's rotation is removed).
|
|
23
|
+
* Deleting it clears the shifts from today on; past shifts and overrides
|
|
24
|
+
* stay. `applyFrom` and `applyFromTimezone` are never returned by the API:
|
|
25
|
+
* they are compared against the previous deploy's props. `endRotationsAt`,
|
|
26
|
+
* `timezone` and `workingHours` keep their last value when removed from the
|
|
27
|
+
* config (the API keeps them).
|
|
28
|
+
*
|
|
29
|
+
* `users` are e-mail addresses of responders in the schedule's team; putting
|
|
30
|
+
* someone in a rotation makes them reachable by every escalation policy that
|
|
31
|
+
* pages the schedule.
|
|
32
|
+
*
|
|
33
|
+
* @see https://betterstack.com/docs/uptime/api/create-on-call-calendar-rotation/
|
|
34
|
+
*
|
|
35
|
+
* ### A weekly rotation
|
|
36
|
+
* **Example:** Two people, a week each, handing over on Monday morning
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const schedule = yield* BetterStack.Incidents.OnCallSchedule("primary", {
|
|
39
|
+
* name: "Primary on-call",
|
|
40
|
+
* });
|
|
41
|
+
* yield* BetterStack.Incidents.OnCallRotation("primary-rotation", {
|
|
42
|
+
* scheduleId: schedule.id,
|
|
43
|
+
* users: ["alice@example.com", "bob@example.com"],
|
|
44
|
+
* rotationLength: 1,
|
|
45
|
+
* rotationInterval: "week",
|
|
46
|
+
* startRotationsAt: "2030-01-07T09:00:00Z",
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* ### Business hours only
|
|
51
|
+
* **Example:** Daily shifts that page only on weekdays from 9 to 17
|
|
52
|
+
* ```typescript
|
|
53
|
+
* yield* BetterStack.Incidents.OnCallRotation("support-rotation", {
|
|
54
|
+
* scheduleId: schedule.id,
|
|
55
|
+
* users: ["carol@example.com", "dave@example.com"],
|
|
56
|
+
* rotationLength: 1,
|
|
57
|
+
* rotationInterval: "day",
|
|
58
|
+
* startRotationsAt: "2030-01-07T09:00:00Z",
|
|
59
|
+
* timezone: "Europe/Prague",
|
|
60
|
+
* workingHours: [
|
|
61
|
+
* { day: "monday", startTime: "09:00", endTime: "17:00" },
|
|
62
|
+
* { day: "tuesday", startTime: "09:00", endTime: "17:00" },
|
|
63
|
+
* { day: "wednesday", startTime: "09:00", endTime: "17:00" },
|
|
64
|
+
* { day: "thursday", startTime: "09:00", endTime: "17:00" },
|
|
65
|
+
* { day: "friday", startTime: "09:00", endTime: "17:00" },
|
|
66
|
+
* ],
|
|
67
|
+
* });
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @resource
|
|
71
|
+
* @product Incidents
|
|
72
|
+
*/
|
|
73
|
+
export const OnCallRotation = Resource("BetterStack.Incidents.OnCallRotation");
|
|
74
|
+
/** Members the API never returns: compared against the previous props. */
|
|
75
|
+
const WRITE_ONLY = ["applyFrom", "applyFromTimezone"];
|
|
76
|
+
/** Members of the replacing POST (everything but the address). */
|
|
77
|
+
const BODY = [
|
|
78
|
+
"users",
|
|
79
|
+
"rotationLength",
|
|
80
|
+
"rotationInterval",
|
|
81
|
+
"startRotationsAt",
|
|
82
|
+
"endRotationsAt",
|
|
83
|
+
"timezone",
|
|
84
|
+
"applyFrom",
|
|
85
|
+
"applyFromTimezone",
|
|
86
|
+
"workingHours",
|
|
87
|
+
];
|
|
88
|
+
/** Timestamps compare as instants: the API may answer another notation of the same time. */
|
|
89
|
+
const TIMESTAMPS = new Set(["startRotationsAt", "endRotationsAt"]);
|
|
90
|
+
const sameValue = (key, want, have) => {
|
|
91
|
+
if (TIMESTAMPS.has(key) && typeof want === "string" && typeof have === "string") {
|
|
92
|
+
const a = Date.parse(want);
|
|
93
|
+
const b = Date.parse(have);
|
|
94
|
+
if (!Number.isNaN(a) && !Number.isNaN(b))
|
|
95
|
+
return a === b;
|
|
96
|
+
}
|
|
97
|
+
return same(want, have);
|
|
98
|
+
};
|
|
99
|
+
/** Response → attributes: the rotation's id is its schedule's id. */
|
|
100
|
+
const toAttributes = (rotation, scheduleId, props) => {
|
|
101
|
+
const { id: _, ...rest } = rotation;
|
|
102
|
+
return {
|
|
103
|
+
...rest,
|
|
104
|
+
scheduleId,
|
|
105
|
+
...pick(props, WRITE_ONLY),
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
/** Does the live rotation already hold what `props` asks for? */
|
|
109
|
+
const converged = (live, props, previous) => BODY.every((key) => {
|
|
110
|
+
// Casts: the props/live interfaces have no index signature; `BODY` names their members.
|
|
111
|
+
const want = props[key];
|
|
112
|
+
// Left out: the API keeps its current value (`keptOnRemoval`).
|
|
113
|
+
if (want === undefined)
|
|
114
|
+
return true;
|
|
115
|
+
const have = WRITE_ONLY.includes(key)
|
|
116
|
+
? previous?.[key]
|
|
117
|
+
: live[key];
|
|
118
|
+
return sameValue(key, want, have);
|
|
119
|
+
});
|
|
120
|
+
/**
|
|
121
|
+
* The documented 409 on the rotation's POST and DELETE: "Another change to this on-call
|
|
122
|
+
* schedule is in progress. Try again in a moment." Retried a few times, for about 15 seconds.
|
|
123
|
+
*/
|
|
124
|
+
const whileScheduleBusy = (effect) => Effect.retry(effect, {
|
|
125
|
+
while: (error) => error._tag === "Conflict",
|
|
126
|
+
schedule: Schedule.exponential("500 millis"),
|
|
127
|
+
times: 5,
|
|
128
|
+
});
|
|
129
|
+
export const OnCallRotationProvider = () => Provider.effect(OnCallRotation, Effect.sync(() => {
|
|
130
|
+
const type = OnCallRotation.Type;
|
|
131
|
+
/** The live rotation of a schedule, `undefined` when it has none (or the schedule is gone). */
|
|
132
|
+
const observe = (scheduleId, teamId) => Incidents.getOnCallRotation({ id: scheduleId, teamId }).pipe(Effect.catchTag("NotFound", () => Effect.succeed(undefined)));
|
|
133
|
+
return {
|
|
134
|
+
stables: ["scheduleId", "teamId"],
|
|
135
|
+
diff: Effect.fn(function* ({ news, olds, output }) {
|
|
136
|
+
// The schedule identifies the rotation: a new one (unresolved while it is created in
|
|
137
|
+
// this deploy) or another one replaces it.
|
|
138
|
+
const scheduleId = news.scheduleId;
|
|
139
|
+
if (!isResolved(scheduleId) || scheduleId !== olds.scheduleId) {
|
|
140
|
+
return { action: "replace" };
|
|
141
|
+
}
|
|
142
|
+
if (!isResolved(news))
|
|
143
|
+
return undefined;
|
|
144
|
+
// `teamId` defaults from the credentials: leaving it out is no change.
|
|
145
|
+
if (news.teamId !== undefined && news.teamId !== (olds.teamId ?? output?.teamId)) {
|
|
146
|
+
return { action: "replace" };
|
|
147
|
+
}
|
|
148
|
+
return same(news, olds) ? { action: "noop" } : { action: "update" };
|
|
149
|
+
}),
|
|
150
|
+
read: Effect.fn(function* ({ olds, output, previous }) {
|
|
151
|
+
const props = olds;
|
|
152
|
+
const scheduleId = output?.scheduleId ?? props?.scheduleId;
|
|
153
|
+
if (scheduleId === undefined)
|
|
154
|
+
return undefined;
|
|
155
|
+
const { teamId } = yield* resolveScope(false, type, props, output);
|
|
156
|
+
const live = yield* observe(scheduleId, teamId);
|
|
157
|
+
if (live === undefined)
|
|
158
|
+
return undefined;
|
|
159
|
+
const attrs = toAttributes(live, scheduleId, props);
|
|
160
|
+
if (output !== undefined)
|
|
161
|
+
return attrs;
|
|
162
|
+
// No state yet: the schedule already has a rotation. It is a
|
|
163
|
+
// singleton under the schedule, so it is only taken over with
|
|
164
|
+
// `--adopt`, unless it is the generation being replaced.
|
|
165
|
+
if (previous !== undefined && previous.scheduleId === scheduleId)
|
|
166
|
+
return undefined;
|
|
167
|
+
return Unowned(attrs);
|
|
168
|
+
}),
|
|
169
|
+
reconcile: Effect.fn(function* ({ news, olds, output }) {
|
|
170
|
+
const { teamId } = yield* resolveScope(false, type,
|
|
171
|
+
// Cast: `resolveScope` reads props generically (no index signature on the props).
|
|
172
|
+
news, output);
|
|
173
|
+
// Observe — `output` is only a cache; the schedule may have lost its rotation.
|
|
174
|
+
const live = yield* observe(news.scheduleId, teamId);
|
|
175
|
+
// Sync — the POST replaces the whole rotation, so skip it when nothing differs.
|
|
176
|
+
// Ensure — create and update are the same replacing POST.
|
|
177
|
+
const { scheduleId, teamId: _, ...body } = news;
|
|
178
|
+
const attrs = live !== undefined && converged(live, news, olds)
|
|
179
|
+
? toAttributes(live, scheduleId, news)
|
|
180
|
+
: toAttributes(yield* whileScheduleBusy(Incidents.createOnCallRotation({ ...body, id: scheduleId, teamId })), scheduleId, news);
|
|
181
|
+
return attrs;
|
|
182
|
+
}),
|
|
183
|
+
delete: Effect.fn(function* ({ olds, output }) {
|
|
184
|
+
const { teamId } = yield* resolveScope(false, type,
|
|
185
|
+
// Cast: as in `reconcile`.
|
|
186
|
+
olds, output);
|
|
187
|
+
yield* whileScheduleBusy(Incidents.deleteOnCallRotation({ id: output.scheduleId, teamId })).pipe(Effect.catchTag("NotFound", () => Effect.void));
|
|
188
|
+
}),
|
|
189
|
+
// Every schedule's rotation (schedules without one are skipped).
|
|
190
|
+
list: () => Effect.gen(function* () {
|
|
191
|
+
const schedules = yield* Stream.runCollect(Incidents.listOnCallSchedule.items({}));
|
|
192
|
+
const rotations = [];
|
|
193
|
+
for (const schedule of schedules) {
|
|
194
|
+
const live = yield* observe(schedule.id, undefined);
|
|
195
|
+
if (live !== undefined)
|
|
196
|
+
rotations.push(toAttributes(live, schedule.id, undefined));
|
|
197
|
+
}
|
|
198
|
+
return rotations;
|
|
199
|
+
}),
|
|
200
|
+
lookup: Effect.fn(function* ({ scheduleId, teamId }) {
|
|
201
|
+
const live = yield* observe(scheduleId, teamId);
|
|
202
|
+
return live === undefined ? undefined : toAttributes(live, scheduleId, undefined);
|
|
203
|
+
}),
|
|
204
|
+
};
|
|
205
|
+
}));
|
|
206
|
+
//# sourceMappingURL=OnCallRotation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnCallRotation.js","sourceRoot":"","sources":["../../src/Incidents/OnCallRotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QA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AAM,CAAC,UAAU,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;YACnF,MAAM,SAAS,GAAoC,EAAE,CAAC;YACtD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;gBACjC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;gBACpD,IAAI,IAAI,KAAK,SAAS;oBAAE,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC;YACrF,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC,CAAC;QAEJ,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,UAAU,EAAE,MAAM,EAAwB;YACvE,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;YAChD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QACpF,CAAC,CAAC;KACH,CAAC;AACJ,CAAC,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Resource } from "alchemy/Resource";
|
|
2
|
+
import type { TeamProp } from "../internal/scope.ts";
|
|
3
|
+
import type { Providers } from "../Providers.ts";
|
|
4
|
+
import * as Incidents from "../sdk/services/incidents.ts";
|
|
5
|
+
/** Props of {@link OnCallSchedule}. */
|
|
6
|
+
export interface OnCallScheduleProps extends Omit<Incidents.CreateOnCallScheduleRequest, "teamId" | "name">, TeamProp {
|
|
7
|
+
/** Schedule name. Defaults to a unique name generated from the stack, stage and logical id. */
|
|
8
|
+
name?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Attributes of {@link OnCallSchedule}: the schedule as the API returns it.
|
|
12
|
+
* `shifts` and `slackGroups` are a snapshot from the last deploy or read.
|
|
13
|
+
*/
|
|
14
|
+
export interface OnCallScheduleAttributes extends Omit<Incidents.OnCallSchedule, "relationships"> {
|
|
15
|
+
}
|
|
16
|
+
/** Props for {@link OnCallSchedule.lookup}: find an on-call schedule this stack doesn't manage. */
|
|
17
|
+
export type OnCallScheduleLookup = {
|
|
18
|
+
/** The schedule's id, or `default` for the team's default schedule. */
|
|
19
|
+
id: string;
|
|
20
|
+
/** Team that owns it, such as `t123`. Defaults to the credentials' team. */
|
|
21
|
+
teamId?: string;
|
|
22
|
+
} | {
|
|
23
|
+
/** The schedule's name. Names aren't unique: more than one match fails with `AmbiguousLookup`. */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Team that owns it, such as `t123`. Defaults to the credentials' team. */
|
|
26
|
+
teamId?: string;
|
|
27
|
+
};
|
|
28
|
+
export type OnCallSchedule = Resource<"BetterStack.Incidents.OnCallSchedule", OnCallScheduleProps, OnCallScheduleAttributes, never, Providers, OnCallScheduleLookup>;
|
|
29
|
+
/**
|
|
30
|
+
* A Better Stack on-call schedule: says who on the team is on call and when.
|
|
31
|
+
* Who is on call comes from the schedule's {@link OnCallRotation} (people in
|
|
32
|
+
* turns, with shifts of a set length) plus overrides. Escalation policies page
|
|
33
|
+
* it with a `current_on_call` step member whose `id` is the schedule's id.
|
|
34
|
+
*
|
|
35
|
+
* Every prop updates in place; `teamId` replaces the schedule. `name`
|
|
36
|
+
* defaults to a generated unique name. Removing `slackGroupHandle` stops
|
|
37
|
+
* tagging who is on call in Slack. Deleting a schedule also deletes its
|
|
38
|
+
* rotation and events. The team's default schedule is not created by this
|
|
39
|
+
* resource (look it up by its numeric id: the live API answers `500` for
|
|
40
|
+
* `lookup({ id: "default" })`).
|
|
41
|
+
*
|
|
42
|
+
* The free plan includes one on-call schedule per team: creating another
|
|
43
|
+
* fails with a typed `Forbidden` ("Your plan includes one on-call schedule per
|
|
44
|
+
* team. Upgrade your plan to add more.").
|
|
45
|
+
*
|
|
46
|
+
* @see https://betterstack.com/docs/uptime/api/list-all-existing-on-call-calendars/
|
|
47
|
+
*
|
|
48
|
+
* ### Creating a schedule with a rotation
|
|
49
|
+
* **Example:** A weekly rotation the on-call escalation policy pages
|
|
50
|
+
* ```typescript
|
|
51
|
+
* const schedule = yield* BetterStack.Incidents.OnCallSchedule("primary", {
|
|
52
|
+
* name: "Primary on-call",
|
|
53
|
+
* });
|
|
54
|
+
* yield* BetterStack.Incidents.OnCallRotation("primary-rotation", {
|
|
55
|
+
* scheduleId: schedule.id,
|
|
56
|
+
* users: ["alice@example.com", "bob@example.com"],
|
|
57
|
+
* rotationLength: 1,
|
|
58
|
+
* rotationInterval: "week",
|
|
59
|
+
* startRotationsAt: "2030-01-07T09:00:00Z",
|
|
60
|
+
* });
|
|
61
|
+
* yield* BetterStack.Incidents.EscalationPolicy("primary-policy", {
|
|
62
|
+
* name: "Primary on-call",
|
|
63
|
+
* steps: [
|
|
64
|
+
* { type: "escalation", waitBefore: 0, stepMembers: [{ type: "current_on_call", id: schedule.id }] },
|
|
65
|
+
* ],
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* ### Looking up a schedule by name
|
|
70
|
+
* **Example:** Fails with `AmbiguousLookup` when several schedules share the name
|
|
71
|
+
* ```typescript
|
|
72
|
+
* const primary = BetterStack.Incidents.OnCallSchedule.lookup({ name: "Primary on-call" });
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @resource
|
|
76
|
+
* @product Incidents
|
|
77
|
+
*/
|
|
78
|
+
export declare const OnCallSchedule: import("alchemy/Resource").ResourceClass<OnCallSchedule>;
|
|
79
|
+
export declare const OnCallScheduleProvider: () => import("effect/Layer").Layer<import("alchemy/Provider").Provider<OnCallSchedule>, never, import("../internal/crud.ts").CrudRequirements>;
|
|
80
|
+
//# sourceMappingURL=OnCallSchedule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnCallSchedule.d.ts","sourceRoot":"","sources":["../../src/Incidents/OnCallSchedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,SAAS,MAAM,8BAA8B,CAAC;AAE1D,uCAAuC;AACvC,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,SAAS,CAAC,2BAA2B,EAAE,QAAQ,GAAG,MAAM,CAAC,EAAE,QAAQ;IAChF,+FAA+F;IAC/F,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,eAAe,CAAC;CAAG;AAEpG,mGAAmG;AACnG,MAAM,MAAM,oBAAoB,GAC5B;IACE,uEAAuE;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,kGAAkG;IAClG,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,MAAM,MAAM,cAAc,GAAG,QAAQ,CACnC,sCAAsC,EACtC,mBAAmB,EACnB,wBAAwB,EACxB,KAAK,EACL,SAAS,EACT,oBAAoB,CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,cAAc,0DAAmE,CAAC;AAE/F,eAAO,MAAM,sBAAsB,gJAoB/B,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Resource } from "alchemy/Resource";
|
|
2
|
+
import { crud } from "../internal/crud.js";
|
|
3
|
+
import * as Incidents from "../sdk/services/incidents.js";
|
|
4
|
+
/**
|
|
5
|
+
* A Better Stack on-call schedule: says who on the team is on call and when.
|
|
6
|
+
* Who is on call comes from the schedule's {@link OnCallRotation} (people in
|
|
7
|
+
* turns, with shifts of a set length) plus overrides. Escalation policies page
|
|
8
|
+
* it with a `current_on_call` step member whose `id` is the schedule's id.
|
|
9
|
+
*
|
|
10
|
+
* Every prop updates in place; `teamId` replaces the schedule. `name`
|
|
11
|
+
* defaults to a generated unique name. Removing `slackGroupHandle` stops
|
|
12
|
+
* tagging who is on call in Slack. Deleting a schedule also deletes its
|
|
13
|
+
* rotation and events. The team's default schedule is not created by this
|
|
14
|
+
* resource (look it up by its numeric id: the live API answers `500` for
|
|
15
|
+
* `lookup({ id: "default" })`).
|
|
16
|
+
*
|
|
17
|
+
* The free plan includes one on-call schedule per team: creating another
|
|
18
|
+
* fails with a typed `Forbidden` ("Your plan includes one on-call schedule per
|
|
19
|
+
* team. Upgrade your plan to add more.").
|
|
20
|
+
*
|
|
21
|
+
* @see https://betterstack.com/docs/uptime/api/list-all-existing-on-call-calendars/
|
|
22
|
+
*
|
|
23
|
+
* ### Creating a schedule with a rotation
|
|
24
|
+
* **Example:** A weekly rotation the on-call escalation policy pages
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const schedule = yield* BetterStack.Incidents.OnCallSchedule("primary", {
|
|
27
|
+
* name: "Primary on-call",
|
|
28
|
+
* });
|
|
29
|
+
* yield* BetterStack.Incidents.OnCallRotation("primary-rotation", {
|
|
30
|
+
* scheduleId: schedule.id,
|
|
31
|
+
* users: ["alice@example.com", "bob@example.com"],
|
|
32
|
+
* rotationLength: 1,
|
|
33
|
+
* rotationInterval: "week",
|
|
34
|
+
* startRotationsAt: "2030-01-07T09:00:00Z",
|
|
35
|
+
* });
|
|
36
|
+
* yield* BetterStack.Incidents.EscalationPolicy("primary-policy", {
|
|
37
|
+
* name: "Primary on-call",
|
|
38
|
+
* steps: [
|
|
39
|
+
* { type: "escalation", waitBefore: 0, stepMembers: [{ type: "current_on_call", id: schedule.id }] },
|
|
40
|
+
* ],
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* ### Looking up a schedule by name
|
|
45
|
+
* **Example:** Fails with `AmbiguousLookup` when several schedules share the name
|
|
46
|
+
* ```typescript
|
|
47
|
+
* const primary = BetterStack.Incidents.OnCallSchedule.lookup({ name: "Primary on-call" });
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @resource
|
|
51
|
+
* @product Incidents
|
|
52
|
+
*/
|
|
53
|
+
export const OnCallSchedule = Resource("BetterStack.Incidents.OnCallSchedule");
|
|
54
|
+
export const OnCallScheduleProvider = () => crud(OnCallSchedule, {
|
|
55
|
+
ops: {
|
|
56
|
+
create: Incidents.createOnCallSchedule,
|
|
57
|
+
read: Incidents.getOnCallSchedule,
|
|
58
|
+
update: Incidents.updateOnCallSchedule,
|
|
59
|
+
delete: Incidents.deleteOnCallSchedule,
|
|
60
|
+
list: Incidents.listOnCallSchedule,
|
|
61
|
+
},
|
|
62
|
+
key: (schedule) => ({ id: schedule.id }),
|
|
63
|
+
toAttributes: ({ relationships: _, ...schedule }) => schedule,
|
|
64
|
+
physicalName: { prop: "name" },
|
|
65
|
+
nullOnRemove: ["slackGroupHandle"],
|
|
66
|
+
// Adopt a schedule with the same explicit name.
|
|
67
|
+
adoptBy: {
|
|
68
|
+
match: (props) => props.name === undefined ? undefined : (schedule) => schedule.name === props.name,
|
|
69
|
+
},
|
|
70
|
+
lookup: { match: (lookup, schedule) => "name" in lookup && schedule.name === lookup.name },
|
|
71
|
+
stables: ["id", "teamId", "defaultSchedule"],
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=OnCallSchedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnCallSchedule.js","sourceRoot":"","sources":["../../src/Incidents/OnCallSchedule.ts"],"names":[],"mapp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AI,KAAK,MAAM,CAAC,IAAI,EAAE;IAC1F,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,iBAAiB,CAAC;CAC7C,CAAC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Resource } from "alchemy/Resource";
|
|
2
|
+
import type { TeamProp } from "../internal/scope.ts";
|
|
3
|
+
import type { Providers } from "../Providers.ts";
|
|
4
|
+
import * as Incidents from "../sdk/services/incidents.ts";
|
|
5
|
+
import { type IntegrationLookup } from "./integrationFields.ts";
|
|
6
|
+
/** Props of {@link OutgoingEmailIntegration}. */
|
|
7
|
+
export interface OutgoingEmailIntegrationProps extends Omit<Incidents.CreateIncidentsOutgoingEmailIntegrationRequest, "teamId" | "name">, TeamProp {
|
|
8
|
+
/** The name shown in the dashboard. Defaults to a unique name generated from the stack, stage and logical id. */
|
|
9
|
+
name?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Attributes of {@link OutgoingEmailIntegration}: the integration as the API returns it. */
|
|
12
|
+
export interface OutgoingEmailIntegrationAttributes extends Incidents.IncidentsOutgoingEmailIntegration {
|
|
13
|
+
}
|
|
14
|
+
/** Props for {@link OutgoingEmailIntegration.lookup}. */
|
|
15
|
+
export interface OutgoingEmailIntegrationLookup extends IntegrationLookup {
|
|
16
|
+
}
|
|
17
|
+
export type OutgoingEmailIntegration = Resource<"BetterStack.Incidents.OutgoingEmailIntegration", OutgoingEmailIntegrationProps, OutgoingEmailIntegrationAttributes, never, Providers, OutgoingEmailIntegrationLookup>;
|
|
18
|
+
/**
|
|
19
|
+
* Sends e-mails about your incidents to addresses outside Better Stack, such
|
|
20
|
+
* as a customer's distribution list. `recipients` are objects with an
|
|
21
|
+
* `email` and up to 10 extra text keys (rendered as `$RECIPIENT.<key>` in
|
|
22
|
+
* templates). The `onIncident*` toggles pick the stages that send an
|
|
23
|
+
* e-mail, and `templates` replace the default subject, title and body per
|
|
24
|
+
* stage (`$NAME`, `$CAUSE`, `$INCIDENT_URL`, `$METADATA.Key`, …).
|
|
25
|
+
*
|
|
26
|
+
* Every prop updates in place except `teamId`, which replaces the
|
|
27
|
+
* integration. A `recipients` or `templates` list replaces the whole list;
|
|
28
|
+
* removing `templates` from the config keeps the integration's templates
|
|
29
|
+
* (send `[]` to drop them all). `name` defaults to a generated unique name.
|
|
30
|
+
* `paused` is read-only here.
|
|
31
|
+
*
|
|
32
|
+
* @see https://betterstack.com/docs/uptime/api/list-all-outgoing-email-integrations/
|
|
33
|
+
*
|
|
34
|
+
* ### E-mailing a customer about their incidents
|
|
35
|
+
* **Example:** Started and resolved, with a custom subject
|
|
36
|
+
* ```typescript
|
|
37
|
+
* yield* BetterStack.Incidents.OutgoingEmailIntegration("customer-updates", {
|
|
38
|
+
* name: "ACME status e-mails",
|
|
39
|
+
* recipients: [{ email: "oncall@acme.example" }],
|
|
40
|
+
* onIncidentStarted: true,
|
|
41
|
+
* onIncidentResolved: true,
|
|
42
|
+
* onIncidentAcknowledged: false,
|
|
43
|
+
* onIncidentReopened: false,
|
|
44
|
+
* onIncidentComment: false,
|
|
45
|
+
* templates: [{ incidentStage: "started", subject: "[ACME] $NAME is down", title: null, body: null }],
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @resource
|
|
50
|
+
* @product Incidents
|
|
51
|
+
*/
|
|
52
|
+
export declare const OutgoingEmailIntegration: import("alchemy/Resource").ResourceClass<OutgoingEmailIntegration>;
|
|
53
|
+
export declare const OutgoingEmailIntegrationProvider: () => import("effect/Layer").Layer<import("alchemy/Provider").Provider<OutgoingEmailIntegration>, never, import("../internal/crud.ts").CrudRequirements>;
|
|
54
|
+
//# sourceMappingURL=OutgoingEmailIntegration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutgoingEmailIntegration.d.ts","sourceRoot":"","sources":["../../src/Incidents/OutgoingEmailIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,SAAS,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,KAAK,iBAAiB,EAAe,MAAM,wBAAwB,CAAC;AAE7E,iDAAiD;AACjD,MAAM,WAAW,6BACf,SACE,IAAI,CAAC,SAAS,CAAC,8CAA8C,EAAE,QAAQ,GAAG,MAAM,CAAC,EACjF,QAAQ;IACV,iHAAiH;IACjH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,6FAA6F;AAC7F,MAAM,WAAW,kCACf,SAAQ,SAAS,CAAC,iCAAiC;CAAG;AAExD,yDAAyD;AACzD,MAAM,WAAW,8BAA+B,SAAQ,iBAAiB;CAAG;AAE5E,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAC7C,gDAAgD,EAChD,6BAA6B,EAC7B,kCAAkC,EAClC,KAAK,EACL,SAAS,EACT,8BAA8B,CAC/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,wBAAwB,oEAEpC,CAAC;AAEF,eAAO,MAAM,gCAAgC,0JAazC,CAAC"}
|