@epilot/sdk 2.7.0 → 2.8.0-rc.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 (254) hide show
  1. package/README.md +1 -0
  2. package/definitions/app.json +101 -8
  3. package/definitions/configuration-hub-runtime.json +1 -1
  4. package/definitions/configuration-hub.json +623 -0
  5. package/definitions/customer-portal-runtime.json +1 -1
  6. package/definitions/customer-portal.json +505 -6
  7. package/definitions/design-runtime.json +1 -1
  8. package/definitions/design.json +1 -11
  9. package/definitions/email-settings-runtime.json +1 -1
  10. package/definitions/email-settings.json +86 -4
  11. package/definitions/file-runtime.json +1 -1
  12. package/definitions/file.json +262 -4
  13. package/definitions/focus-pocus-runtime.json +1 -0
  14. package/definitions/focus-pocus.json +757 -0
  15. package/definitions/journey-runtime.json +1 -1
  16. package/definitions/journey.json +21 -1
  17. package/dist/README-37TXN4EL.cjs +7 -0
  18. package/dist/README-Z2WITBOR.js +7 -0
  19. package/dist/{_index-DB2VV4PQ.cjs → _index-HTUXYSTD.cjs} +4 -1
  20. package/dist/{_index-5FB6F5YY.js → _index-YTOJUFGD.js} +3 -0
  21. package/dist/apis/access-token.cjs +6 -6
  22. package/dist/apis/access-token.js +1 -1
  23. package/dist/apis/address-suggestions.cjs +6 -6
  24. package/dist/apis/address-suggestions.js +1 -1
  25. package/dist/apis/address.cjs +6 -6
  26. package/dist/apis/address.js +1 -1
  27. package/dist/apis/ai-agents.cjs +6 -6
  28. package/dist/apis/ai-agents.js +1 -1
  29. package/dist/apis/app.cjs +6 -6
  30. package/dist/apis/app.d.cts +2 -2
  31. package/dist/apis/app.d.ts +2 -2
  32. package/dist/apis/app.js +1 -1
  33. package/dist/apis/audit-logs.cjs +6 -6
  34. package/dist/apis/audit-logs.js +1 -1
  35. package/dist/apis/automation.cjs +6 -6
  36. package/dist/apis/automation.js +1 -1
  37. package/dist/apis/billing.cjs +6 -6
  38. package/dist/apis/billing.js +1 -1
  39. package/dist/apis/blueprint-manifest.cjs +6 -6
  40. package/dist/apis/blueprint-manifest.js +1 -1
  41. package/dist/apis/calendar.cjs +6 -6
  42. package/dist/apis/calendar.js +1 -1
  43. package/dist/apis/configuration-hub.cjs +8 -8
  44. package/dist/apis/configuration-hub.d.cts +2 -2
  45. package/dist/apis/configuration-hub.d.ts +2 -2
  46. package/dist/apis/configuration-hub.js +2 -2
  47. package/dist/apis/consent.cjs +6 -6
  48. package/dist/apis/consent.js +1 -1
  49. package/dist/apis/customer-portal.cjs +8 -8
  50. package/dist/apis/customer-portal.d.cts +2 -2
  51. package/dist/apis/customer-portal.d.ts +2 -2
  52. package/dist/apis/customer-portal.js +2 -2
  53. package/dist/apis/dashboard.cjs +6 -6
  54. package/dist/apis/dashboard.js +1 -1
  55. package/dist/apis/data-governance.cjs +6 -6
  56. package/dist/apis/data-governance.js +1 -1
  57. package/dist/apis/deduplication.cjs +6 -6
  58. package/dist/apis/deduplication.js +1 -1
  59. package/dist/apis/design.cjs +8 -8
  60. package/dist/apis/design.js +2 -2
  61. package/dist/apis/document.cjs +6 -6
  62. package/dist/apis/document.js +1 -1
  63. package/dist/apis/email-settings.cjs +8 -8
  64. package/dist/apis/email-settings.d.cts +2 -2
  65. package/dist/apis/email-settings.d.ts +2 -2
  66. package/dist/apis/email-settings.js +2 -2
  67. package/dist/apis/email-template.cjs +6 -6
  68. package/dist/apis/email-template.js +1 -1
  69. package/dist/apis/entity-mapping.cjs +6 -6
  70. package/dist/apis/entity-mapping.js +1 -1
  71. package/dist/apis/entity.cjs +6 -6
  72. package/dist/apis/entity.js +1 -1
  73. package/dist/apis/environments.cjs +6 -6
  74. package/dist/apis/environments.js +1 -1
  75. package/dist/apis/event-catalog.cjs +6 -6
  76. package/dist/apis/event-catalog.js +1 -1
  77. package/dist/apis/file.cjs +8 -8
  78. package/dist/apis/file.d.cts +2 -2
  79. package/dist/apis/file.d.ts +2 -2
  80. package/dist/apis/file.js +2 -2
  81. package/dist/apis/focus-pocus.cjs +38 -0
  82. package/dist/apis/focus-pocus.d.cts +18 -0
  83. package/dist/apis/focus-pocus.d.ts +18 -0
  84. package/dist/apis/focus-pocus.js +38 -0
  85. package/dist/apis/iban.cjs +6 -6
  86. package/dist/apis/iban.js +1 -1
  87. package/dist/apis/integration-toolkit.cjs +6 -6
  88. package/dist/apis/integration-toolkit.js +1 -1
  89. package/dist/apis/journey.cjs +8 -8
  90. package/dist/apis/journey.d.cts +2 -2
  91. package/dist/apis/journey.d.ts +2 -2
  92. package/dist/apis/journey.js +2 -2
  93. package/dist/apis/kanban.cjs +6 -6
  94. package/dist/apis/kanban.js +1 -1
  95. package/dist/apis/message.cjs +6 -6
  96. package/dist/apis/message.js +1 -1
  97. package/dist/apis/metering.cjs +6 -6
  98. package/dist/apis/metering.js +1 -1
  99. package/dist/apis/notes.cjs +6 -6
  100. package/dist/apis/notes.js +1 -1
  101. package/dist/apis/notification.cjs +6 -6
  102. package/dist/apis/notification.js +1 -1
  103. package/dist/apis/organization.cjs +6 -6
  104. package/dist/apis/organization.js +1 -1
  105. package/dist/apis/partner-directory.cjs +6 -6
  106. package/dist/apis/partner-directory.js +1 -1
  107. package/dist/apis/permissions.cjs +6 -6
  108. package/dist/apis/permissions.js +1 -1
  109. package/dist/apis/pricing-tier.cjs +6 -6
  110. package/dist/apis/pricing-tier.js +1 -1
  111. package/dist/apis/pricing.cjs +6 -6
  112. package/dist/apis/pricing.js +1 -1
  113. package/dist/apis/purpose.cjs +6 -6
  114. package/dist/apis/purpose.js +1 -1
  115. package/dist/apis/query.cjs +6 -6
  116. package/dist/apis/query.js +1 -1
  117. package/dist/apis/sandbox.cjs +6 -6
  118. package/dist/apis/sandbox.js +1 -1
  119. package/dist/apis/sharing.cjs +6 -6
  120. package/dist/apis/sharing.js +1 -1
  121. package/dist/apis/submission.cjs +6 -6
  122. package/dist/apis/submission.js +1 -1
  123. package/dist/apis/target.cjs +6 -6
  124. package/dist/apis/target.js +1 -1
  125. package/dist/apis/targeting.cjs +6 -6
  126. package/dist/apis/targeting.js +1 -1
  127. package/dist/apis/template-variables.cjs +6 -6
  128. package/dist/apis/template-variables.js +1 -1
  129. package/dist/apis/user.cjs +6 -6
  130. package/dist/apis/user.js +1 -1
  131. package/dist/apis/validation-rules.cjs +6 -6
  132. package/dist/apis/validation-rules.js +1 -1
  133. package/dist/apis/webhooks.cjs +6 -6
  134. package/dist/apis/webhooks.js +1 -1
  135. package/dist/apis/workflow-definition.cjs +6 -6
  136. package/dist/apis/workflow-definition.js +1 -1
  137. package/dist/apis/workflow.cjs +6 -6
  138. package/dist/apis/workflow.js +1 -1
  139. package/dist/{app-SSF545U7.cjs → app-74LECFMK.cjs} +1 -1
  140. package/dist/{app-34OBBTA4.js → app-GNUHCGPO.js} +1 -1
  141. package/dist/{app.d--5n0FQQ4.d.cts → app.d-BOR23dso.d.cts} +104 -4
  142. package/dist/{app.d--5n0FQQ4.d.ts → app.d-BOR23dso.d.ts} +104 -4
  143. package/dist/chunk-3APTSPY4.js +14 -0
  144. package/dist/{chunk-JB7LITSP.js → chunk-54KWFSCM.js} +35 -24
  145. package/dist/chunk-A6FYGWQ7.cjs +14 -0
  146. package/dist/{chunk-35CN2YFK.cjs → chunk-F5Z6I7TF.cjs} +35 -24
  147. package/dist/chunk-JOUTFBLN.js +14 -0
  148. package/dist/chunk-KCPVNRDL.js +14 -0
  149. package/dist/chunk-KJPOUJBU.cjs +14 -0
  150. package/dist/chunk-LAWKCWVU.cjs +14 -0
  151. package/dist/{chunk-ZSONBZIF.cjs → chunk-MOLFG5L4.cjs} +1 -1
  152. package/dist/chunk-OPXGJKZR.cjs +14 -0
  153. package/dist/chunk-P42Q6HOW.js +14 -0
  154. package/dist/chunk-P4NA7NWG.js +14 -0
  155. package/dist/chunk-PTEJYAYJ.js +14 -0
  156. package/dist/chunk-WHXYES2D.cjs +14 -0
  157. package/dist/{chunk-ONOGGR6Q.js → chunk-WW6DVKJR.js} +1 -1
  158. package/dist/chunk-YI5YGTAH.cjs +14 -0
  159. package/dist/configuration-hub-E7S4JB2T.js +7 -0
  160. package/dist/configuration-hub-Q5JBYB52.cjs +7 -0
  161. package/dist/{configuration-hub-runtime-L6IOERSP.js → configuration-hub-runtime-CXME7TCX.js} +1 -1
  162. package/dist/{configuration-hub-runtime-I5Y67CXD.cjs → configuration-hub-runtime-QVLJKEZD.cjs} +2 -2
  163. package/dist/configuration-hub.d-CbSJDa7k.d.cts +1096 -0
  164. package/dist/configuration-hub.d-CbSJDa7k.d.ts +1096 -0
  165. package/dist/customer-portal-DR6XFCTQ.js +7 -0
  166. package/dist/customer-portal-PNFBVIAH.cjs +7 -0
  167. package/dist/{customer-portal-runtime-OEXTSMSE.cjs → customer-portal-runtime-IYHJ3RME.cjs} +2 -2
  168. package/dist/{customer-portal-runtime-N4NWQ67M.js → customer-portal-runtime-ZYU3WIXY.js} +1 -1
  169. package/dist/{customer-portal.d-ChSEioI5.d.cts → customer-portal.d-CTTCBAZI.d.cts} +764 -14
  170. package/dist/{customer-portal.d-ChSEioI5.d.ts → customer-portal.d-CTTCBAZI.d.ts} +764 -14
  171. package/dist/data-governance-QYFHBCNB.cjs +7 -0
  172. package/dist/data-governance-YS2NA6W4.js +7 -0
  173. package/dist/design-EWZQZ5KX.js +7 -0
  174. package/dist/design-MUUYXB2J.cjs +7 -0
  175. package/dist/design-runtime-3RHYNHUV.cjs +5 -0
  176. package/dist/{design-runtime-QMJM4FAF.js → design-runtime-DLMA4EHQ.js} +1 -1
  177. package/dist/email-settings-YJ4X5VFU.cjs +7 -0
  178. package/dist/email-settings-YUK3DXFJ.js +7 -0
  179. package/dist/{email-settings-runtime-EGIJ2AVQ.js → email-settings-runtime-BXRZV4M5.js} +1 -1
  180. package/dist/{email-settings-runtime-WGVLI7N6.cjs → email-settings-runtime-FWJQBQBK.cjs} +2 -2
  181. package/dist/{email-settings.d-B7Q_xT25.d.cts → email-settings.d-UJ0C3jPI.d.cts} +108 -9
  182. package/dist/{email-settings.d-B7Q_xT25.d.ts → email-settings.d-UJ0C3jPI.d.ts} +108 -9
  183. package/dist/file-P2FUUER2.js +7 -0
  184. package/dist/file-XTY74SIX.cjs +7 -0
  185. package/dist/file-runtime-24S3QPA7.cjs +5 -0
  186. package/dist/{file-runtime-B6AAGZQF.js → file-runtime-BIRMXYRH.js} +1 -1
  187. package/dist/{file.d-DcTJxjp7.d.cts → file.d-DTlrbI40.d.cts} +2336 -19
  188. package/dist/{file.d-DcTJxjp7.d.ts → file.d-DTlrbI40.d.ts} +2336 -19
  189. package/dist/focus-pocus-JGXH42OF.cjs +7 -0
  190. package/dist/focus-pocus-XVDVUYL6.js +7 -0
  191. package/dist/focus-pocus-runtime-QXBBYVX7.js +5 -0
  192. package/dist/focus-pocus-runtime-X6GQ3WI4.cjs +5 -0
  193. package/dist/focus-pocus.d-BRFGe53G.d.cts +489 -0
  194. package/dist/focus-pocus.d-BRFGe53G.d.ts +489 -0
  195. package/dist/index.cjs +34 -26
  196. package/dist/index.d.cts +57 -55
  197. package/dist/index.d.ts +57 -55
  198. package/dist/index.js +23 -15
  199. package/dist/journey-4DIIPRU4.js +7 -0
  200. package/dist/journey-ATC3Y5AW.cjs +7 -0
  201. package/dist/{journey-runtime-SPBL3F32.cjs → journey-runtime-G2O5C3N2.cjs} +2 -2
  202. package/dist/{journey-runtime-YXIAOTMD.js → journey-runtime-RI2LJO5S.js} +1 -1
  203. package/dist/{journey.d-ClXO0xK8.d.cts → journey.d-BenIUWaO.d.cts} +9 -3
  204. package/dist/{journey.d-ClXO0xK8.d.ts → journey.d-BenIUWaO.d.ts} +9 -3
  205. package/dist/pricing-R5ENSVPQ.cjs +7 -0
  206. package/dist/pricing-X27CCRI6.js +7 -0
  207. package/dist/targeting-74BV7F7H.cjs +7 -0
  208. package/dist/targeting-W5EKJYR2.js +7 -0
  209. package/docs/app.md +34 -10
  210. package/docs/configuration-hub.md +660 -0
  211. package/docs/customer-portal.md +604 -176
  212. package/docs/data-governance.md +17 -17
  213. package/docs/design.md +1 -1
  214. package/docs/email-settings.md +67 -3
  215. package/docs/file.md +101 -2
  216. package/docs/focus-pocus.md +460 -0
  217. package/docs/journey.md +2 -0
  218. package/docs/pricing.md +1 -1
  219. package/docs/targeting.md +4 -4
  220. package/package.json +10 -1
  221. package/dist/README-46VYEGGW.js +0 -7
  222. package/dist/README-IVBISSWB.cjs +0 -7
  223. package/dist/chunk-4W22EIRF.cjs +0 -14
  224. package/dist/chunk-5OBMZHRL.cjs +0 -14
  225. package/dist/chunk-E2WMGOM5.js +0 -14
  226. package/dist/chunk-EFWPEVXI.js +0 -14
  227. package/dist/chunk-EIIIKDOJ.cjs +0 -14
  228. package/dist/chunk-KEI3GHDY.cjs +0 -14
  229. package/dist/chunk-KIWRGUKM.js +0 -14
  230. package/dist/chunk-MB6NKETA.cjs +0 -14
  231. package/dist/chunk-VSZEOCIE.js +0 -14
  232. package/dist/chunk-Z6HGUGXK.js +0 -14
  233. package/dist/configuration-hub-A3S6ND6R.cjs +0 -7
  234. package/dist/configuration-hub-PMAW44U5.js +0 -7
  235. package/dist/configuration-hub.d-Cqaq2F-W.d.cts +0 -478
  236. package/dist/configuration-hub.d-Cqaq2F-W.d.ts +0 -478
  237. package/dist/customer-portal-5I7ZGQDU.cjs +0 -7
  238. package/dist/customer-portal-YL2YMPZL.js +0 -7
  239. package/dist/data-governance-2U5UU4GM.cjs +0 -7
  240. package/dist/data-governance-36Y33JVG.js +0 -7
  241. package/dist/design-DROLIWS3.js +0 -7
  242. package/dist/design-XZKOZLTR.cjs +0 -7
  243. package/dist/design-runtime-OXEXKZVG.cjs +0 -5
  244. package/dist/email-settings-CKFJU4WZ.js +0 -7
  245. package/dist/email-settings-NQJJKS2P.cjs +0 -7
  246. package/dist/file-UOWBTDIU.cjs +0 -7
  247. package/dist/file-XSN3NAVZ.js +0 -7
  248. package/dist/file-runtime-SFZIKODF.cjs +0 -5
  249. package/dist/journey-KDR5EU3W.js +0 -7
  250. package/dist/journey-REBN4TGQ.cjs +0 -7
  251. package/dist/pricing-FODHQFCB.cjs +0 -7
  252. package/dist/pricing-XRIDVZFC.js +0 -7
  253. package/dist/targeting-EYGYZD6M.cjs +0 -7
  254. package/dist/targeting-GEJTJN5Z.js +0 -7
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
+
3
+ // src/docs/focus-pocus.json
4
+ var focus_pocus_default = '# Focus Pocus API\n\n- **Base URL:** `https://focus-pocus.dev.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/focus-pocus](https://docs.epilot.io/api/focus-pocus)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.focusPocus.getHealth(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/focus-pocus\'\n\nconst focusPocusClient = getClient()\nauthorize(focusPocusClient, () => \'<token>\')\nconst { data } = await focusPocusClient.getHealth(...)\n```\n\n## Operations\n\n**Health**\n- [`getHealth`](#gethealth)\n\n**Achievements**\n- [`listAchievements`](#listachievements)\n- [`getAchievement`](#getachievement)\n\n**Challenges**\n- [`getSuggestedChallenge`](#getsuggestedchallenge)\n- [`acceptChallenge`](#acceptchallenge)\n- [`dismissChallenge`](#dismisschallenge)\n- [`listActiveChallenges`](#listactivechallenges)\n\n**Events**\n- [`postEvent`](#postevent)\n\n**Schemas**\n- [`HealthResponse`](#healthresponse)\n- [`ErrorResponse`](#errorresponse)\n- [`ConflictError`](#conflicterror)\n- [`ChallengeSuggested`](#challengesuggested)\n- [`ChallengeActive`](#challengeactive)\n- [`ActiveChallengeListResponse`](#activechallengelistresponse)\n- [`AchievementFeedItem`](#achievementfeeditem)\n- [`AchievementFeedListResponse`](#achievementfeedlistresponse)\n- [`EventIngestRequest`](#eventingestrequest)\n- [`EventAccepted`](#eventaccepted)\n\n### `getHealth`\n\nLiveness probe for the Focus Pocus API. Requires a valid EpilotAuth token.\n\n`GET /v1/health`\n\n```ts\nconst { data } = await client.getHealth()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status": "ok",\n "stage": "dev",\n "service": "focus-pocus-api"\n}\n```\n\n</details>\n\n---\n\n### `listAchievements`\n\nUnified feed for the authenticated user: returns active challenges and completed\nv1 static achievement unlocks. The `userId` is read from the EpilotAuth claim \u2014\nno user path or query parameter is acce\n\n`GET /v1/achievements`\n\n```ts\nconst { data } = await client.listAchievements()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "string",\n "challenge_template_id": "string",\n "category": "string",\n "title": "string",\n "description": "string",\n "badge_image_url": "string",\n "icon": "string",\n "status": "active",\n "accepted_at": "1970-01-01T00:00:00.000Z",\n "deadline": "1970-01-01T00:00:00.000Z",\n "time_remaining_ms": 0,\n "unlocked_at": "1970-01-01T00:00:00.000Z",\n "xp_awarded": 0,\n "just_unlocked": true\n }\n ],\n "total": 0\n}\n```\n\n</details>\n\n---\n\n### `getAchievement`\n\nSingle user-scoped achievement or active-challenge item. Returns 404 if the id\ndoes not belong to the authenticated user.\n\n`GET /v1/achievements/{id}`\n\n```ts\nconst { data } = await client.getAchievement({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "challenge_template_id": "string",\n "category": "string",\n "title": "string",\n "description": "string",\n "badge_image_url": "string",\n "icon": "string",\n "status": "active",\n "accepted_at": "1970-01-01T00:00:00.000Z",\n "deadline": "1970-01-01T00:00:00.000Z",\n "time_remaining_ms": 0,\n "unlocked_at": "1970-01-01T00:00:00.000Z",\n "xp_awarded": 0,\n "just_unlocked": true\n}\n```\n\n</details>\n\n---\n\n### `getSuggestedChallenge`\n\nReturns a suggested challenge for the authenticated user. The suggestion is\npersisted with a 7-day TTL. Calling again with the same `(user, category)`\nwithin 24h returns the existing suggestion withou\n\n`GET /v1/challenges/suggest`\n\n```ts\nconst { data } = await client.getSuggestedChallenge({\n route: \'example\',\n entity_type: \'example\',\n category_hint: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "challenge_template_id": "string",\n "category": "string",\n "title": "string",\n "description": "string",\n "badge_image_url": "string",\n "default_duration_hours": 1,\n "status": "suggested",\n "suggested_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `acceptChallenge`\n\nAccept a suggested challenge. Atomically transitions the challenge from\n`suggested` to `active` using a conditional DynamoDB UpdateItem. Returns 409 if\nthe challenge has already been transitioned or t\n\n`POST /v1/challenges/{id}/accept`\n\n```ts\nconst { data } = await client.acceptChallenge({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "challenge_template_id": "string",\n "category": "string",\n "title": "string",\n "description": "string",\n "badge_image_url": "string",\n "status": "active",\n "accepted_at": "1970-01-01T00:00:00.000Z",\n "deadline": "1970-01-01T00:00:00.000Z",\n "time_remaining_ms": 0\n}\n```\n\n</details>\n\n---\n\n### `dismissChallenge`\n\nDismiss a suggested challenge. Atomically transitions the challenge from\n`suggested` to `dismissed`. The challenge template is filtered from `/suggest`\nresponses for the next 24h. Returns 409 if the c\n\n`POST /v1/challenges/{id}/dismiss`\n\n```ts\nconst { data } = await client.dismissChallenge({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `listActiveChallenges`\n\nReturns all active challenges for the authenticated user. Challenges whose\ndeadline has passed are lazily expired (fire-and-forget UpdateItem) and\nexcluded from the response. The result set is bounded\n\n`GET /v1/challenges/active`\n\n```ts\nconst { data } = await client.listActiveChallenges()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "string",\n "challenge_template_id": "string",\n "category": "string",\n "title": "string",\n "description": "string",\n "badge_image_url": "string",\n "status": "active",\n "accepted_at": "1970-01-01T00:00:00.000Z",\n "deadline": "1970-01-01T00:00:00.000Z",\n "time_remaining_ms": 0\n }\n ],\n "total": 0\n}\n```\n\n</details>\n\n---\n\n### `postEvent`\n\nPersist-first event ingest. Accepts an activity event, writes it to the event log\nidempotently (keyed by `event_id`), and returns 202. Achievement evaluation happens\nasynchronously \u2014 no unlocks are re\n\n`POST /v1/events`\n\n```ts\nconst { data } = await client.postEvent(\n null,\n {\n event_id: \'string\',\n event_type: \'string\',\n actor_user_id: \'string\',\n occurred_at: \'1970-01-01T00:00:00.000Z\',\n properties: {}\n },\n)\n```\n\n---\n\n## Schemas\n\n### `HealthResponse`\n\n```ts\ntype HealthResponse = {\n status: "ok"\n stage: string\n service: string\n}\n```\n\n### `ErrorResponse`\n\n```ts\ntype ErrorResponse = {\n status: number\n error: string\n}\n```\n\n### `ConflictError`\n\n```ts\ntype ConflictError = {\n status: 409\n error: string\n reason: "already_transitioned" | "too_many_active" | "deadline_passed"\n}\n```\n\n### `ChallengeSuggested`\n\n```ts\ntype ChallengeSuggested = {\n id: string\n challenge_template_id: string\n category: string\n title: string\n description: string\n badge_image_url: string\n default_duration_hours: number\n status: "suggested"\n suggested_at: string // date-time\n}\n```\n\n### `ChallengeActive`\n\n```ts\ntype ChallengeActive = {\n id: string\n challenge_template_id: string\n category: string\n title: string\n description: string\n badge_image_url: string\n status: "active"\n accepted_at: string // date-time\n deadline: string // date-time\n time_remaining_ms: number\n}\n```\n\n### `ActiveChallengeListResponse`\n\n```ts\ntype ActiveChallengeListResponse = {\n results: Array<{\n id: string\n challenge_template_id: string\n category: string\n title: string\n description: string\n badge_image_url: string\n status: "active"\n accepted_at: string // date-time\n deadline: string // date-time\n time_remaining_ms: number\n }>\n total: number\n}\n```\n\n### `AchievementFeedItem`\n\n```ts\ntype AchievementFeedItem = {\n id: string\n challenge_template_id?: string\n category: string\n title: string\n description: string\n badge_image_url?: string\n icon?: string\n status: "active" | "completed" | "expired"\n accepted_at?: string // date-time\n deadline?: string // date-time\n time_remaining_ms?: number\n unlocked_at?: string // date-time\n xp_awarded?: number\n just_unlocked: boolean\n}\n```\n\n### `AchievementFeedListResponse`\n\n```ts\ntype AchievementFeedListResponse = {\n results: Array<{\n id: string\n challenge_template_id?: string\n category: string\n title: string\n description: string\n badge_image_url?: string\n icon?: string\n status: "active" | "completed" | "expired"\n accepted_at?: string // date-time\n deadline?: string // date-time\n time_remaining_ms?: number\n unlocked_at?: string // date-time\n xp_awarded?: number\n just_unlocked: boolean\n }>\n total: number\n}\n```\n\n### `EventIngestRequest`\n\n```ts\ntype EventIngestRequest = {\n event_id: string\n event_type: string\n actor_user_id: string\n occurred_at: string // date-time\n properties?: Record<string, unknown>\n}\n```\n\n### `EventAccepted`\n\n```ts\ntype EventAccepted = {\n accepted: true\n}\n```\n';
5
+
6
+
7
+ exports.default = focus_pocus_default;
@@ -0,0 +1,7 @@
1
+ import "./chunk-YPSWSI3M.js";
2
+
3
+ // src/docs/focus-pocus.json
4
+ var focus_pocus_default = '# Focus Pocus API\n\n- **Base URL:** `https://focus-pocus.dev.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/focus-pocus](https://docs.epilot.io/api/focus-pocus)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.focusPocus.getHealth(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/focus-pocus\'\n\nconst focusPocusClient = getClient()\nauthorize(focusPocusClient, () => \'<token>\')\nconst { data } = await focusPocusClient.getHealth(...)\n```\n\n## Operations\n\n**Health**\n- [`getHealth`](#gethealth)\n\n**Achievements**\n- [`listAchievements`](#listachievements)\n- [`getAchievement`](#getachievement)\n\n**Challenges**\n- [`getSuggestedChallenge`](#getsuggestedchallenge)\n- [`acceptChallenge`](#acceptchallenge)\n- [`dismissChallenge`](#dismisschallenge)\n- [`listActiveChallenges`](#listactivechallenges)\n\n**Events**\n- [`postEvent`](#postevent)\n\n**Schemas**\n- [`HealthResponse`](#healthresponse)\n- [`ErrorResponse`](#errorresponse)\n- [`ConflictError`](#conflicterror)\n- [`ChallengeSuggested`](#challengesuggested)\n- [`ChallengeActive`](#challengeactive)\n- [`ActiveChallengeListResponse`](#activechallengelistresponse)\n- [`AchievementFeedItem`](#achievementfeeditem)\n- [`AchievementFeedListResponse`](#achievementfeedlistresponse)\n- [`EventIngestRequest`](#eventingestrequest)\n- [`EventAccepted`](#eventaccepted)\n\n### `getHealth`\n\nLiveness probe for the Focus Pocus API. Requires a valid EpilotAuth token.\n\n`GET /v1/health`\n\n```ts\nconst { data } = await client.getHealth()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status": "ok",\n "stage": "dev",\n "service": "focus-pocus-api"\n}\n```\n\n</details>\n\n---\n\n### `listAchievements`\n\nUnified feed for the authenticated user: returns active challenges and completed\nv1 static achievement unlocks. The `userId` is read from the EpilotAuth claim \u2014\nno user path or query parameter is acce\n\n`GET /v1/achievements`\n\n```ts\nconst { data } = await client.listAchievements()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "string",\n "challenge_template_id": "string",\n "category": "string",\n "title": "string",\n "description": "string",\n "badge_image_url": "string",\n "icon": "string",\n "status": "active",\n "accepted_at": "1970-01-01T00:00:00.000Z",\n "deadline": "1970-01-01T00:00:00.000Z",\n "time_remaining_ms": 0,\n "unlocked_at": "1970-01-01T00:00:00.000Z",\n "xp_awarded": 0,\n "just_unlocked": true\n }\n ],\n "total": 0\n}\n```\n\n</details>\n\n---\n\n### `getAchievement`\n\nSingle user-scoped achievement or active-challenge item. Returns 404 if the id\ndoes not belong to the authenticated user.\n\n`GET /v1/achievements/{id}`\n\n```ts\nconst { data } = await client.getAchievement({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "challenge_template_id": "string",\n "category": "string",\n "title": "string",\n "description": "string",\n "badge_image_url": "string",\n "icon": "string",\n "status": "active",\n "accepted_at": "1970-01-01T00:00:00.000Z",\n "deadline": "1970-01-01T00:00:00.000Z",\n "time_remaining_ms": 0,\n "unlocked_at": "1970-01-01T00:00:00.000Z",\n "xp_awarded": 0,\n "just_unlocked": true\n}\n```\n\n</details>\n\n---\n\n### `getSuggestedChallenge`\n\nReturns a suggested challenge for the authenticated user. The suggestion is\npersisted with a 7-day TTL. Calling again with the same `(user, category)`\nwithin 24h returns the existing suggestion withou\n\n`GET /v1/challenges/suggest`\n\n```ts\nconst { data } = await client.getSuggestedChallenge({\n route: \'example\',\n entity_type: \'example\',\n category_hint: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "challenge_template_id": "string",\n "category": "string",\n "title": "string",\n "description": "string",\n "badge_image_url": "string",\n "default_duration_hours": 1,\n "status": "suggested",\n "suggested_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `acceptChallenge`\n\nAccept a suggested challenge. Atomically transitions the challenge from\n`suggested` to `active` using a conditional DynamoDB UpdateItem. Returns 409 if\nthe challenge has already been transitioned or t\n\n`POST /v1/challenges/{id}/accept`\n\n```ts\nconst { data } = await client.acceptChallenge({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "challenge_template_id": "string",\n "category": "string",\n "title": "string",\n "description": "string",\n "badge_image_url": "string",\n "status": "active",\n "accepted_at": "1970-01-01T00:00:00.000Z",\n "deadline": "1970-01-01T00:00:00.000Z",\n "time_remaining_ms": 0\n}\n```\n\n</details>\n\n---\n\n### `dismissChallenge`\n\nDismiss a suggested challenge. Atomically transitions the challenge from\n`suggested` to `dismissed`. The challenge template is filtered from `/suggest`\nresponses for the next 24h. Returns 409 if the c\n\n`POST /v1/challenges/{id}/dismiss`\n\n```ts\nconst { data } = await client.dismissChallenge({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `listActiveChallenges`\n\nReturns all active challenges for the authenticated user. Challenges whose\ndeadline has passed are lazily expired (fire-and-forget UpdateItem) and\nexcluded from the response. The result set is bounded\n\n`GET /v1/challenges/active`\n\n```ts\nconst { data } = await client.listActiveChallenges()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "string",\n "challenge_template_id": "string",\n "category": "string",\n "title": "string",\n "description": "string",\n "badge_image_url": "string",\n "status": "active",\n "accepted_at": "1970-01-01T00:00:00.000Z",\n "deadline": "1970-01-01T00:00:00.000Z",\n "time_remaining_ms": 0\n }\n ],\n "total": 0\n}\n```\n\n</details>\n\n---\n\n### `postEvent`\n\nPersist-first event ingest. Accepts an activity event, writes it to the event log\nidempotently (keyed by `event_id`), and returns 202. Achievement evaluation happens\nasynchronously \u2014 no unlocks are re\n\n`POST /v1/events`\n\n```ts\nconst { data } = await client.postEvent(\n null,\n {\n event_id: \'string\',\n event_type: \'string\',\n actor_user_id: \'string\',\n occurred_at: \'1970-01-01T00:00:00.000Z\',\n properties: {}\n },\n)\n```\n\n---\n\n## Schemas\n\n### `HealthResponse`\n\n```ts\ntype HealthResponse = {\n status: "ok"\n stage: string\n service: string\n}\n```\n\n### `ErrorResponse`\n\n```ts\ntype ErrorResponse = {\n status: number\n error: string\n}\n```\n\n### `ConflictError`\n\n```ts\ntype ConflictError = {\n status: 409\n error: string\n reason: "already_transitioned" | "too_many_active" | "deadline_passed"\n}\n```\n\n### `ChallengeSuggested`\n\n```ts\ntype ChallengeSuggested = {\n id: string\n challenge_template_id: string\n category: string\n title: string\n description: string\n badge_image_url: string\n default_duration_hours: number\n status: "suggested"\n suggested_at: string // date-time\n}\n```\n\n### `ChallengeActive`\n\n```ts\ntype ChallengeActive = {\n id: string\n challenge_template_id: string\n category: string\n title: string\n description: string\n badge_image_url: string\n status: "active"\n accepted_at: string // date-time\n deadline: string // date-time\n time_remaining_ms: number\n}\n```\n\n### `ActiveChallengeListResponse`\n\n```ts\ntype ActiveChallengeListResponse = {\n results: Array<{\n id: string\n challenge_template_id: string\n category: string\n title: string\n description: string\n badge_image_url: string\n status: "active"\n accepted_at: string // date-time\n deadline: string // date-time\n time_remaining_ms: number\n }>\n total: number\n}\n```\n\n### `AchievementFeedItem`\n\n```ts\ntype AchievementFeedItem = {\n id: string\n challenge_template_id?: string\n category: string\n title: string\n description: string\n badge_image_url?: string\n icon?: string\n status: "active" | "completed" | "expired"\n accepted_at?: string // date-time\n deadline?: string // date-time\n time_remaining_ms?: number\n unlocked_at?: string // date-time\n xp_awarded?: number\n just_unlocked: boolean\n}\n```\n\n### `AchievementFeedListResponse`\n\n```ts\ntype AchievementFeedListResponse = {\n results: Array<{\n id: string\n challenge_template_id?: string\n category: string\n title: string\n description: string\n badge_image_url?: string\n icon?: string\n status: "active" | "completed" | "expired"\n accepted_at?: string // date-time\n deadline?: string // date-time\n time_remaining_ms?: number\n unlocked_at?: string // date-time\n xp_awarded?: number\n just_unlocked: boolean\n }>\n total: number\n}\n```\n\n### `EventIngestRequest`\n\n```ts\ntype EventIngestRequest = {\n event_id: string\n event_type: string\n actor_user_id: string\n occurred_at: string // date-time\n properties?: Record<string, unknown>\n}\n```\n\n### `EventAccepted`\n\n```ts\ntype EventAccepted = {\n accepted: true\n}\n```\n';
5
+ export {
6
+ focus_pocus_default as default
7
+ };
@@ -0,0 +1,5 @@
1
+ import {
2
+ require_focus_pocus_runtime
3
+ } from "./chunk-P42Q6HOW.js";
4
+ import "./chunk-YPSWSI3M.js";
5
+ export default require_focus_pocus_runtime();
@@ -0,0 +1,5 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkA6FYGWQ7cjs = require('./chunk-A6FYGWQ7.cjs');
4
+ require('./chunk-NJK5F5TF.cjs');
5
+ exports. default = _chunkA6FYGWQ7cjs.require_focus_pocus_runtime.call(void 0, );
@@ -0,0 +1,489 @@
1
+ import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, OperationResponse } from 'openapi-client-axios';
2
+
3
+ /* Auto-copied from focus-pocus-client */
4
+
5
+
6
+ declare namespace Components {
7
+ namespace Parameters {
8
+ export type AchievementId = string; // ^[a-z0-9][a-z0-9_-]{0,127}$
9
+ export type AchievementOrChallengeId = string;
10
+ export type ChallengeId = string;
11
+ export type Cursor = string;
12
+ export type Size = number;
13
+ }
14
+ export interface PathParameters {
15
+ AchievementId?: Parameters.AchievementId /* ^[a-z0-9][a-z0-9_-]{0,127}$ */;
16
+ AchievementOrChallengeId?: Parameters.AchievementOrChallengeId;
17
+ ChallengeId?: Parameters.ChallengeId;
18
+ }
19
+ export interface QueryParameters {
20
+ Cursor?: Parameters.Cursor;
21
+ Size?: Parameters.Size;
22
+ }
23
+ namespace Responses {
24
+ export type BadRequest = Schemas.ErrorResponse;
25
+ export type Conflict = Schemas.ConflictError;
26
+ export type NotFound = Schemas.ErrorResponse;
27
+ export type Unauthorized = Schemas.ErrorResponse;
28
+ }
29
+ namespace Schemas {
30
+ export interface AchievementFeedItem {
31
+ id: string;
32
+ /**
33
+ * Set for challenge-based items; null for v1 static catalog unlocks.
34
+ */
35
+ challenge_template_id?: string | null;
36
+ category: string;
37
+ title: string;
38
+ description: string;
39
+ badge_image_url?: string | null;
40
+ /**
41
+ * Kept for v1 catalog unlock compatibility.
42
+ */
43
+ icon?: string | null;
44
+ status: "active" | "completed" | "expired";
45
+ accepted_at?: string | null; // date-time
46
+ deadline?: string | null; // date-time
47
+ /**
48
+ * Milliseconds remaining until the deadline; null for non-active items.
49
+ */
50
+ time_remaining_ms?: number | null;
51
+ /**
52
+ * When the achievement was unlocked; null for active challenges.
53
+ */
54
+ unlocked_at?: string | null; // date-time
55
+ /**
56
+ * XP awarded on unlock; null for active challenges.
57
+ */
58
+ xp_awarded?: number | null;
59
+ /**
60
+ * True if the item was completed within the last 60 seconds.
61
+ */
62
+ just_unlocked: boolean;
63
+ }
64
+ export interface AchievementFeedListResponse {
65
+ results: AchievementFeedItem[];
66
+ total: number;
67
+ }
68
+ export interface ActiveChallengeListResponse {
69
+ results: ChallengeActive[];
70
+ total: number;
71
+ }
72
+ export interface ChallengeActive {
73
+ /**
74
+ * Unique challenge-instance id (UUID).
75
+ */
76
+ id: string;
77
+ challenge_template_id: string;
78
+ category: string;
79
+ title: string;
80
+ description: string;
81
+ badge_image_url: string;
82
+ status: "active";
83
+ accepted_at: string; // date-time
84
+ deadline: string; // date-time
85
+ /**
86
+ * Milliseconds remaining until the deadline (clamped to >= 0).
87
+ */
88
+ time_remaining_ms: number;
89
+ }
90
+ export interface ChallengeSuggested {
91
+ /**
92
+ * Unique suggestion-instance id (UUID).
93
+ */
94
+ id: string;
95
+ /**
96
+ * FK to the challenge template.
97
+ */
98
+ challenge_template_id: string;
99
+ /**
100
+ * Open string category propagated from the template.
101
+ */
102
+ category: string;
103
+ title: string;
104
+ description: string;
105
+ badge_image_url: string;
106
+ /**
107
+ * How many hours the user has to complete the challenge once accepted.
108
+ */
109
+ default_duration_hours: number;
110
+ status: "suggested";
111
+ suggested_at: string; // date-time
112
+ }
113
+ export interface ConflictError {
114
+ status: 409;
115
+ error: string;
116
+ reason: "already_transitioned" | "too_many_active" | "deadline_passed";
117
+ }
118
+ export interface ErrorResponse {
119
+ status: number; // int32
120
+ error: string;
121
+ }
122
+ export interface EventAccepted {
123
+ accepted: true;
124
+ }
125
+ export interface EventIngestRequest {
126
+ /**
127
+ * Idempotency key — same id is rejected (already-accepted) on retry.
128
+ */
129
+ event_id: string;
130
+ event_type: string;
131
+ actor_user_id: string;
132
+ occurred_at: string; // date-time
133
+ properties?: {
134
+ [name: string]: any;
135
+ };
136
+ }
137
+ export interface HealthResponse {
138
+ status: "ok";
139
+ /**
140
+ * example:
141
+ * dev
142
+ */
143
+ stage: string;
144
+ /**
145
+ * example:
146
+ * focus-pocus-api
147
+ */
148
+ service: string;
149
+ }
150
+ }
151
+ }
152
+ declare namespace Paths {
153
+ namespace AcceptChallenge {
154
+ namespace Parameters {
155
+ export type Id = string;
156
+ }
157
+ export interface PathParameters {
158
+ id: Parameters.Id;
159
+ }
160
+ namespace Responses {
161
+ export type $200 = Components.Schemas.ChallengeActive;
162
+ export type $401 = Components.Responses.Unauthorized;
163
+ export type $404 = Components.Responses.NotFound;
164
+ export type $409 = Components.Responses.Conflict;
165
+ }
166
+ }
167
+ namespace DismissChallenge {
168
+ namespace Parameters {
169
+ export type Id = string;
170
+ }
171
+ export interface PathParameters {
172
+ id: Parameters.Id;
173
+ }
174
+ namespace Responses {
175
+ export interface $204 {
176
+ }
177
+ export type $401 = Components.Responses.Unauthorized;
178
+ export type $404 = Components.Responses.NotFound;
179
+ export type $409 = Components.Responses.Conflict;
180
+ }
181
+ }
182
+ namespace GetAchievement {
183
+ namespace Parameters {
184
+ export type Id = string;
185
+ }
186
+ export interface PathParameters {
187
+ id: Parameters.Id;
188
+ }
189
+ namespace Responses {
190
+ export type $200 = Components.Schemas.AchievementFeedItem;
191
+ export type $401 = Components.Responses.Unauthorized;
192
+ export type $404 = Components.Responses.NotFound;
193
+ }
194
+ }
195
+ namespace GetHealth {
196
+ namespace Responses {
197
+ export type $200 = Components.Schemas.HealthResponse;
198
+ export type $401 = Components.Responses.Unauthorized;
199
+ }
200
+ }
201
+ namespace GetSuggestedChallenge {
202
+ namespace Parameters {
203
+ export type CategoryHint = string;
204
+ export type EntityType = string;
205
+ export type Route = string;
206
+ }
207
+ export interface QueryParameters {
208
+ route?: Parameters.Route;
209
+ entity_type?: Parameters.EntityType;
210
+ category_hint?: Parameters.CategoryHint;
211
+ }
212
+ namespace Responses {
213
+ export type $200 = Components.Schemas.ChallengeSuggested;
214
+ export interface $204 {
215
+ }
216
+ export type $401 = Components.Responses.Unauthorized;
217
+ export type $500 = Components.Schemas.ErrorResponse;
218
+ }
219
+ }
220
+ namespace ListAchievements {
221
+ namespace Responses {
222
+ export type $200 = Components.Schemas.AchievementFeedListResponse;
223
+ export type $401 = Components.Responses.Unauthorized;
224
+ }
225
+ }
226
+ namespace ListActiveChallenges {
227
+ namespace Responses {
228
+ export type $200 = Components.Schemas.ActiveChallengeListResponse;
229
+ export type $401 = Components.Responses.Unauthorized;
230
+ }
231
+ }
232
+ namespace PostEvent {
233
+ export type RequestBody = Components.Schemas.EventIngestRequest;
234
+ namespace Responses {
235
+ export type $202 = Components.Schemas.EventAccepted;
236
+ export type $400 = Components.Responses.BadRequest;
237
+ export type $401 = Components.Responses.Unauthorized;
238
+ }
239
+ }
240
+ }
241
+
242
+
243
+ interface OperationMethods {
244
+ /**
245
+ * getHealth - getHealth
246
+ *
247
+ * Liveness probe for the Focus Pocus API. Requires a valid EpilotAuth token.
248
+ */
249
+ 'getHealth'(
250
+ parameters?: Parameters<UnknownParamsObject> | null,
251
+ data?: any,
252
+ config?: AxiosRequestConfig
253
+ ): OperationResponse<Paths.GetHealth.Responses.$200>
254
+ /**
255
+ * listAchievements - listAchievements
256
+ *
257
+ * Unified feed for the authenticated user: returns active challenges and completed
258
+ * v1 static achievement unlocks. The `userId` is read from the EpilotAuth claim —
259
+ * no user path or query parameter is accepted. Active challenges appear first,
260
+ * followed by completed items sorted by `unlocked_at` descending.
261
+ * Items unlocked within the last 60 seconds have `just_unlocked: true`.
262
+ *
263
+ */
264
+ 'listAchievements'(
265
+ parameters?: Parameters<UnknownParamsObject> | null,
266
+ data?: any,
267
+ config?: AxiosRequestConfig
268
+ ): OperationResponse<Paths.ListAchievements.Responses.$200>
269
+ /**
270
+ * getAchievement - getAchievement
271
+ *
272
+ * Single user-scoped achievement or active-challenge item. Returns 404 if the id
273
+ * does not belong to the authenticated user.
274
+ *
275
+ */
276
+ 'getAchievement'(
277
+ parameters?: Parameters<Paths.GetAchievement.PathParameters> | null,
278
+ data?: any,
279
+ config?: AxiosRequestConfig
280
+ ): OperationResponse<Paths.GetAchievement.Responses.$200>
281
+ /**
282
+ * getSuggestedChallenge - getSuggestedChallenge
283
+ *
284
+ * Returns a suggested challenge for the authenticated user. The suggestion is
285
+ * persisted with a 7-day TTL. Calling again with the same `(user, category)`
286
+ * within 24h returns the existing suggestion without creating a new row.
287
+ * Returns 204 when all candidate templates have been dismissed within the last 24h.
288
+ *
289
+ */
290
+ 'getSuggestedChallenge'(
291
+ parameters?: Parameters<Paths.GetSuggestedChallenge.QueryParameters> | null,
292
+ data?: any,
293
+ config?: AxiosRequestConfig
294
+ ): OperationResponse<Paths.GetSuggestedChallenge.Responses.$200 | Paths.GetSuggestedChallenge.Responses.$204>
295
+ /**
296
+ * acceptChallenge - acceptChallenge
297
+ *
298
+ * Accept a suggested challenge. Atomically transitions the challenge from
299
+ * `suggested` to `active` using a conditional DynamoDB UpdateItem. Returns 409 if
300
+ * the challenge has already been transitioned or the user already has
301
+ * MAX_ACTIVE_CHALLENGES (3) active challenges.
302
+ *
303
+ */
304
+ 'acceptChallenge'(
305
+ parameters?: Parameters<Paths.AcceptChallenge.PathParameters> | null,
306
+ data?: any,
307
+ config?: AxiosRequestConfig
308
+ ): OperationResponse<Paths.AcceptChallenge.Responses.$200>
309
+ /**
310
+ * dismissChallenge - dismissChallenge
311
+ *
312
+ * Dismiss a suggested challenge. Atomically transitions the challenge from
313
+ * `suggested` to `dismissed`. The challenge template is filtered from `/suggest`
314
+ * responses for the next 24h. Returns 409 if the challenge has already been
315
+ * transitioned (e.g. already accepted or dismissed).
316
+ *
317
+ */
318
+ 'dismissChallenge'(
319
+ parameters?: Parameters<Paths.DismissChallenge.PathParameters> | null,
320
+ data?: any,
321
+ config?: AxiosRequestConfig
322
+ ): OperationResponse<Paths.DismissChallenge.Responses.$204>
323
+ /**
324
+ * listActiveChallenges - listActiveChallenges
325
+ *
326
+ * Returns all active challenges for the authenticated user. Challenges whose
327
+ * deadline has passed are lazily expired (fire-and-forget UpdateItem) and
328
+ * excluded from the response. The result set is bounded by MAX_ACTIVE_CHALLENGES=3.
329
+ *
330
+ */
331
+ 'listActiveChallenges'(
332
+ parameters?: Parameters<UnknownParamsObject> | null,
333
+ data?: any,
334
+ config?: AxiosRequestConfig
335
+ ): OperationResponse<Paths.ListActiveChallenges.Responses.$200>
336
+ /**
337
+ * postEvent - postEvent
338
+ *
339
+ * Persist-first event ingest. Accepts an activity event, writes it to the event log
340
+ * idempotently (keyed by `event_id`), and returns 202. Achievement evaluation happens
341
+ * asynchronously — no unlocks are returned in the response.
342
+ *
343
+ */
344
+ 'postEvent'(
345
+ parameters?: Parameters<UnknownParamsObject> | null,
346
+ data?: Paths.PostEvent.RequestBody,
347
+ config?: AxiosRequestConfig
348
+ ): OperationResponse<Paths.PostEvent.Responses.$202>
349
+ }
350
+
351
+ interface PathsDictionary {
352
+ ['/v1/health']: {
353
+ /**
354
+ * getHealth - getHealth
355
+ *
356
+ * Liveness probe for the Focus Pocus API. Requires a valid EpilotAuth token.
357
+ */
358
+ 'get'(
359
+ parameters?: Parameters<UnknownParamsObject> | null,
360
+ data?: any,
361
+ config?: AxiosRequestConfig
362
+ ): OperationResponse<Paths.GetHealth.Responses.$200>
363
+ }
364
+ ['/v1/achievements']: {
365
+ /**
366
+ * listAchievements - listAchievements
367
+ *
368
+ * Unified feed for the authenticated user: returns active challenges and completed
369
+ * v1 static achievement unlocks. The `userId` is read from the EpilotAuth claim —
370
+ * no user path or query parameter is accepted. Active challenges appear first,
371
+ * followed by completed items sorted by `unlocked_at` descending.
372
+ * Items unlocked within the last 60 seconds have `just_unlocked: true`.
373
+ *
374
+ */
375
+ 'get'(
376
+ parameters?: Parameters<UnknownParamsObject> | null,
377
+ data?: any,
378
+ config?: AxiosRequestConfig
379
+ ): OperationResponse<Paths.ListAchievements.Responses.$200>
380
+ }
381
+ ['/v1/achievements/{id}']: {
382
+ /**
383
+ * getAchievement - getAchievement
384
+ *
385
+ * Single user-scoped achievement or active-challenge item. Returns 404 if the id
386
+ * does not belong to the authenticated user.
387
+ *
388
+ */
389
+ 'get'(
390
+ parameters?: Parameters<Paths.GetAchievement.PathParameters> | null,
391
+ data?: any,
392
+ config?: AxiosRequestConfig
393
+ ): OperationResponse<Paths.GetAchievement.Responses.$200>
394
+ }
395
+ ['/v1/challenges/suggest']: {
396
+ /**
397
+ * getSuggestedChallenge - getSuggestedChallenge
398
+ *
399
+ * Returns a suggested challenge for the authenticated user. The suggestion is
400
+ * persisted with a 7-day TTL. Calling again with the same `(user, category)`
401
+ * within 24h returns the existing suggestion without creating a new row.
402
+ * Returns 204 when all candidate templates have been dismissed within the last 24h.
403
+ *
404
+ */
405
+ 'get'(
406
+ parameters?: Parameters<Paths.GetSuggestedChallenge.QueryParameters> | null,
407
+ data?: any,
408
+ config?: AxiosRequestConfig
409
+ ): OperationResponse<Paths.GetSuggestedChallenge.Responses.$200 | Paths.GetSuggestedChallenge.Responses.$204>
410
+ }
411
+ ['/v1/challenges/{id}/accept']: {
412
+ /**
413
+ * acceptChallenge - acceptChallenge
414
+ *
415
+ * Accept a suggested challenge. Atomically transitions the challenge from
416
+ * `suggested` to `active` using a conditional DynamoDB UpdateItem. Returns 409 if
417
+ * the challenge has already been transitioned or the user already has
418
+ * MAX_ACTIVE_CHALLENGES (3) active challenges.
419
+ *
420
+ */
421
+ 'post'(
422
+ parameters?: Parameters<Paths.AcceptChallenge.PathParameters> | null,
423
+ data?: any,
424
+ config?: AxiosRequestConfig
425
+ ): OperationResponse<Paths.AcceptChallenge.Responses.$200>
426
+ }
427
+ ['/v1/challenges/{id}/dismiss']: {
428
+ /**
429
+ * dismissChallenge - dismissChallenge
430
+ *
431
+ * Dismiss a suggested challenge. Atomically transitions the challenge from
432
+ * `suggested` to `dismissed`. The challenge template is filtered from `/suggest`
433
+ * responses for the next 24h. Returns 409 if the challenge has already been
434
+ * transitioned (e.g. already accepted or dismissed).
435
+ *
436
+ */
437
+ 'post'(
438
+ parameters?: Parameters<Paths.DismissChallenge.PathParameters> | null,
439
+ data?: any,
440
+ config?: AxiosRequestConfig
441
+ ): OperationResponse<Paths.DismissChallenge.Responses.$204>
442
+ }
443
+ ['/v1/challenges/active']: {
444
+ /**
445
+ * listActiveChallenges - listActiveChallenges
446
+ *
447
+ * Returns all active challenges for the authenticated user. Challenges whose
448
+ * deadline has passed are lazily expired (fire-and-forget UpdateItem) and
449
+ * excluded from the response. The result set is bounded by MAX_ACTIVE_CHALLENGES=3.
450
+ *
451
+ */
452
+ 'get'(
453
+ parameters?: Parameters<UnknownParamsObject> | null,
454
+ data?: any,
455
+ config?: AxiosRequestConfig
456
+ ): OperationResponse<Paths.ListActiveChallenges.Responses.$200>
457
+ }
458
+ ['/v1/events']: {
459
+ /**
460
+ * postEvent - postEvent
461
+ *
462
+ * Persist-first event ingest. Accepts an activity event, writes it to the event log
463
+ * idempotently (keyed by `event_id`), and returns 202. Achievement evaluation happens
464
+ * asynchronously — no unlocks are returned in the response.
465
+ *
466
+ */
467
+ 'post'(
468
+ parameters?: Parameters<UnknownParamsObject> | null,
469
+ data?: Paths.PostEvent.RequestBody,
470
+ config?: AxiosRequestConfig
471
+ ): OperationResponse<Paths.PostEvent.Responses.$202>
472
+ }
473
+ }
474
+
475
+ type Client = OpenAPIClient<OperationMethods, PathsDictionary>
476
+
477
+
478
+ type AchievementFeedItem = Components.Schemas.AchievementFeedItem;
479
+ type AchievementFeedListResponse = Components.Schemas.AchievementFeedListResponse;
480
+ type ActiveChallengeListResponse = Components.Schemas.ActiveChallengeListResponse;
481
+ type ChallengeActive = Components.Schemas.ChallengeActive;
482
+ type ChallengeSuggested = Components.Schemas.ChallengeSuggested;
483
+ type ConflictError = Components.Schemas.ConflictError;
484
+ type ErrorResponse = Components.Schemas.ErrorResponse;
485
+ type EventAccepted = Components.Schemas.EventAccepted;
486
+ type EventIngestRequest = Components.Schemas.EventIngestRequest;
487
+ type HealthResponse = Components.Schemas.HealthResponse;
488
+
489
+ export { type AchievementFeedItem as A, type Client as C, type ErrorResponse as E, type HealthResponse as H, type OperationMethods as O, Paths as P, Components as a, type PathsDictionary as b, type AchievementFeedListResponse as c, type ActiveChallengeListResponse as d, type ChallengeActive as e, type ChallengeSuggested as f, type ConflictError as g, type EventAccepted as h, type EventIngestRequest as i };