@sponson/adapters 0.4.0 → 0.5.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.
Files changed (127) hide show
  1. package/README.md +1 -1
  2. package/dist/algolia.d.ts +6 -0
  3. package/dist/algolia.js +151 -0
  4. package/dist/algolia.js.map +1 -0
  5. package/dist/clerk.js +1 -1
  6. package/dist/clerk.js.map +1 -1
  7. package/dist/cloudflare.d.ts +25 -0
  8. package/dist/cloudflare.js +310 -0
  9. package/dist/cloudflare.js.map +1 -0
  10. package/dist/common.d.ts +2 -6
  11. package/dist/common.js.map +1 -1
  12. package/dist/digest.d.ts +46 -0
  13. package/dist/digest.js +129 -0
  14. package/dist/digest.js.map +1 -0
  15. package/dist/digitalocean.d.ts +5 -0
  16. package/dist/digitalocean.js +243 -0
  17. package/dist/digitalocean.js.map +1 -0
  18. package/dist/http-adapter-action.d.ts +63 -0
  19. package/dist/http-adapter-action.js +369 -0
  20. package/dist/http-adapter-action.js.map +1 -0
  21. package/dist/http-adapter-auth.d.ts +88 -0
  22. package/dist/http-adapter-auth.js +437 -0
  23. package/dist/http-adapter-auth.js.map +1 -0
  24. package/dist/http-adapter-client.d.ts +51 -0
  25. package/dist/http-adapter-client.js +156 -0
  26. package/dist/http-adapter-client.js.map +1 -0
  27. package/dist/http-adapter-graphql.d.ts +39 -0
  28. package/dist/http-adapter-graphql.js +157 -0
  29. package/dist/http-adapter-graphql.js.map +1 -0
  30. package/dist/http-adapter-list.d.ts +33 -0
  31. package/dist/http-adapter-list.js +421 -0
  32. package/dist/http-adapter-list.js.map +1 -0
  33. package/dist/http-adapter-resource.d.ts +29 -0
  34. package/dist/http-adapter-resource.js +462 -0
  35. package/dist/http-adapter-resource.js.map +1 -0
  36. package/dist/http-adapter-spec.d.ts +216 -0
  37. package/dist/http-adapter-spec.js +660 -0
  38. package/dist/http-adapter-spec.js.map +1 -0
  39. package/dist/http-adapter.d.ts +16 -0
  40. package/dist/http-adapter.js +28 -0
  41. package/dist/http-adapter.js.map +1 -0
  42. package/dist/http.d.ts +61 -2
  43. package/dist/http.js +79 -18
  44. package/dist/http.js.map +1 -1
  45. package/dist/index.d.ts +12 -0
  46. package/dist/index.js +24 -2
  47. package/dist/index.js.map +1 -1
  48. package/dist/launchdarkly.d.ts +15 -0
  49. package/dist/launchdarkly.js +337 -0
  50. package/dist/launchdarkly.js.map +1 -0
  51. package/dist/manual.d.ts +13 -0
  52. package/dist/manual.js +201 -0
  53. package/dist/manual.js.map +1 -0
  54. package/dist/neon.js +1 -1
  55. package/dist/neon.js.map +1 -1
  56. package/dist/netlify.d.ts +18 -0
  57. package/dist/netlify.js +436 -0
  58. package/dist/netlify.js.map +1 -0
  59. package/dist/planetscale.d.ts +10 -0
  60. package/dist/planetscale.js +311 -0
  61. package/dist/planetscale.js.map +1 -0
  62. package/dist/providers.d.ts +26 -0
  63. package/dist/providers.js +36 -0
  64. package/dist/providers.js.map +1 -0
  65. package/dist/recipes.d.ts +167 -0
  66. package/dist/recipes.js +246 -0
  67. package/dist/recipes.js.map +1 -0
  68. package/dist/secrets.d.ts +44 -0
  69. package/dist/secrets.js +279 -0
  70. package/dist/secrets.js.map +1 -1
  71. package/dist/sigv4.d.ts +56 -0
  72. package/dist/sigv4.js +118 -0
  73. package/dist/sigv4.js.map +1 -0
  74. package/dist/supabase.d.ts +9 -0
  75. package/dist/supabase.js +385 -0
  76. package/dist/supabase.js.map +1 -0
  77. package/dist/vercel.js +1 -1
  78. package/dist/vercel.js.map +1 -1
  79. package/dist/xata.d.ts +8 -0
  80. package/dist/xata.js +142 -0
  81. package/dist/xata.js.map +1 -0
  82. package/dist/xml.d.ts +25 -0
  83. package/dist/xml.js +211 -0
  84. package/dist/xml.js.map +1 -0
  85. package/package.json +11 -4
  86. package/recipes/amplify.yaml +147 -0
  87. package/recipes/auth0.yaml +178 -0
  88. package/recipes/azure_swa.yaml +116 -0
  89. package/recipes/cloud_run.yaml +97 -0
  90. package/recipes/cloudflare.yaml +108 -0
  91. package/recipes/cockroachdb.yaml +132 -0
  92. package/recipes/configcat.yaml +123 -0
  93. package/recipes/datadog.yaml +136 -0
  94. package/recipes/firebase.yaml +84 -0
  95. package/recipes/flagsmith.yaml +98 -0
  96. package/recipes/fly.yaml +97 -0
  97. package/recipes/fly_machines.yaml +67 -0
  98. package/recipes/gcs.yaml +102 -0
  99. package/recipes/github.yaml +123 -0
  100. package/recipes/growthbook.yaml +124 -0
  101. package/recipes/heroku.yaml +98 -0
  102. package/recipes/honeycomb.yaml +89 -0
  103. package/recipes/inngest.yaml +97 -0
  104. package/recipes/kinde.yaml +120 -0
  105. package/recipes/mongodb_atlas.yaml +119 -0
  106. package/recipes/okta.yaml +177 -0
  107. package/recipes/posthog.yaml +127 -0
  108. package/recipes/postmark.yaml +105 -0
  109. package/recipes/postmark_server.yaml +93 -0
  110. package/recipes/prisma.yaml +150 -0
  111. package/recipes/qstash.yaml +134 -0
  112. package/recipes/railway.yaml +130 -0
  113. package/recipes/render.yaml +103 -0
  114. package/recipes/resend.yaml +130 -0
  115. package/recipes/s3.yaml +108 -0
  116. package/recipes/sendgrid.yaml +165 -0
  117. package/recipes/sentry.yaml +158 -0
  118. package/recipes/split.yaml +121 -0
  119. package/recipes/statsig.yaml +124 -0
  120. package/recipes/stripe.yaml +310 -0
  121. package/recipes/stytch.yaml +113 -0
  122. package/recipes/svix.yaml +109 -0
  123. package/recipes/turso.yaml +98 -0
  124. package/recipes/unleash.yaml +149 -0
  125. package/recipes/upstash.yaml +130 -0
  126. package/recipes/vercel.yaml +116 -0
  127. package/recipes/workos.yaml +70 -0
@@ -0,0 +1,165 @@
1
+ # yaml-language-server: $schema=../../../schema/recipe.schema.json
2
+ # Twilio SendGrid v3 API recipes. Format and checklist: docs/adr/0020-recipes.md, CONTRIBUTING.md "Adding a recipe".
3
+ provider: sendgrid
4
+ title: SendGrid
5
+ category: email
6
+ verified_on: "2026-10-11"
7
+ docs:
8
+ - title: Create an Event Webhook
9
+ url: https://www.twilio.com/docs/sendgrid/api-reference/webhooks/create-an-event-webhook
10
+ - title: Get all Event Webhooks
11
+ url: https://www.twilio.com/docs/sendgrid/api-reference/webhooks/get-all-event-webhooks
12
+ - title: Get an Event Webhook
13
+ url: https://www.twilio.com/docs/sendgrid/api-reference/webhooks/get-an-event-webhook
14
+ - title: Update an Event Webhook
15
+ url: https://www.twilio.com/docs/sendgrid/api-reference/webhooks/update-an-event-webhook
16
+ - title: Delete an Event Webhook
17
+ url: https://www.twilio.com/docs/sendgrid/api-reference/webhooks/delete-an-event-webhook
18
+ - title: Create a parse setting
19
+ url: https://www.twilio.com/docs/sendgrid/api-reference/settings-inbound-parse/create-a-parse-setting
20
+ - title: Retrieve a specific parse setting
21
+ url: https://www.twilio.com/docs/sendgrid/api-reference/settings-inbound-parse/retrieve-a-specific-parse-setting
22
+ - title: Update a parse setting
23
+ url: https://www.twilio.com/docs/sendgrid/api-reference/settings-inbound-parse/update-a-parse-setting
24
+ - title: Delete a parse setting
25
+ url: https://www.twilio.com/docs/sendgrid/api-reference/settings-inbound-parse/delete-a-parse-setting
26
+ api:
27
+ base_url: https://api.sendgrid.com
28
+ base_url_env: SENDGRID_API_URL
29
+ auth: { bearer_env: SENDGRID_API_KEY }
30
+ detect:
31
+ deps: ["@sendgrid/"]
32
+ env: ["SENDGRID_*"]
33
+ starter:
34
+ - op: event_webhook
35
+ where:
36
+ url: "the preview's event handler: its URL plus the handler's path (a `{ from }` reference cannot carry a path)"
37
+ assumptions:
38
+ - id: SG1
39
+ verified: true
40
+ text: "`POST /v3/user/webhooks/event/settings` creates an Event Webhook from `url` (required), `enabled`, one boolean per event type (`processed`, `delivered`, `dropped`, `deferred`, `bounce`, `open`, `click`, `spam_report`, `unsubscribe`, `group_unsubscribe`, `group_resubscribe`) and `friendly_name`, answering 201 with the webhook and its string `id`; requests carry the API key as `Authorization: Bearer`. EU regional subusers use `https://api.eu.sendgrid.com`."
41
+ source: https://www.twilio.com/docs/sendgrid/api-reference/webhooks/create-an-event-webhook
42
+ - id: SG2
43
+ verified: true
44
+ text: "Each URL can be used by only one Event Webhook (a second create answers 400 naming the existing id), so the URL identifies the webhook; the number of webhooks is limited by the plan (400 beyond it)."
45
+ source: https://www.twilio.com/docs/sendgrid/api-reference/webhooks/create-an-event-webhook
46
+ - id: SG3
47
+ verified: true
48
+ text: "`GET /v3/user/webhooks/event/settings/all` answers `{ max_allowed, webhooks: [...] }` with every webhook's settings and `id`."
49
+ source: https://www.twilio.com/docs/sendgrid/api-reference/webhooks/get-all-event-webhooks
50
+ - id: SG4
51
+ verified: true
52
+ text: "`PATCH /v3/user/webhooks/event/settings/{id}` requires `url` and updates the fields sent; `DELETE` on the same path answers 204, and 404 for an unknown id. Without an id these paths act on the oldest webhook, which the recipe never does (its paths always carry the id)."
53
+ source: https://www.twilio.com/docs/sendgrid/api-reference/webhooks/update-an-event-webhook
54
+ - id: SG5
55
+ verified: true
56
+ text: "Signature verification and its public key are set through a separate endpoint and are not part of the webhook's create or update; this recipe does not manage them."
57
+ source: https://www.twilio.com/docs/sendgrid/api-reference/webhooks/create-an-event-webhook
58
+ - id: SG6
59
+ verified: true
60
+ text: "`POST /v3/user/webhooks/parse/settings` creates an Inbound Parse setting from `url`, `hostname`, `spam_check` and `send_raw`, answering 201 with those four fields bare; `GET`, `PATCH` and `DELETE` (204) `/v3/user/webhooks/parse/settings/{hostname}` read, update and remove it. The hostname must be on a domain authenticated in SendGrid, with an MX record pointing at SendGrid."
61
+ source: https://www.twilio.com/docs/sendgrid/api-reference/settings-inbound-parse/create-a-parse-setting
62
+ - id: SG7
63
+ verified: false
64
+ text: "A PATCH that leaves out an event flag keeps its current value (the documentation's examples send only `url`); the recipe sends every flag it compares anyway."
65
+ - id: SG8
66
+ verified: false
67
+ text: "A parse setting for a hostname that exists already is refused with an error status (not documented which); the next run then finds it by its hostname."
68
+ ops:
69
+ event_webhook:
70
+ kind: resource
71
+ title: Event Webhook
72
+ summary: An Event Webhook delivering an environment's email events to its URL, such as the preview's `/api/sendgrid/events` handler. Located by its URL (unique in SendGrid); a console edit of its enabled flag, an event flag or its friendly name is drift.
73
+ covers: [sendgrid-webhook]
74
+ params:
75
+ url:
76
+ type: string
77
+ required: true
78
+ pattern: "^https?://\\S+$"
79
+ description: The URL events are posted to; its identity (SG2).
80
+ example: "https://${ctx.scope}.preview.example.com/api/sendgrid/events"
81
+ enabled:
82
+ type: boolean
83
+ default: true
84
+ description: Whether events are posted.
85
+ friendly_name:
86
+ type: string
87
+ description: A label for the webhook (not unique).
88
+ example: "sponson ${ctx.env} ${ctx.scope}"
89
+ processed: { type: boolean, default: false, description: Post `processed` events. }
90
+ delivered: { type: boolean, default: true, description: Post `delivered` events. }
91
+ dropped: { type: boolean, default: true, description: Post `dropped` events. }
92
+ deferred: { type: boolean, default: false, description: Post `deferred` events. }
93
+ bounce: { type: boolean, default: true, description: Post `bounce` events. }
94
+ open: { type: boolean, default: false, description: Post `open` events. }
95
+ click: { type: boolean, default: false, description: Post `click` events. }
96
+ spam_report: { type: boolean, default: true, description: Post `spam_report` events. }
97
+ unsubscribe: { type: boolean, default: false, description: Post `unsubscribe` events. }
98
+ group_unsubscribe: { type: boolean, default: false, description: Post `group_unsubscribe` events. }
99
+ group_resubscribe: { type: boolean, default: false, description: Post `group_resubscribe` events. }
100
+ http:
101
+ find:
102
+ path: /v3/user/webhooks/event/settings/all
103
+ list_path: /webhooks
104
+ match: { url: { param: url } }
105
+ create: { path: /v3/user/webhooks/event/settings }
106
+ update:
107
+ method: PATCH
108
+ path: "/v3/user/webhooks/event/settings/{id}"
109
+ body: { url: { param: url } }
110
+ delete: { path: "/v3/user/webhooks/event/settings/{id}" }
111
+ fields:
112
+ enabled: { param: enabled }
113
+ friendly_name: { param: friendly_name }
114
+ processed: { param: processed }
115
+ delivered: { param: delivered }
116
+ dropped: { param: dropped }
117
+ deferred: { param: deferred }
118
+ bounce: { param: bounce }
119
+ open: { param: open }
120
+ click: { param: click }
121
+ spam_report: { param: spam_report }
122
+ unsubscribe: { param: unsubscribe }
123
+ group_unsubscribe: { param: group_unsubscribe }
124
+ group_resubscribe: { param: group_resubscribe }
125
+ parse_setting:
126
+ kind: resource
127
+ title: Inbound Parse setting
128
+ summary: An Inbound Parse host per environment, such as `pr-42.parse.example.com`, posting the mail it receives to the environment's URL. Named by its hostname; a console edit of its URL, spam check or raw flag is drift. The hostname's domain must be authenticated in SendGrid and its MX record point at SendGrid (a wildcard record serves every environment).
129
+ covers: [sendgrid-webhook]
130
+ params:
131
+ hostname:
132
+ type: string
133
+ required: true
134
+ pattern: "^[a-z0-9.-]+$"
135
+ description: The host mail is received for, lower-case; its identity.
136
+ example: "${ctx.scope}.parse.example.com"
137
+ url:
138
+ type: string
139
+ required: true
140
+ pattern: "^https?://\\S+$"
141
+ description: The URL parsed mail is posted to.
142
+ example: "https://${ctx.scope}.preview.example.com/api/sendgrid/inbound"
143
+ spam_check:
144
+ type: boolean
145
+ default: false
146
+ description: Check mail for spam before posting it.
147
+ send_raw:
148
+ type: boolean
149
+ default: false
150
+ description: Post the original MIME message.
151
+ http:
152
+ read: { path: "/v3/user/webhooks/parse/settings/{hostname}" }
153
+ create:
154
+ path: /v3/user/webhooks/parse/settings
155
+ body: { hostname: { param: hostname } }
156
+ update: { method: PATCH }
157
+ id_path: /hostname
158
+ fields:
159
+ url: { param: url }
160
+ spam_check: { param: spam_check }
161
+ send_raw: { param: send_raw }
162
+ sim:
163
+ id_from: hostname
164
+ live:
165
+ params: { hostname: SPONSON_LIVE_SENDGRID_PARSE_HOSTNAME }
@@ -0,0 +1,158 @@
1
+ # yaml-language-server: $schema=../../../schema/recipe.schema.json
2
+ # Sentry Web API recipes. Format and checklist: docs/adr/0020-recipes.md, CONTRIBUTING.md "Adding a recipe".
3
+ provider: sentry
4
+ title: Sentry
5
+ category: observability
6
+ verified_on: "2026-10-11"
7
+ docs:
8
+ - title: Create a New Release for an Organization
9
+ url: https://docs.sentry.io/api/releases/create-a-new-release-for-an-organization/
10
+ - title: Retrieve an Organization's Release
11
+ url: https://docs.sentry.io/api/releases/retrieve-an-organizations-release/
12
+ - title: Update an Organization's Release
13
+ url: https://docs.sentry.io/api/releases/update-an-organizations-release/
14
+ - title: Delete an Organization's Release
15
+ url: https://docs.sentry.io/api/releases/delete-an-organizations-release/
16
+ - title: Create a Deploy
17
+ url: https://docs.sentry.io/api/releases/create-a-deploy/
18
+ - title: List a Release's Deploys
19
+ url: https://docs.sentry.io/api/releases/list-a-releases-deploys/
20
+ - title: Release Management (sentry-cli)
21
+ url: https://docs.sentry.io/cli/releases/
22
+ api:
23
+ base_url: https://sentry.io/api/0
24
+ base_url_env: SENTRY_API_URL
25
+ auth: { bearer_env: SENTRY_AUTH_TOKEN }
26
+ detect:
27
+ deps: ["@sentry/"]
28
+ env: ["SENTRY_*"]
29
+ files: [sentry.client.config.ts, sentry.client.config.js, sentry.server.config.ts, sentry.server.config.js, sentry.properties, .sentryclirc]
30
+ starter:
31
+ - op: release
32
+ values: { version: "app@${ctx.git.sha}" }
33
+ where:
34
+ organization: "Sentry → Settings → Organization Settings → Organization Slug"
35
+ project: "Sentry → Settings → Projects: the project's slug"
36
+ assumptions:
37
+ - id: SE1
38
+ verified: true
39
+ text: "`POST /api/0/organizations/{organization_id_or_slug}/releases/` creates a release from `version` and `projects` (both required), `ref`, `url`, `dateReleased` and commit data, with a bearer token holding `project:releases`, `project:write`, `project:admin` or `org:ci`; it answers 201 (or 208)."
40
+ source: https://docs.sentry.io/api/releases/create-a-new-release-for-an-organization/
41
+ - id: SE2
42
+ verified: true
43
+ text: "A version is one release across the organization's projects, and `GET /api/0/organizations/{org}/releases/{version}/` answers it (404 when there is none), so the version names the release."
44
+ source: https://docs.sentry.io/api/releases/retrieve-an-organizations-release/
45
+ - id: SE3
46
+ verified: true
47
+ text: "`PUT /api/0/organizations/{org}/releases/{version}/` updates `ref`, `url`, `dateReleased` and commit data (the documentation says an omitted `dateReleased` is the current time), and answers the release."
48
+ source: https://docs.sentry.io/api/releases/update-an-organizations-release/
49
+ - id: SE4
50
+ verified: true
51
+ text: "`DELETE /api/0/organizations/{org}/releases/{version}/` permanently removes a release and its files (`project:releases` or `project:admin`). The recipe keeps releases on destroy: one version is shared by every environment it is deployed to."
52
+ source: https://docs.sentry.io/api/releases/delete-an-organizations-release/
53
+ - id: SE5
54
+ verified: true
55
+ text: "`POST /api/0/organizations/{org}/releases/{version}/deploys/` records a deploy of the release from `environment` (required), `name`, `url`, `dateStarted`, `dateFinished` (default now) and `projects` (default: all of the release's)."
56
+ source: https://docs.sentry.io/api/releases/create-a-deploy/
57
+ - id: SE6
58
+ verified: true
59
+ text: "`GET /api/0/organizations/{org}/releases/{version}/deploys/` lists the release's deploys; deploys cannot be deleted, so the deploy op never deletes (`destroy: never`)."
60
+ source: https://docs.sentry.io/cli/releases/
61
+ - id: SE7
62
+ verified: true
63
+ text: "The release's `dateReleased` defaults to the current time on create, so a release this recipe creates is finalized at once."
64
+ source: https://docs.sentry.io/api/releases/create-a-new-release-for-an-organization/
65
+ - id: SE8
66
+ verified: false
67
+ text: "A create for a version that exists answers 208 with the existing release (not an error), so a release another tool made (sentry-cli in the build) is taken over without a second write; the recipe keeps it on destroy either way."
68
+ - id: SE9
69
+ verified: false
70
+ text: "The deploy list answers a bare array of `{ id, environment, name, url, dateStarted, dateFinished }` with string ids, all of a release's deploys on the first page; `environment` and `name` together identify the deploy this recipe recorded."
71
+ - id: SE10
72
+ verified: false
73
+ text: "Release `url` is answered as sent (null when unset); organizations hosted in another region (`de.sentry.io`) or self-hosted Sentry set `base_url` in the provider block."
74
+ ops:
75
+ release:
76
+ kind: resource
77
+ title: Release
78
+ summary: "A release for the commit, such as `app@${ctx.git.sha}`, in the given projects, finalized when created (SE7). Named by its version; a console edit of its URL is drift. Kept on destroy (shared history: preview and production deploy the same version); `destroy: delete` on the line removes it."
79
+ covers: [sentry-release]
80
+ destroy: keep
81
+ params:
82
+ organization:
83
+ type: string
84
+ required: true
85
+ description: The organization's slug or id.
86
+ example: acme
87
+ version:
88
+ type: string
89
+ required: true
90
+ pattern: "^[^/\\s]+$"
91
+ description: The release's version (no slashes or whitespace), such as `app@<sha>`.
92
+ example: "app@${ctx.git.sha}"
93
+ project:
94
+ type: string
95
+ required: true
96
+ description: The slug of the project the release belongs to (a release of several projects is a hand-written `http` line).
97
+ example: web
98
+ url:
99
+ type: string
100
+ description: A link for the release (its commit or build).
101
+ example: "https://github.com/acme/app/commit/${ctx.git.sha}"
102
+ ref:
103
+ type: string
104
+ description: A commit reference, sent on create.
105
+ http:
106
+ read: { path: "/organizations/{organization}/releases/{version}/" }
107
+ create:
108
+ path: "/organizations/{organization}/releases/"
109
+ body: { version: { param: version }, projects: [{ param: project }], ref: { param: ref } }
110
+ update: { method: PUT }
111
+ id_path: /version
112
+ fields:
113
+ url: { param: url }
114
+ sim:
115
+ id_from: version
116
+ live:
117
+ params: { organization: SPONSON_LIVE_SENTRY_ORG, project: SPONSON_LIVE_SENTRY_PROJECT }
118
+ deploy:
119
+ kind: resource
120
+ title: Deploy of a release to an environment
121
+ summary: "The record that a release was deployed to an environment (`preview`, named for the scope), which Sentry shows on the release and uses for deploy notifications. Located by environment and name among the release's deploys. Sentry has no way to change or delete a deploy, so nothing is compared for drift and destroy leaves it (`destroy: never`)."
122
+ covers: [sentry-release]
123
+ destroy: never
124
+ params:
125
+ organization:
126
+ type: string
127
+ required: true
128
+ description: The organization's slug or id.
129
+ example: acme
130
+ version:
131
+ type: string
132
+ required: true
133
+ pattern: "^[^/\\s]+$"
134
+ description: "The deployed release's version; the release must exist (`{ from: <release line>.id }` orders the lines)."
135
+ example: "app@${ctx.git.sha}"
136
+ environment:
137
+ type: string
138
+ required: true
139
+ description: The environment deployed to.
140
+ example: "${ctx.env}"
141
+ name:
142
+ type: string
143
+ required: true
144
+ description: The deploy's name, which with the environment identifies it among the release's deploys.
145
+ example: "sponson-${ctx.scope}"
146
+ url:
147
+ type: string
148
+ description: A link to the deployment (the preview URL), sent on create.
149
+ http:
150
+ find:
151
+ path: "/organizations/{organization}/releases/{version}/deploys/"
152
+ match: { environment: { param: environment }, name: { param: name } }
153
+ create:
154
+ path: "/organizations/{organization}/releases/{version}/deploys/"
155
+ body: { url: { param: url } }
156
+ delete: { path: "/organizations/{organization}/releases/{version}/deploys/{id}/" }
157
+ live:
158
+ params: { organization: SPONSON_LIVE_SENTRY_ORG, version: SPONSON_LIVE_SENTRY_VERSION }
@@ -0,0 +1,121 @@
1
+ # yaml-language-server: $schema=../../../schema/recipe.schema.json
2
+ # Split (Harness FME) Admin API recipes. Format and checklist: docs/adr/0020-recipes.md, CONTRIBUTING.md "Adding a recipe".
3
+ provider: split
4
+ title: Split (Harness FME)
5
+ category: flags
6
+ verified_on: "2026-10-11"
7
+ docs:
8
+ - title: Authentication
9
+ url: https://docs.split.io/reference/authentication
10
+ - title: Get feature flag definition in environment
11
+ url: https://docs.split.io/reference/get-feature-flag-definition-in-environment
12
+ - title: Full update feature flag definition in environment
13
+ url: https://docs.split.io/reference/full-update-feature-flag-definition-in-environment
14
+ - title: Feature flag definition, rule, condition, matcher
15
+ url: https://docs.split.io/reference/feature-flag-definition
16
+ - title: Matcher types
17
+ url: https://docs.split.io/reference/matcher-type
18
+ - title: API for Split admins after the move to Harness
19
+ url: https://developer.harness.io/docs/feature-management-experimentation/split-to-harness/api-for-split-admins/
20
+ api:
21
+ base_url: https://api.split.io/internal/api/v2
22
+ base_url_env: SPLIT_API_URL
23
+ auth: { bearer_env: SPLIT_ADMIN_API_KEY }
24
+ detect:
25
+ deps: ["@splitsoftware/"]
26
+ env: ["SPLIT_*"]
27
+ starter:
28
+ - op: targeting_rule
29
+ values: { match: "${ctx.scope}" }
30
+ where:
31
+ workspace_id: "Split → Admin settings → Projects: the project's id"
32
+ assumptions:
33
+ - id: SP1
34
+ verified: true
35
+ text: "The Admin API is at `https://api.split.io/internal/api/v2`, authenticated as `Authorization: Bearer` with a Split Admin API key (or a Harness PAT/SAT, accepted as Bearer on the non-deprecated endpoints). Host and paths are unchanged by the move to Harness; the workspace id is still Split's `wsId`."
36
+ source: https://developer.harness.io/docs/feature-management-experimentation/split-to-harness/api-for-split-admins/
37
+ - id: SP2
38
+ verified: true
39
+ text: "`GET /splits/ws/{wsId}/{featureFlagName}/environments/{environmentIdOrName}` answers the flag's definition in the environment bare: `treatments`, `defaultTreatment`, `baselineTreatment`, `trafficAllocation`, `rules`, `defaultRule` and read-only fields (`name`, `environment`, `trafficType`, times)."
40
+ source: https://docs.split.io/reference/get-feature-flag-definition-in-environment
41
+ - id: SP3
42
+ verified: true
43
+ text: "`PUT` on the same path replaces the definition with `treatments`, `defaultTreatment`, `baselineTreatment`, `trafficAllocation`, `rules` and `defaultRule` (the first three of the required fields). Those are sent as read, with the rule list changed (`parent.send`); whether PUT takes the read-only fields back is not documented, so they are not sent."
44
+ source: https://docs.split.io/reference/full-update-feature-flag-definition-in-environment
45
+ - id: SP4
46
+ verified: true
47
+ text: "A rule is `{ condition: { combiner: AND, matchers: [...] }, buckets: [{ treatment, size }] }` (bucket sizes sum to 100); rules have no id and are evaluated in order. `IN_LIST_STRING` with `attribute` and `strings` matches an attribute in a list."
48
+ source: https://docs.split.io/reference/matcher-type
49
+ - id: SP5
50
+ verified: false
51
+ text: "A rule is read back with its matcher exactly as written (no added `negate: false` or null members); otherwise every plan shows the rule as changed."
52
+ - id: SP6
53
+ verified: false
54
+ text: "A full update leaves the flag's killed state alone (`killed` is not a documented PUT field)."
55
+ - id: SP7
56
+ verified: true
57
+ text: "In a project that requires a title and comment on changes, they are query parameters of the update; this recipe does not send them, so such a project refuses the write and the apply fails."
58
+ source: https://developer.harness.io/docs/feature-management-experimentation/api/feature-flags/
59
+ ops:
60
+ targeting_rule:
61
+ kind: list_item
62
+ title: Feature flag targeting rule
63
+ summary: "A targeting rule on a feature flag's definition in one environment that serves a treatment to the preview, such as `if preview is in list [pr-42] serve on`. Added after the flag's other rules (evaluated in order: an earlier matching rule wins); the treatments, default rule and traffic allocation are written back as read. Identified by the matched value; a console edit of its matcher or treatment is drift. Destroy removes the rule."
64
+ covers: [split-rule]
65
+ params:
66
+ workspace_id:
67
+ type: string
68
+ required: true
69
+ description: The workspace (project) id, Split's `wsId`.
70
+ example: a3b6f5d0-0e8f-11ee-9b0f-0242ac120002
71
+ flag:
72
+ type: string
73
+ required: true
74
+ description: The feature flag's name.
75
+ example: new_checkout
76
+ environment:
77
+ type: string
78
+ required: true
79
+ description: The environment's id or name; the flag must have a definition there.
80
+ example: Staging
81
+ attribute:
82
+ type: string
83
+ required: true
84
+ description: The attribute the rule tests (passed with the evaluation).
85
+ example: preview
86
+ match:
87
+ type: string
88
+ required: true
89
+ description: The attribute value that is the preview; it identifies the rule.
90
+ example: "${ctx.scope}"
91
+ treatment:
92
+ type: string
93
+ required: true
94
+ description: The treatment served to the preview; one of the flag's treatments.
95
+ example: "on"
96
+ http:
97
+ parent:
98
+ path: "/splits/ws/{workspace_id}/{flag}/environments/{environment}"
99
+ method: PUT
100
+ send: [treatments, defaultTreatment, baselineTreatment, trafficAllocation, defaultRule]
101
+ list_path: /rules
102
+ key_field: /condition/matchers/0/strings/0
103
+ item:
104
+ condition:
105
+ combiner: AND
106
+ matchers:
107
+ - type: IN_LIST_STRING
108
+ attribute: { param: attribute }
109
+ strings: [{ param: match }]
110
+ buckets: [{ treatment: { param: treatment }, size: 100 }]
111
+ sim:
112
+ objects:
113
+ "/splits/ws/{workspace_id}/{flag}/environments/{environment}":
114
+ treatments: [{ name: "on" }, { name: "off" }]
115
+ defaultTreatment: "off"
116
+ baselineTreatment: "off"
117
+ trafficAllocation: 100
118
+ rules: []
119
+ defaultRule: [{ treatment: "off", size: 100 }]
120
+ live:
121
+ params: { workspace_id: SPONSON_LIVE_SPLIT_WORKSPACE_ID, flag: SPONSON_LIVE_SPLIT_FLAG, environment: SPONSON_LIVE_SPLIT_ENVIRONMENT }
@@ -0,0 +1,124 @@
1
+ # yaml-language-server: $schema=../../../schema/recipe.schema.json
2
+ # Statsig Console API recipes. Format and checklist: docs/adr/0020-recipes.md, CONTRIBUTING.md "Adding a recipe".
3
+ provider: statsig
4
+ title: Statsig
5
+ category: flags
6
+ verified_on: "2026-10-11"
7
+ docs:
8
+ - title: Console API introduction (base URL, STATSIG-API-KEY, STATSIG-API-VERSION)
9
+ url: https://docs.statsig.com/console-api/introduction
10
+ - title: Add gate rule
11
+ url: https://docs.statsig.com/api-reference/gates/add-gate-rule
12
+ - title: Read gate rules
13
+ url: https://docs.statsig.com/api-reference/gates/read-gate-rules
14
+ - title: Update gate rules (one rule)
15
+ url: https://docs.statsig.com/api-reference/gates/update-gate-rules
16
+ - title: Delete gate rule
17
+ url: https://docs.statsig.com/api-reference/gates/delete-gate-rule
18
+ - title: Console API OpenAPI spec (20240601)
19
+ url: https://api.statsig.com/openapi/20240601.json
20
+ api:
21
+ base_url: https://statsigapi.net/console/v1
22
+ base_url_env: STATSIG_API_URL
23
+ auth: { header: STATSIG-API-KEY, value_env: STATSIG_CONSOLE_API_KEY }
24
+ headers: { STATSIG-API-VERSION: "20240601" }
25
+ detect:
26
+ deps: [statsig-js, statsig-node, statsig-react, "@statsig/"]
27
+ env: ["STATSIG_*"]
28
+ starter:
29
+ - op: gate_rule
30
+ values: { name: "preview ${ctx.scope}", values: ["${ctx.scope}"] }
31
+ where:
32
+ gate_id: "Statsig console → Feature Gates → your gate: its name in the URL"
33
+ assumptions:
34
+ - id: SG1
35
+ verified: true
36
+ text: "The Console API is at `https://statsigapi.net/console/v1`, authenticated with a Console API key in the `STATSIG-API-KEY` header; `STATSIG-API-VERSION: 20240601` (the only version) is optional today and announced as required later, so it is always sent."
37
+ source: https://docs.statsig.com/console-api/introduction
38
+ - id: SG2
39
+ verified: true
40
+ text: "`POST /gates/{id}/rule` (singular) adds one rule (`name`, `passPercentage`, `conditions`, `environments`) and answers `{ message, data: <the whole gate> }`, not the rule: the new rule is located by name afterwards (`create.locate`)."
41
+ source: https://docs.statsig.com/api-reference/gates/add-gate-rule
42
+ - id: SG3
43
+ verified: false
44
+ text: "`GET /gates/{id}/rules` answers the rules under `data.rules` (the documented example); the spec's schema says `data` is a list of `{ rules }` objects instead. If the API follows the schema, every read fails with PROVIDER_RESPONSE naming `find.list_path` (it does not create duplicates). The rules of one gate fit on the first page."
45
+ source: https://docs.statsig.com/api-reference/gates/read-gate-rules
46
+ - id: SG4
47
+ verified: true
48
+ text: "`PATCH /gates/{id}/rules/{ruleID}` updates the given fields of one rule; `DELETE` on the same path removes it. Rules carry a server-assigned `id`."
49
+ source: https://docs.statsig.com/api-reference/gates/update-gate-rules
50
+ - id: SG5
51
+ verified: false
52
+ text: "Rule names are unique within a gate (not documented): the rule is identified by its name, and two rules with that name are PARAM_INVALID rather than a guess."
53
+ - id: SG6
54
+ verified: false
55
+ text: "A rule is read back with `conditions` exactly as written (`type`, `operator`, `targetValue`, and `field` when sent). If Statsig adds keys such as `field: null` to a condition, every plan shows the rule as changed."
56
+ - id: SG7
57
+ verified: false
58
+ text: "DELETE of a rule that is already gone answers 404 (the spec lists only 200); any other answer fails the destroy rather than passing silently."
59
+ - id: SG8
60
+ verified: false
61
+ text: "On a gate that requires reviews, what a Console API rule write does (apply, fail, or open a pending review) is not documented; a write that does not take effect is seen on the next read as missing or changed, never as done."
62
+ source: https://docs.statsig.com/guides/setting-up-reviews
63
+ ops:
64
+ gate_rule:
65
+ kind: resource
66
+ title: Feature gate rule
67
+ summary: "A rule on an existing feature gate that passes the preview, such as `custom_field preview any [pr-42]`. Located by its name in the gate's rules; a console edit of its pass percentage, conditions or environments is drift. Destroy deletes the rule."
68
+ covers: [statsig-gate-rule]
69
+ params:
70
+ gate_id:
71
+ type: string
72
+ required: true
73
+ description: The gate's id (its name in the console URL).
74
+ example: new_checkout
75
+ name:
76
+ type: string
77
+ required: true
78
+ description: The rule's name, unique within the gate; it identifies the rule.
79
+ example: "preview ${ctx.scope}"
80
+ condition_type:
81
+ type: string
82
+ default: custom_field
83
+ enum: [custom_field, url, environment_tier, user_id, email]
84
+ description: "The condition's type: `custom_field` (with `field`), `url`, `environment_tier`, `user_id` or `email`."
85
+ field:
86
+ type: string
87
+ description: The custom field's name, for `condition_type` `custom_field`.
88
+ example: preview
89
+ operator:
90
+ type: string
91
+ default: any
92
+ description: "The condition's operator: `any`, `none`, `str_contains_any`, … (see the Statsig rule docs)."
93
+ values:
94
+ type: list
95
+ required: true
96
+ description: The values the condition matches (its `targetValue`).
97
+ example: ["${ctx.scope}"]
98
+ pass_percentage:
99
+ type: number
100
+ default: 100
101
+ description: The share of matching users that pass (0–100).
102
+ environment_names:
103
+ type: list
104
+ description: The environments the rule applies in (for example `[development, staging]`); all when left out.
105
+ http:
106
+ find:
107
+ path: "/gates/{gate_id}/rules"
108
+ list_path: /data/rules
109
+ match: { name: { param: name } }
110
+ create: { path: "/gates/{gate_id}/rule", locate: true }
111
+ update: { method: PATCH, path: "/gates/{gate_id}/rules/{id}" }
112
+ delete: { path: "/gates/{gate_id}/rules/{id}" }
113
+ fields:
114
+ passPercentage: { param: pass_percentage }
115
+ conditions:
116
+ - type: { param: condition_type }
117
+ field: { param: field }
118
+ operator: { param: operator }
119
+ targetValue: { param: values }
120
+ environments: { param: environment_names }
121
+ sim:
122
+ collection: "/gates/{gate_id}/rules"
123
+ live:
124
+ params: { gate_id: SPONSON_LIVE_STATSIG_GATE_ID }